/* MyBon — CatatHutang shell */

:root {
  --primary: #000000;
  --primary-soft: #f3f4f6;
  --accent: #1877F2;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #000000;
  --muted: #5C5C5C;
  --border: #E5E5E5;
  --bottom-nav-h: 88px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --max-w: 390px;
  --radius: 12px;
  --font: Figtree, system-ui, sans-serif;
  --font-display: Fraunces, Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body.app-body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: #e5e7eb;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
}


/* Shell */
.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-w);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

@media (min-width: 768px) {
  body.app-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #e5e7eb;
  }

  .app-shell {
    min-height: min(860px, calc(100dvh - 48px));
    height: min(860px, calc(100dvh - 48px));
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  }
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  padding-top: max(24px, calc(var(--safe-top) + 8px));
  background: var(--surface);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px 0;
}

.app-header-back {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -10px;
  color: #000000;
  border-radius: 8px;
}

.app-header-back i {
  font-size: 22px;
  line-height: 1;
}

.app-header-back:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.app-header-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}


.app-wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  line-height: normal;
}

.app-screen-title {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: normal;
  white-space: nowrap;
}

.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 8px 16px calc(8px + var(--safe-bottom));
  background: var(--surface);
}

.bottom-nav-bar {
  display: flex;
  padding: 6px 4px;
  background: #ffffff;
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  border-radius: 16px;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  min-width: 0;
}

.bottom-nav-item i {
  font-size: 22px;
  line-height: 1;
}

.bottom-nav-item span {
  white-space: nowrap;
}

.bottom-nav-item.active {
  color: var(--accent);
}

.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

.page-rule {
  display: block;
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--border);
}

.hutang-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hutang-label {
  font-size: 13px;
  color: var(--muted);
}

.hutang-value {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 46px;
  font-weight: 600;
  color: var(--accent);
}

.hutang-hint {
  font-size: 12px;
  color: var(--muted);
}

.sold-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sold-label {
  flex: 1;
  font-size: 14px;
  color: var(--muted);
}

.sold-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.list-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.debt-list {
  display: flex;
  flex-direction: column;
}

.debt-empty {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.debt-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debt-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.debt-name {
  font-size: 15px;
  color: var(--text);
}

.debt-amount {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
}

.cta-catat-bon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

a.cta-catat-bon {
  color: #ffffff;
}

.cta-catat-bon:active {
  opacity: 0.9;
}

.cta-catat-bon:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}


.pelanggan-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

.pelanggan-search,
.barang-search,
.bon-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pelanggan-search-row,
.barang-search-row,
.bon-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pelanggan-search-icon,
.barang-search-icon,
.bon-search-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

.pelanggan-search-text {
  flex: 1 1 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.pelanggan-search-input,
.barang-search-input,
.bon-search-input {
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}

.pelanggan-search-input::placeholder,
.barang-search-input::placeholder,
.bon-search-input::placeholder {
  color: var(--muted);
}

.pelanggan-search-input:focus,
.barang-search-input:focus,
.bon-search-input:focus {
  outline: none;
}

/* The rule under the row carries the focus state; the bare input has no outline of its own.
   Both forms anchor on the form: the rule is the row's sibling, not a descendant of it, so a
   `.pelanggan-search-row:focus-within .page-rule` selector would never match. */
.pelanggan-search:focus-within .page-rule,
.barang-search:focus-within .page-rule,
.bon-search:focus-within .page-rule {
  background: var(--text);
}

.pelanggan-list-title,
.barang-list-title,
.bon-list-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pelanggan-card-stack,
.barang-card-stack,
.bon-card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pelanggan-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pelanggan-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: var(--surface);
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  border-radius: 10px;
}

a.pelanggan-card {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.pelanggan-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Toggled by the live search in custom/features/pelanggan/index.js, custom/features/barang/index.js
   and custom/features/bon/index.js. */
.pelanggan-hidden,
.barang-hidden,
.bon-hidden {
  display: none;
}



.pelanggan-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.pelanggan-card-meta {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.pelanggan-load-more,
.barang-load-more,
.bon-load-more {
  width: 100%;
  min-height: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  outline: 1px solid var(--text);
  outline-offset: -0.5px;
  cursor: pointer;
}

.pelanggan-load-more:active,
.barang-load-more:active,
.bon-load-more:active {
  opacity: 0.9;
}

.pelanggan-load-more:focus-visible,
.barang-load-more:focus-visible,
.bon-load-more:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Tambah Pelanggan form */
.pelanggan-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 8px;
  padding-bottom: 24px;
}

.pelanggan-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
}

.pelanggan-field-label {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: normal;
}

.pelanggan-field-input {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  outline: none;
  resize: none;
}

.pelanggan-field-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.pelanggan-field-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.pelanggan-field-textarea {
  min-height: 2.8em;
}

.pelanggan-field-value {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
}


.pelanggan-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.pelanggan-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.pelanggan-btn:active {
  opacity: 0.9;
}

.pelanggan-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.pelanggan-btn-batal {
  background: #000000;
  color: #ffffff;
}

a.pelanggan-btn-batal {
  color: #ffffff;
}

.pelanggan-btn-simpan {
  background: var(--accent);
  color: #ffffff;
}

a.pelanggan-btn-simpan {
  color: #ffffff;
}

/* Destructive action: the notebook's error red (#B00020), shared by every Hapus entry point. */
.pelanggan-btn-hapus {
  background: #B00020;
  color: #ffffff;
}

a.pelanggan-btn-hapus {
  color: #ffffff;
}

.pelanggan-field-error {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.4;
  color: #B00020;
}

.pelanggan-field-error.field-validation-valid,
.pelanggan-field-error.validation-summary-valid {
  display: none;
}

.pelanggan-field:has(.input-validation-error) .page-rule {
  background: #B00020;
}

.pelanggan-notice {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.pelanggan-search-empty,
.barang-search-empty,
.bon-search-empty {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

/* ── Pelanggan empty state ── */
.pelanggan-empty {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100%;
  padding-bottom: 24px;
}

.pelanggan-empty-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.pelanggan-empty-art {
  width: 220px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pelanggan-empty-lottie {
  width: 200px;
  height: 200px;
}

.pelanggan-empty-copy {
  margin: 0;
  font-size: 15px;
  line-height: 21px;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  max-width: 280px;
}

.pelanggan-empty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  background: var(--accent);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}

.pelanggan-empty-btn:hover {
  opacity: 0.92;
}

.pelanggan-empty-btn:active {
  opacity: 0.85;
}

.pelanggan-empty-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ── Pelanggan delete confirmation ── */
.pelanggan-delete {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100%;
  padding-bottom: 24px;
}

.pelanggan-delete-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.pelanggan-delete-art {
  width: 220px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pelanggan-delete-lottie {
  width: 180px;
  height: 180px;
}

.pelanggan-delete-copy {
  margin: 0;
  font-size: 15px;
  line-height: 21px;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  max-width: 280px;
}

.pelanggan-delete-actions {
  margin-top: 0;
}

.barang-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

.barang-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.barang-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  border-radius: 10px;
}

a.barang-card {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.barang-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.barang-card-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.barang-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.barang-card-unit {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.barang-card-price {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Detail sheet: the price is the screen's focal number, one step above the list's 16px. */
.barang-detail-price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.barang-notice,
.bon-notice {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

/* A failed write reports in the same spot as a confirmation, so the page never explains itself twice. */
.bon-notice--error {
  color: #B00020;
}

/* ── Barang empty state ── */
.barang-empty {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100%;
  padding-bottom: 24px;
}

.barang-empty-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.barang-empty-art {
  width: 220px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.barang-empty-lottie {
  width: 200px;
  height: 200px;
}

.barang-empty-copy {
  margin: 0;
  font-size: 15px;
  line-height: 21px;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  max-width: 280px;
}

/* ── Bon empty state ── */
.bon-empty {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100%;
  padding-bottom: 24px;
}

.bon-empty-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.bon-empty-art {
  width: 220px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bon-empty-lottie {
  width: 200px;
  height: 200px;
}

.bon-empty-copy {
  margin: 0;
  font-size: 15px;
  line-height: 21px;
  font-weight: 400;
  color: var(--text);
  text-align: center;
  max-width: 280px;
}

.bon-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

.bon-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bon-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  border-radius: 10px;
}
a.bon-card {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.bon-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}



.bon-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bon-card-no {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.bon-card-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-card-status--lunas {
  color: var(--muted);
}

.bon-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-card-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.bon-amounts {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bon-amount-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bon-amount-col--end {
  align-items: flex-end;
  text-align: right;
}

.bon-amount-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.bon-amount-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-field-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.bon-field-with-icon .pelanggan-field-input {
  padding-right: 24px;
}

.bon-field-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  pointer-events: none;
}

.bon-money-input {
  font-family: var(--font-display);
  font-weight: 600;
}

.bon-money-input::placeholder {
  font-family: var(--font-display);
  font-weight: 600;
}

.bon-daftar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.bon-daftar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-tambah {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: none;
}

.bon-tambah .bi {
  font-size: 16px;
  line-height: 1;
  color: var(--text);
}

.bon-tambah:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

.bon-line {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  background: var(--surface);
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  border-radius: 10px;
}

.bon-line .page-rule {
  margin: 0;
}

.bon-line-metrics {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.bon-line-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bon-line-col--qty {
  flex: 0 0 auto;
}

.bon-line-money {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-line-satuan {
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
}

.bon-line-qty {
  width: 3.25rem;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  -moz-appearance: textfield;
}

.bon-line-qty::-webkit-outer-spin-button,
.bon-line-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bon-line-qty:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bon-line-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bon-hapus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  flex-shrink: 0;
  cursor: pointer;
  pointer-events: none;
}

.bon-hapus .bi {
  font-size: 20px;
  line-height: 1;
  color: var(--text);
}

.bon-hapus:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 8px;
}

.bon-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 0;
}

.bon-total-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-total-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-picker-trigger {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 24px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.bon-picker-trigger.is-empty {
  color: var(--muted);
}

/* The form row keeps the export's compact height, not the sheet rows' 44px target. */
.bon-customer-trigger {
  min-height: 0;
  padding: 0;
}

.bon-picker-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.bon-picker {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 60;
}

.bon-picker.is-open {
  display: block;
}

.bon-picker-scrim {
  position: absolute;
  inset: 0;
  background: #00000099;
}

.bon-picker-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(70%, calc(100% - 72px));
  padding: 16px 20px 24px;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.bon-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.bon-picker-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: normal;
  white-space: nowrap;
}

.bon-picker-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.bon-picker-close i {
  font-size: 20px;
  line-height: 1;
}

.bon-picker-close:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.bon-picker-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.bon-picker-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}

.bon-picker-search-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

.bon-picker-search-text {
  flex: 1 1 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}

.bon-picker-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.bon-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 12px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.bon-picker-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.bon-picker-item-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bon-picker-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-picker-item-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

.bon-picker-item-price {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.page-placeholder {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}


/* Shared content helpers (ready when pages need them) */
.page-section {
  margin-bottom: 20px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  border-color: #d1d5db;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.icon-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  margin-bottom: 20px;
}

.icon-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-align: center;
}

.icon-menu-item .menu-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--primary-soft);
  color: var(--text);
}

.icon-menu-item span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.content-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.content-card .card-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--primary-soft);
}

.content-card .card-body {
  flex: 1;
  min-width: 0;
}

.content-card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
}

.content-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.page-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
}

.page-panel h1 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 650;
}

.page-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Bon detail sheet */

.bon-detail-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.bon-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bon-detail-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.bon-detail-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.bon-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  border-radius: 10px;
}

.bon-summary-title {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.bon-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bon-summary-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.bon-summary-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-summary-value--lg {
  font-size: 20px;
}

.bon-detail-actions {
  display: flex;
  gap: 12px;
}

.bon-action {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.bon-action--bayar {
  background: var(--text);
  color: #ffffff;
}

.bon-action--barang {
  background: var(--accent);
  color: #ffffff;
}

/* Destructive action: a settled page can only be removed, so its one action keeps the Hapus red. */
.bon-action--hapus {
  background: #B00020;
  color: #ffffff;
}

a.bon-action--hapus {
  color: #ffffff;
}

.bon-action:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.bon-detail-section {
  display: flex;
  flex-direction: column;
}

.bon-detail-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.bon-detail-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.bon-history {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}

.bon-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.bon-history-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bon-history-jenis {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.bon-history-date {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.bon-history-amount {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 0;
}

.bon-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.bon-item-rinci {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.bon-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bon-item-date {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.bon-item-sub {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.bon-item-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.bon-item-total-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.bon-item-total-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Catat pembayaran sheet */

.bon-pay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 60;
}

.bon-pay.is-open {
  display: block;
}

.bon-pay-scrim {
  position: absolute;
  inset: 0;
  background: #00000099;
}

.bon-pay-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: min(90%, calc(100% - 72px));
  padding: 16px 20px 24px;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bon-pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.bon-pay-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: normal;
  white-space: nowrap;
}

.bon-pay-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.bon-pay-close i {
  font-size: 20px;
  line-height: 1;
}

.bon-pay-close:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.bon-pay-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.bon-pay-sheet .pelanggan-field {
  flex-shrink: 0;
}

.bon-pay-submit {
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
}

.bon-pay-submit:active {
  opacity: 0.9;
}

.bon-pay-submit:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Tanggal picker: the Catat pembayaran sheet and the Create form share this row and the popup. */

.bon-date-trigger {
  min-height: 0;
  font-weight: 600;
  line-height: 1.4;
}

.bon-date-trigger.is-empty {
  color: var(--muted);
}

.bon-date-icon {
  color: var(--accent);
}

.bon-cal {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* The Create form paints the calendar on the shell instead of inside a sheet, so it needs the
   sheet layer to sit above the header and the bottom nav. */
.bon-cal--page {
  z-index: 60;
}

.bon-cal.is-open {
  display: block;
}

.bon-cal-scrim {
  position: absolute;
  inset: 0;
  background: #0000004D;
}

.bon-cal-popup {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100% - 24px);
  padding: 16px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 8px 28px #00000026;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bon-cal-popup:focus {
  outline: none;
}

.bon-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bon-cal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: normal;
  white-space: nowrap;
}

.bon-cal-nav {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.bon-cal-nav i {
  font-size: 20px;
  line-height: 1;
}

.bon-cal-nav:focus-visible,
.bon-cal-day:focus-visible,
.bon-cal-clear:focus-visible,
.bon-cal-today:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.bon-cal-weekdays,
.bon-cal-week {
  display: flex;
  gap: 2px;
}

.bon-cal-weekdays span {
  flex: 1 1 0;
  min-width: 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  line-height: normal;
  text-align: center;
}

.bon-cal-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bon-cal-day {
  flex: 1 1 0;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  line-height: normal;
  cursor: pointer;
}

.bon-cal-day.is-outside {
  color: #767676;
}

.bon-cal-day.is-today {
  color: var(--accent);
}

.bon-cal-day.is-selected {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.bon-cal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bon-cal-clear {
  height: 44px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
}

.bon-cal-today {
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  cursor: pointer;
}

/* Tambah barang sheet */

.bon-add {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 60;
}

.bon-add.is-open {
  display: block;
}

.bon-add-scrim {
  position: absolute;
  inset: 0;
  background: #00000099;
}

.bon-add-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(70%, calc(100% - 72px));
  padding: 16px 20px 24px;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.bon-add-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.bon-add-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: normal;
  white-space: nowrap;
}

.bon-add-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.bon-add-close i {
  font-size: 20px;
  line-height: 1;
}

.bon-add-close:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.bon-add-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.bon-add-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}

.bon-add-search-icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

.bon-add-search-input,
.bon-picker-search-input {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  line-height: normal;
  appearance: none;
  -webkit-appearance: none;
}

.bon-add-search-input::placeholder,
.bon-picker-search-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.bon-add-search-input:focus,
.bon-picker-search-input:focus {
  outline: none;
}

/* The rule under the row carries the focus state, like the list searches. */
.bon-add-search:focus-within .page-rule,
.bon-picker-search:focus-within .page-rule {
  background: var(--text);
}

/* The form is the sheet's growing row, so the list inside it keeps the scroll. */
.bon-add-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.bon-add-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

/* The sheet's rows from the export: the pick keeps name, unit, and price, and a quantity stepper sits
   beside it. The `.bon-add-sheet` scoping leaves the Create picker, which asks for the same partial
   without steppers, on its original row. */
.bon-add-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bon-add-sheet .bon-add-item {
  padding: 12px 0;
}

.bon-add-sheet .bon-add-item .bon-picker-item {
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
  min-height: 0;
  padding: 0;
}

/* A long stock name stays on one line and never pushes the stepper out of the row. */
.bon-add-sheet .bon-picker-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The export draws both lines at `normal`, which keeps the row at its 60px height. */
.bon-add-sheet .bon-picker-item-name,
.bon-add-sheet .bon-picker-item-unit {
  line-height: normal;
}

.bon-add-stepper {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 2px;
  border-radius: 8px;
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
}

.bon-add-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.bon-add-step i {
  font-size: 14px;
  line-height: 1;
}

.bon-add-step--plus {
  color: var(--text);
}

.bon-add-step:active {
  opacity: 0.9;
}

.bon-add-step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 6px;
}

.bon-add-step-value {
  width: 24px;
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  color: var(--text);
  text-align: center;
}

/* Pilih pelanggan sheet */

.bon-barang-row[hidden],
.bon-customer-row[hidden] {
  display: none;
}

.bon-customer-item-sisa--lunas {
  color: var(--muted);
}

.bon-customer-empty {
  margin: 0;
  padding: 12px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}

.bon-customer-empty[hidden] {
  display: none;
}

.bon-picker-load-more {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  outline: 1px solid var(--text);
  outline-offset: -0.5px;
  cursor: pointer;
}

.bon-picker-load-more:active {
  opacity: 0.9;
}

.bon-picker-load-more:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Masuk (login) */

.auth-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  /* Mirrors the shell header offset (.app-header padding-top + .app-header-inner's 8px) so the
     login wordmark sits on the same line as the wordmark on every other page. */
  padding: calc(max(24px, calc(var(--safe-top) + 8px)) + 8px) 20px calc(24px + var(--safe-bottom));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* The shell is a fixed phone frame, so the login column can outgrow it on a short
     window. The scroll stays (wheel, touch, keyboard) but the classic desktop
     scrollbar is dropped: it would paint over the frame's right edge and shift the
     column by its width. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.auth-main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.auth-page {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 24px;
}

.auth-head {
  display: flex;
  flex-direction: column;
  /* Same 4px rhythm as .app-header-text, so the wordmark and the screen title line up with
     every other page. The type itself comes from .app-wordmark and .app-screen-title. */
  gap: 4px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-mark {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 14px;
  overflow: hidden;
}

.auth-nota {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 32px;
  height: 37px;
  padding-top: 7px;
  background: var(--accent);
  border-radius: 4px;
  overflow: hidden;
}

.auth-nota-rp {
  font-size: 11px;
  font-weight: 700;
  line-height: 11px;
  letter-spacing: -0.4px;
  color: #ffffff;
}

.auth-nota-check {
  font-size: 10px;
  line-height: 1;
  color: #ffffff;
}

/* The white corner fold from the export, clipped to the receipt. */
.auth-nota-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #ffffff;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.auth-brand-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-tagline {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: var(--muted);
  white-space: nowrap;
}

.auth-desc {
  margin: 0;
  width: 100%;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  color: var(--muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field:focus-within .page-rule {
  background: var(--text);
}

.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
}

.auth-forgot {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 -4px 0 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  cursor: pointer;
}

.auth-forgot:active {
  opacity: 0.9;
}

.auth-forgot:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  text-align: center;
  cursor: pointer;
}

.auth-btn:active {
  opacity: 0.9;
}

.auth-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.auth-btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.auth-btn-secondary {
  background: var(--surface);
  color: var(--text);
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
}

.auth-spacer {
  flex: 1 1 auto;
  min-height: 24px;
}

.auth-note {
  margin: 0;
  font-size: 12px;
  line-height: 17px;
  font-weight: 400;
  color: var(--muted);
}

/* --- Account management, sign-in feedback, and the signed-in header ------------------------- */

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b42318;
  font-size: 13px;
  line-height: 18px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  color: var(--muted);
  font-size: 13px;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.app-header-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.app-user-chip {
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.app-header-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}

.app-header-link:active {
  opacity: 0.9;
}

.app-header-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.app-logout {
  margin: 0;
}

.bottom-nav--single .bottom-nav-bar {
  justify-content: center;
}

.bottom-nav--single .bottom-nav-item {
  flex: 0 1 88px;
}

.pelanggan-notice--error {
  color: #b42318;
}

/* Kelola pengguna */

.pengguna-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
}

.pengguna-list {
  display: flex;
  flex-direction: column;
}

.pengguna-rule {
  background: #E8EBEF;
}

.pengguna-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 0;
}

.pengguna-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pengguna-card-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
}

.pengguna-card-role {
  color: var(--muted);
  font-size: 13px;
  line-height: normal;
}

.pengguna-card-activity {
  color: var(--muted);
  font-size: 12px;
  line-height: normal;
}

.pengguna-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: normal;
}

.pengguna-badge--aktif {
  outline-color: var(--accent);
  color: #145FBD;
}

.pengguna-badge--nonaktif {
  outline-color: var(--border);
  color: var(--muted);
}

.pengguna-card-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Open state: the export swaps the whole action row for the reset form. */
.pengguna-card-actions:has(.pengguna-reset[open]) {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.pengguna-card-actions:has(.pengguna-reset[open]) .pengguna-status-form {
  display: none;
}

.pengguna-reset {
  flex: 1 1 0;
  min-width: 0;
}

.pengguna-reset[open] {
  flex: none;
  width: 100%;
}

/* Closed, the summary is the export's text link; open, it becomes the form title. */
.pengguna-reset summary {
  display: flex;
  align-items: center;
  height: 44px;
  color: #145FBD;
  font-size: 13px;
  line-height: normal;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.pengguna-reset[open] summary {
  height: auto;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.pengguna-reset summary::-webkit-details-marker {
  display: none;
}

.pengguna-reset summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

.pengguna-reset-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.pengguna-reset-input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  outline: 1px solid #BFC7D1;
  outline-offset: -0.5px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: normal;
}

.pengguna-reset-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.pengguna-reset-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -0.5px;
}

.pengguna-reset-actions {
  display: flex;
  gap: 8px;
}

.pengguna-reset-cancel,
.pengguna-reset-save {
  flex: 1 1 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pengguna-reset-cancel {
  background: var(--surface);
  outline: 1px solid #BFC7D1;
  outline-offset: -0.5px;
  color: #17324D;
}

.pengguna-reset-save {
  background: var(--accent);
  color: #ffffff;
}

.pengguna-reset-cancel:active,
.pengguna-reset-save:active {
  opacity: 0.9;
}

.pengguna-reset-cancel:focus-visible,
.pengguna-reset-save:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.pengguna-status-form {
  flex-shrink: 0;
  margin: 0;
}

.pengguna-status-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 98px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  outline: 1px solid var(--border);
  outline-offset: -0.5px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
  cursor: pointer;
}

.pengguna-status-btn--nonaktif {
  outline-color: #B9002A;
  color: #A40024;
}

.pengguna-status-btn--aktif {
  outline-color: var(--accent);
  color: #145FBD;
}

.pengguna-status-btn:active {
  opacity: 0.9;
}

.pengguna-status-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.pengguna-cta {
  font-size: 15px;
  font-weight: 400;
}
