* {
  box-sizing: border-box;
}
:root {
  --blue: #2066a2;
  --navy: #153553;
  --orange: #e97026;
  --muted: #6d8194;
  --line: #e0e9f0;
  --bg: #f3f7fb;
}
body {
  margin: 0;
  font:
    15px/1.55 system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: var(--navy);
  background: var(--bg);
}
a {
  color: var(--blue);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.btn {
  cursor: pointer;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
small,
.muted {
  color: var(--muted);
}
.sidebar {
  position: fixed;
  width: 238px;
  inset: 0 auto 0 0;
  background: white;
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}
.brand img {
  width: 57px;
  height: 57px;
  object-fit: contain;
}
.brand strong {
  font-size: 17px;
  line-height: 1.2;
  display: block;
}
.brand small {
  font-size: 11px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav a {
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav a.active {
  color: var(--blue);
  background: #eaf3fc;
}
.nav a:hover {
  background: #f0f6fb;
}
.nav svg,
.bottom svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.shell {
  margin-left: 238px;
}
.topbar {
  height: 80px;
  padding: 0 36px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.avatar {
  background: #eaf3fc;
  color: var(--blue);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.content {
  max-width: 1200px;
  margin: auto;
  padding: 30px 36px 50px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.heading p {
  color: var(--muted);
  margin-top: 5px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  padding: 12px 18px;
  min-height: 46px;
  font-weight: 650;
  white-space: nowrap;
}
.btn.orange {
  background: var(--orange);
}
.btn.secondary {
  background: #eaf3fc;
  color: var(--blue);
}
.btn.danger {
  background: #fff0ed;
  color: #bd412f;
}
.btn.full {
  width: 100%;
}
.hero {
  background: linear-gradient(115deg, #173f67, #267cb7);
  color: white;
  border-radius: 22px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero p {
  color: #cce1f4;
  margin: 8px 0 18px;
  max-width: 450px;
}
.hero h2 {
  font-size: 26px;
}
.hero-art {
  width: 116px;
  background: #fff;
  border-radius: 22px;
  transform: rotate(4deg);
  padding: 8px;
}
.hero-art img {
  width: 100%;
  display: block;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 11px;
  font-weight: 700;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stats {
  margin-bottom: 24px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 16px #183b6010;
}
.stat small {
  display: block;
}
.stat strong {
  font-size: 27px;
  display: block;
  margin: 9px 0 3px;
  letter-spacing: -0.7px;
}
.stat .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--blue);
  border-radius: 50%;
  margin-right: 6px;
}
.stat:nth-child(2) .dot {
  background: var(--orange);
}
.stat:nth-child(3) .dot {
  background: #1a9d87;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}
.list {
  display: grid;
  gap: 12px;
}
.order-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.order-card strong {
  display: block;
  font-size: 17px;
  margin: 4px 0;
}
.order-card .right {
  text-align: right;
}
.code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--muted);
}
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  background: #ecf2f7;
  color: #607a91;
  white-space: nowrap;
}
.pill.Diterima {
  background: #eaf3fc;
  color: #2269a4;
}
.pill.Diproses {
  background: #fff0e1;
  color: #b56a1b;
}
.pill.Siap {
  background: #e4f7f2;
  color: #188270;
}
.pill.Selesai {
  background: #edf0ff;
  color: #6167b8;
}
.pill.Dibatalkan {
  background: #ffedec;
  color: #bc5148;
}
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: flex-end;
}
.filters > * {
  flex: 1;
}
.filters .btn {
  flex: 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field.wide {
  grid-column: 1/-1;
}
label {
  font-size: 13px;
  font-weight: 650;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d7e2eb;
  background: #fff;
  border-radius: 10px;
  outline: none;
  color: var(--navy);
  min-height: 46px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #2066a212;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.stack {
  display: grid;
  gap: 20px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr);
  gap: 22px;
  align-items: start;
}
.notice {
  padding: 13px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  background: #e4f7ef;
  color: #187153;
}
.notice.error {
  background: #fff0ed;
  color: #ae4336;
}
.notice.info {
  background: #eaf3fc;
  color: #206397;
}
.empty {
  text-align: center;
  padding: 32px 15px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.rows {
  display: grid;
  gap: 10px;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.total {
  font-size: 22px;
  font-weight: 750;
  color: var(--blue);
}
.steps {
  display: flex;
  gap: 6px;
  margin: 18px 0;
}
.step {
  flex: 1;
  height: 5px;
  border-radius: 9px;
  background: #e3ebf2;
}
.step.done {
  background: var(--blue);
}
.item {
  display: grid;
  grid-template-columns: 1fr 85px 105px 38px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 14px;
  background: #f6f9fc;
  border-radius: 12px;
}
.item .btn {
  padding: 0;
  min-width: 38px;
}
.sticky {
  position: sticky;
  top: 24px;
}
.chart-row {
  display: grid;
  grid-template-columns: 85px 1fr 115px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  margin: 12px 0;
}
.bar {
  height: 14px;
  border-radius: 6px;
  background: #eaf3fc;
  overflow: hidden;
}
.bar > span {
  height: 100%;
  background: var(--blue);
  display: block;
}
.auth {
  max-width: 440px;
  margin: 5vh auto;
  padding: 24px;
}
.auth-logo {
  display: block;
  width: 140px;
  margin: 0 auto 24px;
}
.auth h1 {
  text-align: center;
  font-size: 26px;
}
.auth p {
  text-align: center;
  margin: 8px 0 24px;
}
.bottom {
  display: none;
}
.mobile-menu {
  display: none;
}
.detail-title {
  font-size: 12px;
  color: var(--muted);
}
details summary {
  cursor: pointer;
  font-weight: 650;
  padding: 8px 0;
}
details[open] summary {
  margin-bottom: 15px;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.footer-note {
  margin-top: 25px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.account {
  display: flex;
  gap: 10px;
  align-items: center;
}
.account small {
  display: block;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
td,
th {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 13px 8px;
  font-size: 13px;
}
th {
  color: var(--muted);
}
.receipt {
  max-width: 420px;
  margin: 24px auto;
  background: white;
  padding: 28px;
}
.receipt img {
  width: 90px;
  display: block;
  margin: auto;
}
.receipt h1 {
  font-size: 20px;
  text-align: center;
}
.receipt .center {
  text-align: center;
}
.receipt hr {
  border: 0;
  border-top: 1px dashed #c9d8e4;
  margin: 18px 0;
}
@media (max-width: 900px) {
  .sidebar {
    width: 205px;
  }
  .shell {
    margin-left: 205px;
  }
  .content {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .sticky {
    position: static;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
  .sidebar {
    display: none;
  }
  .sidebar.open {
    display: flex;
    width: 260px;
    box-shadow: 0 0 0 100vmax #17375370;
  }
  .shell {
    margin-left: 0;
  }
  .topbar {
    height: 66px;
    padding: 0 18px;
    gap: 10px;
  }
  .topbar .date {
    display: none;
  }
  .mobile-menu {
    display: block;
    border: 0;
    background: #edf4fa;
    color: var(--blue);
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 20px;
  }
  .account small {
    display: none;
  }
  .content {
    padding: 22px 16px 105px;
  }
  .heading {
    align-items: flex-start;
  }
  .heading h1 {
    font-size: 25px;
  }
  .heading .btn {
    padding: 10px 13px;
    font-size: 12px;
  }
  .hero {
    padding: 23px 20px;
    border-radius: 18px;
  }
  .hero h2 {
    font-size: 23px;
  }
  .hero-art {
    width: 75px;
    flex-shrink: 0;
  }
  .hero p {
    font-size: 12px;
  }
  .card {
    padding: 18px;
    border-radius: 15px;
  }
  .grid {
    gap: 12px;
  }
  .stat strong {
    font-size: 23px;
  }
  .stat small {
    font-size: 11px;
  }
  .grid.two {
    grid-template-columns: 1fr;
  }
  .fields {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .field.mobile-wide {
    grid-column: 1/-1;
  }
  .filters {
    flex-wrap: wrap;
    gap: 8px;
  }
  .filters input {
    min-width: 180px;
  }
  .filters select {
    min-width: 110px;
  }
  .filters .btn {
    padding: 12px;
  }
  .order-card {
    padding: 14px;
  }
  .order-card strong {
    font-size: 15px;
  }
  .order-card .right {
    max-width: 45%;
    font-size: 12px;
  }
  .bottom {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 25;
    background: #ffffffef;
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 9px 8px max(12px, env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom a {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--muted);
    gap: 4px;
    font-size: 10px;
    min-width: 55px;
  }
  .bottom a.active {
    color: var(--blue);
    font-weight: 700;
  }
  .bottom .add {
    background: var(--orange);
    color: white;
    border-radius: 13px;
    padding: 7px 16px;
    margin-top: -18px;
    box-shadow: 0 4px 12px #e9702640;
  }
  .item {
    grid-template-columns: 1fr 80px 35px;
  }
  .item .item-price {
    grid-column: 1/3;
    grid-row: 2;
  }
  .item .remove {
    grid-column: 3;
    grid-row: 1;
  }
  .chart-row {
    grid-template-columns: 75px 1fr 95px;
  }
  .auth {
    margin: 2vh auto;
    padding: 20px;
  }
  .topbar strong {
    font-size: 12px;
  }
}
@media print {
  body {
    background: white;
  }
  .no-print,
  .sidebar,
  .topbar,
  .bottom {
    display: none !important;
  }
  .shell {
    margin: 0;
  }
  .content {
    padding: 0;
  }
  .receipt {
    padding: 8mm;
    margin: 0 auto;
    max-width: 100%;
    font-size: 12px;
  }
  .card {
    box-shadow: none;
    break-inside: avoid;
  }
  .receipt .btn {
    display: none;
  }
  @page {
    size: A5;
    margin: 8mm;
  }
}
.chips {
  display: flex;
  gap: 9px;
  overflow: auto;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 100px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.chip.selected {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.filters {
  flex-wrap: wrap;
}
.filter-extra {
  flex-basis: 100%;
  min-width: 100%;
  margin-top: 2px;
}
.filter-extra summary {
  font-size: 12px;
  color: var(--blue);
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.shortcut-grid .card {
  padding: 16px;
}
.nav {
  overflow: auto;
}
.account {
  color: var(--navy);
}
.brand strong {
  overflow-wrap: anywhere;
}
.order-card,
.row,
.heading,
.account {
  overflow-wrap: anywhere;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
[hidden] {
  display: none !important;
}
.item .item-price {
  grid-column: 1/4;
  grid-row: 2;
}
.item .remove {
  grid-column: 4;
  grid-row: 1;
}
.section-head h2 {
  line-height: 1.4;
}
@media (max-width: 640px) {
  .shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .item .item-price {
    grid-column: 1/3;
    grid-row: 2;
  }
  .item .remove {
    grid-column: 3;
    grid-row: 1;
  }
  .heading {
    flex-wrap: wrap;
  }
  .filters .field {
    min-width: 120px;
  }
  .topbar .account {
    max-width: 45%;
  }
  .topbar .account strong {
    display: block;
    max-width: 120px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .sidebar-foot {
    font-size: 12px;
  }
  .order-card .right strong {
    font-size: 13px;
  }
  .brand {
    margin-bottom: 16px;
  }
  .nav a {
    padding: 10px 14px;
  }
  .topbar strong {
    white-space: nowrap;
  }
  .filter-extra .fields {
    grid-template-columns: 1fr 1fr;
  }
}
/* RST tahap 3: logo transparan, fokus aksesibel, dan persediaan. */
.brand {
  flex-direction: column;
  gap: 6px;
  text-align: center;
  margin-bottom: 12px;
}
.brand img {
  width: 130px;
  height: 130px;
  object-fit: contain;
}
.brand small {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.auth-logo {
  width: 170px;
  height: 170px;
  object-fit: contain;
}
.hero-art {
  background: #fff;
  padding: 10px;
  width: 120px;
}
.stock-alert {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #fff2e6;
  color: #a65e1c;
  border: 1px solid #f6d8b6;
}
.stock-alert span {
  font-size: 12px;
}
.supply-count {
  display: block;
  font-size: 35px;
  letter-spacing: -1px;
  line-height: 1.4;
  margin: 12px 0;
  color: var(--blue);
}
.supply-count small {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}
.supply-card {
  color: var(--navy);
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.supply-card:hover {
  transform: translateY(-2px);
  border-color: #a9c9e4;
}
.text-button {
  background: none;
  border: 0;
  color: var(--blue);
  text-align: left;
  padding: 6px 0;
  min-height: 36px;
  font-size: 12px;
  font-weight: 650;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #e97026;
  outline-offset: 3px;
}
details summary {
  min-height: 42px;
}
.notice {
  overflow-wrap: anywhere;
}
#new-supply {
  scroll-margin-top: 25px;
}
.shortcut-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#customer-search {
  background: #f5f9fd;
}
input[type='search'] {
  appearance: none;
}
.item select {
  min-width: 0;
}
@media (max-height: 800px) {
  .sidebar .brand img {
    width: 95px;
    height: 95px;
  }
  .sidebar .nav a {
    padding: 8px 12px;
  }
  .sidebar-foot {
    padding-top: 10px;
  }
}
@media (max-width: 640px) {
  .hero-art {
    width: 83px;
  }
  .shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stock-alert {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .supply-count {
    font-size: 31px;
  }
  .supply-card .section-head {
    flex-wrap: wrap;
  }
  .nav a {
    min-height: 42px;
  }
  .receipt img {
    object-fit: contain;
  }
  #new-supply {
    scroll-margin-top: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .supply-card {
    transition: none;
  }
}
.fields > * {
  min-width: 0;
}
.filters .field input {
  min-width: 0;
}
.filters .field {
  min-width: 140px;
}
input,
select,
textarea {
  min-width: 0;
}
.sidebar .nav {
  min-height: 0;
  flex: 1;
  overscroll-behavior: contain;
}
.sidebar .brand {
  flex-shrink: 0;
}
.sidebar-foot {
  flex-shrink: 0;
}
.pill.Packing {
  background: #f3eaff;
  color: #8153b2;
}
.pill.Dikirim {
  background: #e2f4ff;
  color: #176a97;
}
.chart-scroll {
  width: 100%;
  overflow: auto;
  margin: 16px 0;
  overscroll-behavior-x: contain;
}
.chart-scroll svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}
.steps {
  gap: 5px;
}
.notice a {
  text-decoration: underline;
}
.row > div {
  min-width: 0;
}
.section-head {
  flex-wrap: wrap;
}
#gps-status {
  font-size: 13px;
}
a.row {
  color: var(--navy);
}
.fields input[type='text'] {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .chart-scroll svg {
    min-width: 650px;
  }
  .heading .btn {
    max-width: 100%;
  }
  .row > strong,
  .row > div:last-child {
    overflow-wrap: anywhere;
  }
  .grid.two.stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar .brand img {
    width: 100px;
    height: 100px;
  }
  .sidebar .nav a {
    font-size: 14px;
    padding: 9px 12px;
  }
}
.workflow-labels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 18px;
}
.workflow-labels span {
  font-size: 11px;
  text-align: center;
  background: #f2f6fa;
  color: var(--muted);
  padding: 8px 5px;
  border-radius: 8px;
}
.workflow-labels .current {
  background: #e7f2fc;
  color: var(--blue);
  font-weight: 700;
}
/* RST 4.1 — compact controls and consistent date presentation. */
.brand .brand-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1.5;
  color: #6f859b;
}
.brand-caption span {
  font-size: 13px;
  font-weight: 750;
  color: var(--blue);
  letter-spacing: 5px;
}
.brand-caption:after {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
  margin-top: 3px;
}
.ui-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-button,
.icon-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #dce6ef;
  border-radius: 12px;
  background: #f4f8fc;
  color: var(--blue);
  cursor: pointer;
}
.icon-button.danger {
  color: #be4545;
  background: #fff4f3;
  border-color: #f5d9d6;
}
.delete-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.icon-summary {
  list-style: none;
}
.icon-summary::-webkit-details-marker {
  display: none;
}
details:has(> .icon-summary) {
  display: inline-block;
  vertical-align: top;
  width: calc(100% - 58px);
}
details:has(> .icon-summary)[open] {
  width: 100%;
}
.supply-link {
  display: block;
  color: inherit;
}
.customer-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.customer-card {
  padding: 14px 8px;
  text-align: center;
  min-width: 0;
}
.customer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: inherit;
  gap: 8px;
}
.customer-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #e9f3fc;
  color: var(--blue);
  font-size: 19px;
  font-weight: 750;
}
.customer-card h2 {
  font-size: 14px;
  line-height: 1.35;
  min-height: 2.7em;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.customer-count {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.customer-count .ui-icon {
  width: 14px;
  height: 14px;
}
.customer-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  gap: 2px;
}
.customer-actions .icon-button {
  width: 44px;
  height: 44px;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 11px;
}
.customer-card:hover {
  border-color: #a9c9e4;
}
.date-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}
.date-input-wrap > input[type='text'] {
  padding-right: 44px;
  font-variant-numeric: tabular-nums;
}
.date-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  left: 0;
  bottom: 0;
}
.date-picker-button {
  position: absolute;
  right: 1px;
  top: 1px;
  width: 42px;
  height: calc(100% - 2px);
  min-height: 40px;
  background: transparent;
  border: 0;
  color: var(--blue);
  display: grid;
  place-items: center;
  cursor: pointer;
}
#profile {
  scroll-margin-top: 24px;
}
.chart-row {
  grid-template-columns: 88px 1fr 85px;
}
@media (max-width: 1100px) {
  .customer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .customer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .customer-card {
    padding: 12px 3px;
    border-radius: 14px;
  }
  .customer-card h2 {
    font-size: 12px;
  }
  .customer-actions {
    gap: 0;
  }
  .customer-actions .icon-button {
    width: 42px;
    height: 44px;
    padding: 11px;
  }
  .brand .brand-caption {
    font-size: 8px;
  }
  .brand-caption span {
    font-size: 12px;
  }
  .chart-row {
    grid-template-columns: 78px 1fr 75px;
    font-size: 10px;
  }
}

/* Sidebar categories remain scrollable on small screens. */
.sidebar .nav {
  display: block;
  overflow-y: auto;
  padding-right: 4px;
}
.nav-group {
  margin: 0 0 16px;
}
.nav-group:last-child {
  margin-bottom: 4px;
}
.nav-category {
  font-size: 10px;
  line-height: 1.5;
  font-weight: 750;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #879aab;
  padding: 5px 14px 7px;
  margin: 0;
}
.nav-group > a {
  margin-bottom: 3px;
}
.nav-group + .nav-group {
  border-top: 1px solid #eaf0f5;
  padding-top: 10px;
}
@media (max-height: 800px) {
  .nav-group {
    margin-bottom: 10px;
  }
  .nav-category {
    font-size: 9px;
    padding-top: 3px;
    padding-bottom: 5px;
  }
  .nav-group + .nav-group {
    padding-top: 6px;
  }
}
/* Member card and customer portal. */
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.member-card-stage {
  display: flex;
  justify-content: center;
  padding: 24px 0;
}
.member-plastic {
  width: 540px;
  max-width: 100%;
  aspect-ratio: 85.6/54;
  background: linear-gradient(125deg, #133c60, #216ca7);
  color: white;
  border-radius: 22px;
  padding: 25px;
  box-shadow: 0 18px 40px #163b6225;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.member-plastic:before {
  content: '';
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 45px solid #ffffff08;
  right: -90px;
  top: -80px;
  pointer-events: none;
}
.mc-top {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.mc-top img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  background: white;
  border-radius: 15px;
  padding: 4px;
}
.mc-top div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mc-top span {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #c3def1;
}
.mc-top strong {
  font-size: 22px;
  letter-spacing: 3px;
}
.mc-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  position: relative;
}
.mc-info {
  min-width: 0;
}
.mc-info > small {
  font-size: 9px;
  letter-spacing: 0.7px;
  color: #c3def1;
}
.mc-info h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 5px 0 8px;
  color: white;
  overflow-wrap: anywhere;
}
.mc-number {
  font-size: 12px;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
.mc-info p {
  margin: 8px 0 3px;
  font-size: 12px;
}
.mc-qr {
  flex-shrink: 0;
  width: 132px;
  text-align: center;
}
.mc-qr svg {
  display: block;
  width: 132px;
  height: 132px;
  border-radius: 7px;
}
.mc-qr span {
  display: block;
  font-size: 7px;
  letter-spacing: 1px;
  margin-top: 6px;
}
.mc-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  border-top: 1px solid #ffffff30;
  padding-top: 10px;
  color: #e0edf6;
  position: relative;
}
.mc-foot:before {
  position: absolute;
  content: '';
  width: 40px;
  height: 3px;
  background: #f28332;
  top: -2px;
}
.portal-body {
  background: #f2f7fb;
}
.member-portal {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 35px;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.portal-brand img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.portal-brand div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.portal-brand small {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--muted);
}
.portal-brand strong {
  font-size: 16px;
}
.portal-welcome {
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(125deg, #133c60, #216ca7);
  color: white;
  margin-bottom: 18px;
}
.portal-welcome > small {
  letter-spacing: 2px;
  font-size: 11px;
  color: #c7e0f4;
}
.portal-welcome h1 {
  color: white;
  font-size: 28px;
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
}
.portal-welcome p {
  font-size: 13px;
  margin: 7px 0;
  color: #e5f1fc;
}
.portal-badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 20px;
  background: #ffffff1c;
  font-size: 12px;
  margin-top: 10px;
}
.portal-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 6px 0 16px;
}
.portal-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 13px;
  background: white;
  border: 1px solid #dce6ef;
  border-radius: 12px;
  color: var(--blue);
  font-size: 12px;
  white-space: nowrap;
}
.portal-section {
  margin: 0 0 18px;
  scroll-margin-top: 15px;
}
.portal-order {
  border-top: 1px solid #e9eff5;
  padding: 18px 0 8px;
  margin-top: 14px;
}
.portal-items {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.portal-items p {
  margin: 4px 0;
}
.portal-footer {
  font-size: 11px;
  line-height: 1.9;
  text-align: center;
  color: var(--muted);
  padding: 8px;
}
.member-pages {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.member-pages .btn {
  font-size: 11px;
  padding: 9px 12px;
}
.member-portal .row {
  gap: 12px;
}
.member-portal .row > strong {
  white-space: nowrap;
  font-size: 13px;
}
.member-portal .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.member-portal .stat {
  padding: 18px;
}
@media (max-width: 640px) {
  .member-card-stage {
    padding: 8px 0;
  }
  .member-plastic {
    padding: 17px;
    border-radius: 17px;
    aspect-ratio: auto;
    min-height: 225px;
  }
  .mc-top {
    gap: 9px;
  }
  .mc-top img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }
  .mc-top span {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .mc-top strong {
    font-size: 15px;
    letter-spacing: 2px;
  }
  .mc-info h2 {
    font-size: 17px;
  }
  .mc-info > small {
    font-size: 8px;
  }
  .mc-info p {
    font-size: 10px;
  }
  .mc-number {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .mc-qr {
    width: 105px;
  }
  .mc-qr svg {
    width: 105px;
    height: 105px;
  }
  .mc-qr span {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .mc-body {
    gap: 10px;
  }
  .mc-foot {
    font-size: 8px;
  }
  .member-portal .card {
    padding: 18px;
  }
  .portal-welcome h1 {
    font-size: 24px;
  }
  .member-portal h2 {
    font-size: 18px;
  }
}
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  body:has(#member-print-card) {
    background: white !important;
  }
  body:has(#member-print-card) .sidebar,
  body:has(#member-print-card) .topbar,
  body:has(#member-print-card) .bottom,
  body:has(#member-print-card) .no-card-print,
  body:has(#member-print-card) .notice,
  body:has(#member-print-card) .footer-note {
    display: none !important;
  }
  body:has(#member-print-card) .shell {
    margin: 0 !important;
  }
  body:has(#member-print-card) .content {
    padding: 0 !important;
    max-width: none !important;
  }
  .member-card-stage {
    padding: 0 !important;
    display: block;
  }
  .member-plastic {
    width: 85.6mm !important;
    height: 54mm !important;
    min-height: 0 !important;
    max-width: none !important;
    aspect-ratio: auto !important;
    padding: 4mm !important;
    border-radius: 3mm !important;
    box-shadow: none !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
    break-inside: avoid;
  }
  .mc-top {
    gap: 2mm !important;
  }
  .mc-top img {
    width: 12mm !important;
    height: 12mm !important;
    padding: 0.8mm !important;
    border-radius: 2mm !important;
  }
  .mc-top span {
    font-size: 5pt !important;
    letter-spacing: 0.7pt !important;
  }
  .mc-top strong {
    font-size: 10pt !important;
    letter-spacing: 1.5pt !important;
  }
  .mc-top div {
    gap: 1mm !important;
  }
  .mc-body {
    gap: 2mm !important;
    margin: 1mm 0 !important;
  }
  .mc-info h2 {
    font-size: 10pt !important;
    margin: 1mm 0 !important;
  }
  .mc-info > small {
    font-size: 5pt !important;
  }
  .mc-info p {
    font-size: 6pt !important;
    margin: 1mm 0 !important;
  }
  .mc-number {
    font-size: 6pt !important;
    letter-spacing: 1pt !important;
  }
  .mc-qr {
    width: 23mm !important;
  }
  .mc-qr svg {
    width: 23mm !important;
    height: 23mm !important;
  }
  .mc-qr span {
    font-size: 4pt !important;
    margin-top: 1mm !important;
  }
  .mc-foot {
    font-size: 5pt !important;
    padding-top: 1.5mm !important;
  }
}

.mc-info h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.4em;
}
.customer-results {
  border: 1px solid #c9ddeb;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 24px #173e6410;
  max-height: 290px;
  overflow: auto;
  margin-top: 6px;
}
.customer-results button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  text-align: left;
  background: white;
  border: 0;
  border-bottom: 1px solid #edf2f7;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
}
.customer-results button:hover,
.customer-results button.selected {
  background: #e9f3fc;
}
.quota-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 650;
}
.quota-check input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex-shrink: 0;
}
.activity-dropdown > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 750;
  cursor: pointer;
}
.activity-dropdown > summary:after {
  content: '⌄';
  color: var(--blue);
  margin-left: 12px;
}
.activity-dropdown[open] > summary:after {
  content: '⌃';
}
#quota-preview {
  display: block;
  margin-top: 8px;
  line-height: 1.7;
}
.customer-results [role='option'] {
  overflow-wrap: anywhere;
}
.row > .pill {
  align-self: flex-start;
  flex-shrink: 0;
}
.quota-check + small {
  line-height: 1.7;
}
#admins {
  scroll-margin-top: 24px;
}

.expense-entry {
  display: grid;
  gap: 8px;
  padding: 14px 0;
}
.expense-entry + .expense-entry {
  border-top: 1px solid var(--line);
}
.expense-summary {
  display: grid;
  grid-template-areas: "description amount" "meta amount";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 12px;
}
.expense-description {
  grid-area: description;
  overflow-wrap: anywhere;
}
.expense-meta {
  grid-area: meta;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.expense-amount {
  grid-area: amount;
  justify-self: end;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .expense-summary {
    grid-template-areas: "description description" "meta amount";
  }
  .expense-entry .expense-correction-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
