* {
  box-sizing: border-box;
}
html {
  --navy: #123253;
  --pine: var(--navy);
  --deep: #102f53;
  --surface: #fff;
  --mist: #edf2f9;
  --gold-soft: #fff2d3;
  --shadow: 0 3px 14px #102f5308;
  --sand: #f2f4fb;
  --ink: #193047;
  --muted: #63758a;
  --line: #dfe5ef;
  --gold: #ffb32b;
  font:
    16px/1.45 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Khmer Sangam MN",
    sans-serif;
  color: var(--ink);
  background: var(--sand);
  color-scheme: light;
}
html[data-size="Small"] {
  font-size: 15px;
}
html[data-size="Large"] {
  font-size: 18px;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: var(--pine);
  background: white;
  border: 1px solid #cbd6e5;
  border-radius: 10px;
  min-height: 44px;
  padding: 0.48rem 0.85rem;
  font-weight: 620;
}
button:hover {
  background: #edf3fb;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #2b6596;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a {
  color: var(--pine);
}
.primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
  font-weight: 750;
}
.primary:hover {
  background: #f3a51c;
  border-color: #f3a51c;
}
.chip.chosen {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.chip.chosen:hover {
  background: var(--deep);
}
.chips,
.actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.actions {
  margin: 0.55rem 0;
}
.skip {
  position: fixed;
  left: 8px;
  top: -100px;
  background: #fff;
  padding: 10px;
  z-index: 20;
}
.skip:focus {
  top: 8px;
}
.boot,
.login {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-content: center;
  padding: 24px;
}
.boot img,
.login img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}
.login {
  background: var(--sand);
}
.login-box {
  max-width: 420px;
  min-width: min(360px, 80vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 14px 45px #102f5312;
}
.login-box h1 {
  margin: 0.55rem 0;
}
.eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.12em;
  font-weight: 750;
  color: #84601b;
  margin: 0 0 0.28rem;
}
.hint,
.muted,
small {
  font-size: 0.875rem;
  color: var(--muted);
}
.error {
  color: #902e29;
  font-weight: 600;
  white-space: pre-wrap;
}
.error:empty,
.hint:empty {
  display: none;
}

.layout {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  min-height: calc(100vh - 61px);
}
aside {
  border-right: 1px solid var(--line);
  background: #102f53;
  padding: 25px 10px;
}
.nav-title {
  color: #a9bdd5;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0 10px;
  font-weight: 700;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
nav button {
  text-align: left;
  background: transparent;
  border-color: transparent;
}
nav button.active {
  background: var(--pine);
  color: white;
}
main.workspace {
  min-width: 0;
  padding: clamp(16px, 2.1vw, 36px);
}
.topline,
.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.topline {
  margin-bottom: 0.9rem;
}
h1,
h2,
h3 {
  color: var(--pine);
  line-height: 1.18;
  margin: 0;
}
h1 {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
}
h2 {
  font-size: 1.12rem;
}
h3 {
  font-size: 1rem;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
  margin: 0.7rem 0;
  padding: 0.95rem;
  overflow-wrap: anywhere;
}
.panel > h2 {
  margin-bottom: 0.55rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.stat {
  display: grid;
  align-content: start;
  gap: 0.12rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid #ffb32b;
  border-radius: 13px;
  box-shadow: var(--shadow);
  padding: 0.68rem;
}
.stat strong {
  font-size: 1.45rem;
  color: var(--pine);
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 0.8rem;
  color: var(--muted);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.grid > .panel {
  margin: 0.3rem 0;
}
.status {
  font-size: 0.8rem;
  color: var(--muted);
}
.tag {
  display: inline-flex;
  background: #eaf0f8;
  color: #274b70;
  font-size: 0.8rem;
  font-weight: 650;
  border-radius: 6px;
  padding: 0.2rem 0.48rem;
  white-space: nowrap;
}
.Hot {
  background: #ffe4db;
  color: #94341d;
}
.Warm {
  background: var(--gold-soft);
  color: #775609;
}
.Cold {
  background: #e5edf7;
  color: #254666;
}
.Fail {
  background: #f4dddd;
  color: #803333;
}
.row {
  border-top: 1px solid #e1e7f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.1rem;
}
.row:first-child {
  border: 0;
}
.row small,
.who small {
  display: block;
}
.linkbtn {
  background: none;
  border: 0;
  text-align: left;
  padding: 0.15rem 0;
  min-height: 38px;
  text-decoration: underline;
  text-decoration-color: #a5bbd1;
  text-underline-offset: 3px;
}
.row .right {
  text-align: right;
}
.scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
}
th,
td {
  text-align: left;
  padding: 0.52rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--pine);
  color: white;
  font-weight: 600;
}
tr:nth-child(even) td {
  background: #f7f9fd;
}
tbody td {
  font-variant-numeric: tabular-nums;
}
.details,
dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}
dt {
  color: var(--muted);
  font-size: 0.78rem;
}
dd {
  margin: 0;
  white-space: pre-wrap;
}
label.field {
  display: grid;
  gap: 0.28rem;
  margin: 0.55rem 0;
}
label.field > span {
  color: #294766;
  font-size: 0.89rem;
  font-weight: 650;
}
input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 0.48rem 0.65rem;
  border: 1px solid #bdcbdd;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
textarea {
  min-height: 84px;
}
.checks {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.checks label {
  padding: 0.35rem;
}
.filters {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.filters label {
  min-width: 140px;
  flex: 1;
}
details > summary {
  cursor: pointer;
  color: var(--pine);
  font-weight: 650;
  padding: 0.5rem 0;
  min-height: 40px;
}
.listbox details {
  border-top: 1px solid var(--line);
}
dialog {
  width: min(550px, 94vw);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 18px;
  box-shadow: 0 16px 48px #102f5326;
  padding: 1.1rem;
  max-height: 88dvh;
  color: var(--ink);
}
dialog::backdrop {
  background: #0b1c30b3;
}
dialog fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
dialog img {
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}
.rightalign {
  text-align: right;
}
.form-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
  margin-top: 1rem;
}
.report-badge {
  margin: 0.5rem 0;
}
.note {
  white-space: pre-wrap;
}
#notice {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: 90vw;
  background: var(--deep);
  color: white;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}
#notice:empty,
#paper,
[hidden] {
  display: none !important;
}
.net {
  padding: 0.5rem 0.8rem;
  background: var(--gold-soft);
  border-radius: 7px;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 5px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-title {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow: auto;
  }
  nav button {
    flex: none;
    font-size: 0.84rem;
    min-height: 40px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 0.5rem;
  }
  main.workspace {
    padding: 12px;
  }
  .panel {
    padding: 0.72rem;
  }
  .filters label {
    min-width: 115px;
  }
  input,
  textarea,
  select {
    font-size: max(16px, 1rem);
  }
}
@page {
  size: letter landscape;
  margin: 7mm;
}
@media print {
  body > *:not(#paper) {
    display: none !important;
  }
  body.printing #paper {
    display: block !important;
    font:
      7.5pt/1.35 -apple-system,
      "Khmer Sangam MN",
      sans-serif;
    color: #193047;
  }
  #paper table {
    font: inherit;
    table-layout: fixed;
    margin-top: 1mm;
  }
  #paper th,
  #paper td {
    padding: 0.7mm 0.5mm;
    border: 0.4pt solid #aab9cc;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  #paper th {
    background: #123253;
    color: white;
  }
  #paper tr {
    break-inside: avoid;
  }
  #paper thead {
    display: table-header-group;
  }
  #paper h1 {
    font-size: 14pt;
  }
  #paper h2 {
    margin-top: 3mm;
    font-size: 10pt;
  }
  #paper footer {
    display: flex;
    justify-content: space-between;
    margin-top: 5mm;
  }
  #paper .total,
  #paper .group {
    font-weight: 700;
    background: #edf2f9;
  }
  #paper .summary {
    width: 75%;
  }
}

/* Intrinsic sizing keeps form controls and long staff/customer names inside their available column. */
.mobile-nav,
.cell-label {
  display: none;
}
.layout > *,
main.workspace > *,
.panel,
.stat,
.cell-value,
.field,
form,
fieldset,
details,
.row > *,
.account,
.between > *,
.topline > * {
  min-width: 0;
}
.field input,
.field select,
.field textarea {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
fieldset {
  min-inline-size: 0;
}
button,
summary,
.who,
.status,
.account strong {
  overflow-wrap: anywhere;
}
button:focus-visible {
  outline-offset: 1px;
}
button[aria-current="page"] {
  color: var(--pine);
  font-weight: 800;
}
.sales-start {
  min-width: 0;
  margin: 0;
}
.quick-grid,
.periods,
.menu-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.quick-card {
  text-align: left;
  display: grid;
  align-content: start;
  gap: 0.12rem;
  border-top: 3px solid #ffb32b;
  min-height: 68px;
}
.quick-card strong,
.inbox-count strong {
  font-size: 1.45rem;
  line-height: 1.2;
}
.quick-card span,
.inbox-count span {
  font-size: 0.85rem;
}
.periods {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 42rem;
}
.periods button,
.menu-grid button {
  width: 100%;
  white-space: normal;
  line-height: 1.25;
}
.inbox-count {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0.55rem 0;
}
.payment-result {
  border-left: 4px solid var(--gold);
  padding: 0.4rem 1rem;
  display: grid;
  gap: 0.1rem;
}
.payment-result strong {
  color: var(--pine);
  font-size: clamp(1.5rem, 5vw, 2.3rem);
}
.quote-detail dd {
  font-variant-numeric: tabular-nums;
}
#calculator {
  max-width: 54rem;
}
#calculator .field {
  margin-block: 0.65rem;
}
.menu-grid {
  margin-top: 1rem;
}
tr[data-customer-row] {
  cursor: pointer;
}
@media screen and (min-width: 641px) and (max-width: 950px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  aside {
    padding: 5px 12px;
    border: 0;
  }
  aside nav {
    display: flex;
    flex-flow: row wrap;
    overflow: visible;
  }
  aside nav button {
    flex: 0 1 auto;
  }
  .nav-title {
    display: none;
  }
}
@media screen and (max-width: 640px) {
  html {
    scroll-padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
  .layout {
    display: block;
    min-width: 0;
  }
  .layout > aside {
    display: none;
  }

  main.workspace {
    padding: 0.55rem max(0.6rem, env(safe-area-inset-right))
      calc(4.75rem + env(safe-area-inset-bottom))
      max(0.6rem, env(safe-area-inset-left));
  }
  .topline {
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.45rem;
  }
  .topline h1 {
    font-size: 1.38rem;
  }
  .topline .status {
    font-size: 0.72rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.4rem;
    align-items: center;
  }
  .status br {
    display: none;
  }
  .status button {
    padding: 0.22rem 0.45rem;
    min-height: 34px;
  }
  .panel {
    padding: 0.75rem;
    border-radius: 16px;
    margin: 0.55rem 0;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters,
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters {
    display: grid;
  }
  .filters label {
    min-width: 0;
  }
  .periods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .periods button {
    padding: 0.4rem 0.32rem;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .chips,
  .actions,
  .between,
  .form-actions {
    flex-wrap: wrap;
  }
  .actions button,
  .chips button,
  .form-actions button {
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    line-height: 1.22;
    padding: 0.4rem 0.65rem;
  }
  .quick-card {
    min-height: 64px;
  }
  .tag {
    white-space: normal;
  }
  .row {
    flex-wrap: wrap;
  }
  .scroll {
    overflow: visible;
    max-width: 100%;
    min-width: 0;
  }
  table.records,
  table.records tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }
  table.records thead {
    position: absolute;
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
  }
  table.records tr {
    display: block;
    padding: 0.45rem 0.15rem;
    border-bottom: 1px solid var(--line);
  }
  table.records tr:last-child {
    border-bottom: 0;
  }
  table.records td {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.3fr);
    gap: 0.45rem;
    align-items: baseline;
    white-space: normal;
    border: 0;
    padding: 0.18rem 0;
    overflow-wrap: anywhere;
  }
  table.records .cell-label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
  }
  table.records .cell-value {
    font-size: 0.91rem;
  }
  .cell-value small {
    display: block;
    color: var(--muted);
  }
  table.records .empty-cell {
    display: none;
  }
  .cell-value .linkbtn {
    min-height: 40px;
    max-width: 100%;
  }
  table.records tr[data-customer-row] {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.65rem;
    margin: 0.5rem 0;
    background: #ffffff;
  }
  dialog {
    width: calc(100% - 1rem);
    max-width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
    padding: 0.8rem;
    margin: auto;
    overflow-y: auto;
  }
  .login {
    display: flex;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: 0.65rem;
  }
  .login-box {
    width: 100%;
    min-width: 0;
    max-width: 25rem;
    padding: 1.15rem;
  }
  input,
  select,
  textarea {
    font-size: max(16px, 1rem);
    max-width: 100%;
    min-width: 0;
  }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    background: var(--deep);
    color: #eaf1fb;
    border-top: 1px solid #315373;
    box-shadow: 0 -4px 20px #102f5314;
    padding: 0.14rem 0.18rem calc(0.16rem + env(safe-area-inset-bottom));
    gap: 0;
    overflow: visible;
  }
  .mobile-nav button {
    position: relative;
    color: #e4edf8;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.12rem;
    border: 0;
    background: transparent;
    min-width: 0;
    min-height: 55px;
    line-height: 1.2;
    padding: 0.35rem 0.06rem;
    font-size: 0.7rem;
    text-align: center;
    border-radius: 10px;
  }
  .mobile-nav button[aria-current] {
    background: #234c74;
    color: #fff;
  }
  .mobile-nav button[aria-current]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
  }
  .mobile-nav .nav-label,
  .mobile-nav .nav-label > [data-i18n] {
    max-width: 100%;
    font-size: clamp(10px, 0.66rem, 11.5px);
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
    hyphens: none;
  }
  .mobile-nav svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linejoin: round;
    stroke-linecap: round;
  }
  #notice {
    transform: none;
    z-index: 40;
    left: 0.55rem;
    right: 0.55rem;
    bottom: calc(3.75rem + env(safe-area-inset-bottom));
    max-width: calc(100% - 1.1rem);
  }
}
@media screen and (max-width: 360px) {
  .form-grid,
  .filters {
    grid-template-columns: 1fr;
  }
  .topline {
    display: grid;
  }
  dl > div,
  .quote-detail > div {
    min-width: 0;
  }
  dd,
  dt {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

.booking-card {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.booking-card > summary {
  cursor: pointer;
  padding: 0.35rem 0;
  min-height: 44px;
}
.booking-card > summary span,
.booking-card > summary small {
  display: block;
  margin: 0.15rem 0;
}
.booking-card > summary span {
  font-weight: 600;
}
.booking-card > summary small,
.booking-deadline {
  color: var(--muted);
}
.booking-card details {
  margin: 0.5rem 0;
}
.booking-card details > summary {
  padding: 0.45rem 0;
  cursor: pointer;
}
.booking-card article {
  border-top: 1px solid var(--line);
  padding: 0.5rem 0;
}
.booking-preview {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
}
.booking-facts {
  margin: 0.5rem 0;
  min-width: 0;
}
.booking-facts > div {
  min-width: 0;
}
.booking-facts dd {
  overflow-wrap: anywhere;
}

.role-drill {
  margin: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  padding: 0.2rem 0;
}
.role-drill > summary {
  cursor: pointer;
  padding: 0.55rem 0;
  overflow-wrap: anywhere;
}
.role-drill > summary strong {
  color: var(--pine);
}
.role-drill ul {
  padding-left: 1.25rem;
}
.role-drill small {
  display: block;
  overflow-wrap: anywhere;
}
.role-drill .linkbtn {
  white-space: normal;
  text-align: start;
}

.visit-entry {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}
.visit-entry .visit-choices {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.visit-choices legend {
  font-weight: 650;
  margin-bottom: 0.35rem;
}
.visit-options,
.visit-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.visit-options label,
.visit-photo-actions label {
  position: relative;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}
.visit-options input,
.visit-photo-actions input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.visit-options label > span,
.visit-photo-actions label {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #bdcbdd;
  border-radius: 0.65rem;
  background: #fff;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.visit-options input:checked + span {
  background: #123253;
  color: #fff;
  border-color: #123253;
}
.visit-options input:focus-visible + span,
.visit-photo-actions label:focus-within {
  outline: 2px solid #2b6596;
  outline-offset: 2px;
}
.visit-attendance {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}
.visit-attendance input {
  width: auto;
}
.visit-previews {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr));
  gap: 0.5rem;
}
.visit-previews figure {
  margin: 0;
  min-width: 0;
}
.visit-previews img {
  width: 100%;
  max-height: 6rem;
  object-fit: contain;
}
.visit-previews figcaption {
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
.visit-offers small {
  display: block;
  margin-bottom: 0.6rem;
}
.visit-offers h3,
.visit-entry h3 {
  margin: 0.5rem 0;
}

.my-profile > summary {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  cursor: pointer;
}
.my-profile > summary > span:last-child {
  min-width: 0;
}
.my-profile small,
.my-profile strong {
  display: block;
  overflow-wrap: anywhere;
}
.staff-photo {
  width: 2.7rem;
  height: 2.7rem;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
}
.staff-photo.empty {
  display: grid;
  place-items: center;
  background: #edf2f9;
  color: #63758a;
  font-size: 0.64rem;
  text-align: center;
}
.day-weather {
  margin: 0.4rem 0;
  color: var(--muted);
  font-size: 0.83rem;
}
.booking-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
}
.booking-buckets button {
  display: grid;
  gap: 0.2rem;
  justify-items: start;
  text-align: left;
  color: var(--pine);
  white-space: normal;
  min-width: 0;
}
.booking-buckets button[aria-pressed="true"] {
  background: var(--pine);
  color: white;
}
.booking-buckets span {
  overflow-wrap: anywhere;
}
.booking-buckets strong {
  font-size: 1.3em;
}
.bucket-list {
  border-top: 1px solid var(--line);
  margin-top: 0.7rem;
}
.bucket-list button {
  display: block;
}
@media (max-width: 640px) {
  .booking-buckets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .my-profile.panel {
    margin: 0.4rem 0;
    padding: 0.4rem 0.65rem;
  }
  .day-weather {
    overflow-wrap: anywhere;
  }
}

.shared-card {
  padding: 0.65rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid #dfe5ef;
  min-width: 0;
}
.shared-card > .card-part {
  background: white;
  box-shadow: none;
}
.shared-card.payment-closed,
.customer-journey.payment-closed {
  background: #fff5d7;
  border-color: #ddbb69;
}
.shared-card.payment-closed > .card-part:first-child {
  background: #fff5d7;
}
.customer-journey {
  border: 1px solid #dfe5ef;
  border-radius: 0.65rem;
  padding: 0.6rem;
  margin: 0.75rem 0;
  background: #fff;
  overflow-wrap: anywhere;
}
.customer-journey.payment-closed > .booking-card {
  background: #fff9e9;
}
.closure-note {
  background: #fae3a0;
  padding: 0.5rem;
  border-radius: 0.4rem;
  font-weight: 650;
}
.rating-feedback {
  min-height: 1.3em;
  color: #355774;
}
.visit-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(8rem, 100%), 1fr));
  gap: 0.5rem;
  margin: 0.6rem 0;
}
.visit-photos figure {
  margin: 0;
  min-width: 0;
}
.visit-photos button {
  width: 100%;
  padding: 0.15rem;
}
.visit-photos img {
  display: block;
  width: 100%;
  height: 5rem;
  object-fit: cover;
}
.visit-photos figcaption {
  font-size: 0.85em;
  overflow-wrap: anywhere;
}
.recorded-visit > summary {
  font-weight: 650;
  min-height: 2.75rem;
  line-height: 1.45;
  padding: 0.65rem 0;
}
.customer-journey:focus-visible {
  outline: 2px solid #2b6596;
}
.profile-id {
  margin: 0.25rem 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.profile-id strong {
  color: var(--ink);
}
.profile-section > summary,
.journey-history > summary {
  cursor: pointer;
  min-height: 44px;
  padding: 0.55rem 0;
}
.profile-section > summary > small {
  display: block;
  color: var(--muted);
  margin-left: 1rem;
}
.card-part > .profile-section {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.journey-status {
  display: inline-block;
  max-width: 100%;
  font-weight: 700;
  color: var(--pine);
  background: #edf2f9;
  border-radius: 0.45rem;
  padding: 0.25rem 0.55rem;
  margin: 0.15rem 0;
}
.customer-journey h3,
.customer-journey > p {
  margin: 0.35rem 0;
}
.customer-journey .actions:empty {
  display: none;
}
.customer-journey {
  border-left: 3px solid var(--pine);
}
#entry fieldset.visit-choices {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0.8rem 0;
}
#entry .visit-choices small {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
}
#entry [data-field="plan_after"] .visit-options {
  display: grid;
  align-items: start;
}
#entry [data-field="plan_after"] .visit-options label > span {
  width: 100%;
  line-height: 1.35;
}
#entry [data-field="outcome"] .visit-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
#entry [data-field="outcome"] .visit-options label > span {
  width: 100%;
  min-height: 44px;
}
.followup-extras > summary {
  padding: 0.65rem 0;
  cursor: pointer;
  font-weight: 600;
}
.commercial-plan {
  margin-top: 0.8rem;
  border-top: 1px solid var(--line);
}
details[lang="km"] {
  line-height: 1.75;
  overflow-wrap: anywhere;
}
details[lang="km"] > summary {
  cursor: pointer;
  font-weight: 650;
}
@media (max-width: 640px) {
  .shared-card {
    padding: 0.35rem;
  }
  .shared-card .card-part {
    padding: 0.65rem;
  }
  .shared-card .actions button {
    max-width: 100%;
    white-space: normal;
  }
  .customer-journey {
    padding: 0.45rem;
  }
}

.stock-page {
  min-width: 0;
}
.stock-heading,
.stock-pager,
.stock-totals {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.stock-heading h2 {
  margin: 0;
}
.stock-controls .field {
  margin: 0.35rem 0;
}
.stock-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
  gap: 0.3rem 0.65rem;
}
.stock-extra > summary,
.stock-summary summary {
  cursor: pointer;
  padding: 0.5rem 0;
}
.stock-source p {
  margin: 0.35rem 0;
}
.stock-source small,
.stock-details small {
  display: block;
  color: var(--muted);
}
.stock-source-type,
.stock-badge {
  display: inline-flex;
  max-width: 100%;
  border-radius: 1rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.88em;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.stock-source-type,
.stock-badge.reference {
  color: #63758a;
  background: #edf2f9;
}
.stock-badge.available {
  color: #205947;
  background: #e0f2e5;
}
.stock-badge.held {
  color: #5d4319;
  background: #f8edce;
}
.stock-badge.blocked {
  color: #943e3f;
  background: #fce9e8;
}
.stock-badge.review {
  color: #614f79;
  background: #f0eaf7;
}
.stock-totals {
  justify-content: flex-start;
  gap: 0.45rem 1rem;
}
.stock-totals > span {
  display: inline-flex;
  gap: 0.35rem;
}
.stock-caption {
  padding: 0.4rem 0;
  text-align: left;
  color: var(--muted);
}
.stock-table .linkbtn,
.stock-controls button,
.stock-pager button,
.stock-details button {
  min-height: 44px;
}
.stock-pager {
  justify-content: center;
  margin-top: 0.75rem;
}
.stock-detail-code {
  overflow-wrap: anywhere;
}
.stock-page table.records {
  width: 100%;
  table-layout: auto;
}
.stock-page .cell-value,
.stock-heading h2 {
  overflow-wrap: anywhere;
}
.stock-page .actions {
  margin-top: 0.4rem;
}
.stock-page .stock-details dd {
  white-space: normal;
}
@media (max-width: 640px) {
  .stock-page .stock-heading {
    align-items: flex-start;
  }
  .stock-table tr {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.65rem;
    margin: 0.5rem 0;
    background: #ffffff;
  }
  .stock-table td:nth-child(1),
  .stock-table td:nth-child(2) {
    display: block;
  }
  .stock-table td:nth-child(1) .cell-label,
  .stock-table td:nth-child(2) .cell-label {
    display: none;
  }
  .stock-table td:nth-child(1) .linkbtn {
    font-size: 1.08em;
    font-weight: 700;
    text-align: left;
  }
  .stock-table .stock-caption {
    display: block;
  }
  .stock-totals {
    gap: 0.35rem 0.75rem;
  }
  .stock-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stock-controls .field select {
    min-height: 44px;
  }
}
@media (max-width: 355px) {
  .stock-filters {
    grid-template-columns: 1fr;
  }
}

.daily-controls,
.daily-manual {
  display: flex;
  align-items: end;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.daily-page {
  min-width: 0;
}
.daily-controls {
  margin-bottom: 1rem;
}
.daily-controls .field,
.daily-manual .field {
  margin: 0;
  min-width: 0;
}
.daily-manual {
  margin: 1rem 0;
}
.daily-manual > div {
  display: grid;
  gap: 0.25rem;
}
.daily-step {
  display: grid;
  grid-template-columns: 2.75rem minmax(3rem, 6.5rem) 2.75rem;
  align-items: center;
  gap: 0.3rem;
}
.daily-step input {
  width: 100%;
  min-width: 0;
}
.daily-metrics {
  margin-top: 0.8rem;
}
@media (max-width: 430px) {
  .daily-manual {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .daily-controls .field {
    flex-basis: 100%;
  }
  .daily-controls .chip {
    min-width: 0;
  }
}

/* The inbox stays reachable without widening the account header on a phone. */

.notify-root {
  flex: none;
}
.notify-bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 7px;
}
.notify-bell svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  padding: 1px 4px;
  border-radius: 20px;
  background: #ffb32b;
  color: #123253;
  font-size: 11px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}
.notify-panel {
  position: absolute;
  z-index: 25;
  top: calc(100% + 0.2rem);
  right: max(0.5rem, calc((100vw - 1600px) / 2));
  box-sizing: border-box;
  width: min(25rem, calc(100vw - 1rem));
  max-height: min(72dvh, 35rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.9rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 8px 28px #102f5326;
  text-align: left;
  font-size: 1rem;
}
.notify-panel h2,
.notify-panel p {
  margin: 0.2rem 0 0.6rem;
}
.notify-panel button {
  color: var(--pine);
  border-color: var(--line);
  background: #fff;
  min-height: 38px;
  max-width: 100%;
  white-space: normal;
}
.notify-list {
  margin: 0.65rem 0;
  padding: 0;
  list-style: none;
}
.notify-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 0.45rem 0;
  overflow-wrap: anywhere;
}
.notify-open {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.18rem;
  padding: 0.35rem;
  border: 0;
  text-align: left;
  line-height: 1.3;
}
.notify-open span,
.notify-open small {
  display: block;
  color: var(--muted);
}
.notify-row.unread .notify-open {
  border-left: 3px solid var(--gold);
}
.notify-settings {
  border-top: 1px solid var(--line);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}
@media (max-width: 640px) {
  .notify-panel button,
  .notify-bell {
    min-height: 44px;
  }
  .notify-panel {
    max-height: calc(100dvh - 9rem);
    padding: 0.7rem;
  }
  .notify-row {
    flex-wrap: wrap;
  }
}

.monthly-sales h3 {
  margin: 0.25rem 0 0.7rem;
  color: var(--pine);
}
.sales-month-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sales-month-nav button {
  flex: 1 1 5rem;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
  line-height: 1.25;
}
.sales-month-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.5rem;
  margin: 0.8rem 0 0.4rem;
}
.sales-month-counts div {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.15rem;
  padding: 0.6rem;
  background: var(--mist, #edf2f9);
  border-radius: 0.5rem;
}
.sales-month-counts dt,
.sales-hot-now span {
  overflow-wrap: anywhere;
}
.sales-month-counts dd,
.sales-hot-now strong {
  margin: 0;
  font-size: 1.35em;
  font-weight: 700;
  color: var(--pine);
}
.sales-hot-now {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 0.7rem;
  padding-top: 0.6rem;
}
.monthly-sales > small {
  color: var(--muted);
}

.sales-directory-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: 0.5rem;
  margin: 0.55rem 0;
}
.sales-directory-filters .field {
  min-width: 0;
  margin: 0;
}
.sales-directory-filters select {
  width: 100%;
  min-width: 0;
}

.rating-editor {
  min-width: 0;
}
.rating-editor p {
  margin: 0.15rem 0 0.45rem;
}
.rating-options,
.rating-loss {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}
.rating-options button,
.rating-loss button,
.rating-quick {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.rating-options {
  margin: 0.4rem 0;
}
.rating-choice.chosen {
  border-color: var(--pine);
  background: var(--pine);
  color: #fff;
}
.rating-loss {
  padding: 0.55rem 0;
}
.rating-loss legend {
  font-weight: 700;
  max-width: 100%;
  margin-bottom: 0.35rem;
}
.rating-quick {
  color: var(--pine);
  font-weight: 650;
}
.visit-rating {
  margin-top: 0.25rem;
}
.rating-editor .rating-feedback {
  min-height: 0;
}
@media (max-width: 480px) {
  .rating-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rating-options button {
    width: 100%;
  }
  .rating-loss button {
    padding-inline: 0.55rem;
  }
}
.booking-identity {
  min-width: 0;
  margin: 0.8rem 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}
.booking-identity summary {
  font-weight: 650;
  cursor: pointer;
}
.buyer-files,
.buyer-photo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.45rem 0;
}
.buyer-photo > span {
  width: 100%;
}
.buyer-file {
  display: grid;
  min-width: 0;
  max-width: 100%;
  font-size: 0.9rem;
}
.buyer-file input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.buyer-private-image {
  display: block;
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
  margin-top: 0.5rem;
}
.customer-progress {
  padding-left: 1.35rem;
}
.customer-progress li {
  padding: 0.25rem 0;
}
.customer-progress li strong,
.customer-progress li span {
  display: block;
  overflow-wrap: anywhere;
}
.customer-progress li span {
  color: var(--muted);
  font-size: 0.9em;
}

/* Date selection and an explicit 12-hour clock on every screen size. */
.time-field {
  min-width: 0;
}
.time-field > label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.time-field input[type="date"] {
  width: 100%;
  min-width: 0;
}
.time-clock-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.time-clock-row label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.time-clock-row select {
  width: 100%;
  min-width: 0;
}
.time-field [data-time-preview] {
  overflow-wrap: anywhere;
}

@font-face {
  font-family: "Amory Khmer";
  src: url("/noto-sans-khmer.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
html[lang="km"] body,
html[lang="km"] button,
html[lang="km"] input,
html[lang="km"] select,
html[lang="km"] textarea {
  font-family:
    "Amory Khmer", "Noto Sans Khmer", "Khmer OS", "Khmer MN", sans-serif;
  letter-spacing: 0;
  line-height: 1.7;
}
html[lang="km"] .eyebrow,
html[lang="km"] .nav-title,
html[lang="km"] h1,
html[lang="km"] h2,
html[lang="km"] h3 {
  letter-spacing: 0;
  line-height: 1.6;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  max-width: 100%;
}
html[lang="km"] body {
  line-height: 1.7;
}
html[lang="km"] button,
html[lang="km"] input,
html[lang="km"] select,
html[lang="km"] textarea {
  line-height: 1.6;
}
html[lang="km"] button,
html[lang="km"] label,
html[lang="km"] th,
html[lang="km"] [data-i18n] {
  overflow-wrap: anywhere;
}

.language-switch {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.login-box > .language-switch {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.language-switch [lang="km"] {
  font-family: "Amory Khmer", sans-serif;
  line-height: 1.7;
}
#sheet > .between {
  flex-wrap: wrap;
}
#sheet > .between > .language-switch {
  margin-inline: auto 0;
}
.language-switch select {
  width: auto;
  max-width: 8rem;
  min-height: 44px;
  padding: 0.35rem 1.4rem 0.35rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 8px;
  font-family: "Amory Khmer", sans-serif;
}

.workspace-footer,
.menu-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.workspace-footer button,
.menu-footer button {
  min-height: 44px;
}

/* Application shell. All header controls remain in their original tab order. */
.app-header {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px max(20px, calc((100vw - 1560px) / 2));
  background: var(--navy);
  color: #fff;
  border-bottom: 2px solid var(--gold);
}
.header-brand {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 10px;
}
.header-brand:hover {
  background: #244969;
}
.header-brand img {
  display: block;
  width: 35px;
  height: 35px;
  object-fit: contain;
}
.header-identity {
  display: grid;
  gap: 2px;
  justify-self: start;
  min-width: 0;
  max-width: 23rem;
  padding: 7px 12px;
  background: #0d2948;
  border: 1px solid #365773;
  border-radius: 12px;
}
.header-identity strong {
  display: block;
  color: #fff;
  font-size: 0.93rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-identity small {
  display: block;
  color: #bfcee0;
  font-size: 0.73rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-tools {
  display: grid;
  grid-template-columns: auto 44px 44px;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.header-tools > .notify-root {
  grid-column: 2;
}
.header-tools > .header-settings {
  grid-column: 3;
}
.header-tools .notify-bell,
.header-settings {
  display: grid;
  place-items: center;
  min-width: 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid #58718e;
  border-radius: 11px;
  color: #fff;
}
.header-tools .notify-bell:hover,
.header-settings:hover {
  background: #284d72;
}
.header-settings svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-language {
  grid-column: 1;
  grid-row: 1;
  min-inline-size: 6.8rem;
}
.header-language .language-switch {
  margin: 0;
}
.header-language select {
  width: 100%;
  max-width: 8rem;
  min-height: 40px;
  padding: 0.35rem 1.3rem 0.35rem 0.5rem;
  border: 1px solid #58718e;
  background: #1c4165;
  color: #fff;
  font-size: 0.8rem;
  border-radius: 10px;
}
.header-language option {
  color: var(--ink);
  background: #fff;
}
.app-header :focus-visible {
  outline-color: var(--gold);
  outline-offset: 2px;
}
aside nav button {
  color: #d7e3f2;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid transparent;
  font-weight: 600;
}
aside nav button:hover {
  background: #1d4166;
  color: #fff;
}
aside nav button.active {
  background: #244d75;
  border-left-color: var(--gold);
  color: #fff;
}
@media (min-width: 951px) {
  .layout > aside {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: calc(100dvh - 76px);
    padding: 24px 12px;
    border-color: #294a6a;
  }
}
@media (max-width: 640px) {
  .app-header {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 76px;
    padding: 9px max(10px, env(safe-area-inset-right)) 9px
      max(10px, env(safe-area-inset-left));
  }
  .header-brand {
    width: 36px;
    min-width: 36px;
  }
  .header-brand img {
    width: 31px;
    height: 31px;
  }
  .header-identity {
    padding: 7px 9px;
    width: 100%;
    max-width: none;
  }
  .header-identity strong {
    font-size: 0.84rem;
  }
  .header-identity small {
    font-size: 0.68rem;
  }
  .header-tools {
    width: 6.8rem;
    grid-template-columns: repeat(2, minmax(44px, 1fr));
    gap: 4px;
  }
  .header-tools > .notify-root {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }
  .header-tools > .header-settings {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
  }
  .header-language {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .header-language select {
    max-width: none;
    min-height: 32px;
    height: 32px;
    padding-block: 2px;
    font-size: 16px;
  }
  .header-tools .notify-bell,
  .header-settings {
    border-color: transparent;
  }
  .header-identity {
    border-radius: 11px;
  }
}

/* Phone-first Sales and customer surfaces reuse the existing action controls. */
.sales-home {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.sales-home > .panel,
.sales-home > .sales-welcome {
  margin: 0;
}
.sales-welcome {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.welcome-role {
  margin: 0 0 5px;
  font-size: 0.68rem;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.welcome-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.3;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.welcome-date {
  margin: 0.4rem 0 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.45;
}
.welcome-weather {
  margin: 0.65rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.sales-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.sales-actions > button {
  min-width: 0;
  min-height: 46px;
  white-space: normal;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  line-height: 1.35;
  font-weight: 700;
}
.sales-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.sales-summary-strip > .quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 82px;
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--line);
  padding: 0.65rem 0.35rem;
  background: transparent;
  text-align: center;
  box-shadow: none;
}
.sales-summary-strip > .quick-card:first-child {
  border-radius: 14px 0 0 14px;
}
.sales-summary-strip > .quick-card:last-child {
  border-right: 0;
  border-radius: 0 14px 14px 0;
}
.sales-summary-strip > .quick-card:hover {
  background: var(--mist);
}
.sales-summary-strip > .quick-card strong {
  font-size: 1.5rem;
  color: var(--navy);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.sales-summary-strip > .quick-card > span {
  font-size: 0.76rem;
  line-height: 1.3;
  font-weight: 500;
  color: var(--muted);
}
.home-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.home-section-heading h2 {
  font-size: 1.06rem;
}
.home-section-heading > .linkbtn {
  min-height: 36px;
  padding: 0.25rem 0.45rem;
  font-size: 0.8rem;
  border-color: transparent;
  background: transparent;
}
.home-record-list {
  display: grid;
  gap: 0;
  min-width: 0;
}
.home-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.home-record:first-child {
  border-top: 0;
}
.home-record > * {
  min-width: 0;
}
.home-record .linkbtn {
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.home-record small {
  display: block;
  line-height: 1.4;
}
.home-record > button,
.home-record > .actions button {
  min-height: 40px;
  padding: 0.4rem 0.65rem;
  white-space: normal;
  border-radius: 10px;
}
.home-record .actions {
  margin: 0;
  justify-content: flex-end;
}
.home-record .tag {
  max-width: 100%;
  border-radius: 7px;
}
.sales-secondary {
  min-width: 0;
}
.sales-secondary > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--navy);
}
.customer-workspace {
  min-width: 0;
}
.customer-toolbar {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-bottom: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.customer-heading-actions {
  justify-content: flex-end;
  margin-bottom: 0;
}
.customer-toolbar > .between {
  gap: 8px;
}
.customer-toolbar input[type="search"] {
  border-radius: 12px;
  min-height: 46px;
}
.customer-status-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}
.customer-status-cards > button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 78px;
  padding: 0.55rem 0.3rem;
  border-radius: 13px;
  border: 1px solid var(--line);
  box-shadow: none;
  white-space: normal;
  line-height: 1.3;
}
.customer-status-cards > button strong {
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}
.customer-status-cards > button span {
  font-size: 0.8rem;
}
.customer-status-cards > [data-rating="Hot"] {
  background: #fff0ec;
  border-color: #f2d4cc;
  color: #993f30;
}
.customer-status-cards > [data-rating="Warm"] {
  background: #fff6df;
  border-color: #efdfb0;
  color: #805b14;
}
.customer-status-cards > [data-rating="Cold"] {
  background: #edf3ff;
  border-color: #d4dfef;
  color: #315d8b;
}
.customer-status-cards > button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px currentColor;
}
.customer-list {
  min-width: 0;
}
.customer-list table.records tr[data-customer-row] {
  box-shadow: var(--shadow);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--navy);
}
input[readonly],
textarea[readonly] {
  background: #f6f8fc;
  color: #405973;
}
html[lang="km"] .welcome-role {
  letter-spacing: 0;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .sales-welcome {
    padding: 14px;
  }
  .sales-actions {
    gap: 8px;
  }
  .home-record {
    flex-wrap: wrap;
  }
  .home-record > .actions {
    margin-left: auto;
  }
  .customer-toolbar {
    gap: 8px;
  }
  .customer-status-cards {
    gap: 7px;
  }
  .customer-list > .panel {
    margin-top: 0;
  }
}
@media (min-width: 951px) {
  .sales-home {
    max-width: 72rem;
  }
  .sales-summary-strip {
    max-width: 48rem;
  }
  .sales-actions {
    max-width: 48rem;
  }
  .customer-toolbar {
    max-width: 70rem;
  }
}

.customer-classification-more {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-block: 2px;
}
.customer-classification-more .chip {
  margin: 0;
  max-width: 100%;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
}
.customer-filter-details {
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.customer-filter-details > summary {
  min-height: 40px;
  font-size: 0.88rem;
}
.home-empty {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0.5rem 0;
}
