:root {
    --navy: #0f2744;
    --blue: #2563eb;
    --blue-light: #eef4ff;
    --teal: #0d9488;
    --ink: #162c47;
    --muted: #66768b;
    --line: #e5ebf2;
    --bg: #f4f7fb;
    --white: #fff;
    --danger: #dc2626;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(25, 47, 76, 0.05);
  }
  * {
    box-sizing: border-box;
  }
  body {
    margin: 0;
    font-family:
      Inter,
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      Arial,
      sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
  }
  button,
  input,
  select,
  textarea {
    font: inherit;
  }
  button,
  a,
  input,
  select,
  textarea {
    -webkit-tap-highlight-color: transparent;
  }
  button {
    cursor: pointer;
  }
  button:disabled {
    opacity: 0.55;
    cursor: wait;
  }
  a {
    color: var(--blue);
    text-decoration: none;
  }
  h1,
  h2,
  h3,
  h4,
  p {
    margin: 0;
  }
  h1 {
    font-size: 24px;
    letter-spacing: -0.7px;
    line-height: 1.3;
  }
  h2 {
    font-size: 20px;
    letter-spacing: -0.4px;
  }
  h3 {
    font-size: 16px;
  }
  h4 {
    font-size: 14px;
  }
  small {
    font-size: 12px;
  }
  strong {
    font-weight: 650;
  }
  svg.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }
  .svg-symbols {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
  }
  :focus-visible {
    outline: 3px solid #93b4fd;
    outline-offset: 3px;
  }
  .hidden,
  [hidden] {
    display: none !important;
  }
  .muted {
    color: var(--muted);
  }
  .eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.7px;
    color: var(--muted);
    margin-bottom: 5px;
  }
  .only-desktop {
    display: none !important;
  }
  .sidebar {
    display: none;
  }
  .app-shell {
    min-height: 100vh;
    padding-bottom: 94px;
  }
  .topbar {
    padding: 22px 18px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  #main-content {
    padding: 20px 16px;
    max-width: 1500px;
    margin: auto;
  }
  .page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
  }
  .page-head p {
    color: var(--muted);
    margin-top: 5px;
  }
  .button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: #fff;
    font-weight: 650;
    font-size: 13px;
    transition: background 0.15s;
    white-space: nowrap;
  }
  .button:hover {
    background: #f5f8ff;
  }
  .button.primary {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
  }
  .button.primary:hover {
    background: #1d4ed8;
  }
  .button.soft {
    background: var(--blue-light);
    color: var(--blue);
    border-color: transparent;
  }
  .button.whatsapp {
    background: #e7f8ef;
    color: #128346;
    border-color: #c7ead6;
  }
  .button.danger {
    color: var(--danger);
    background: #fff1f1;
    border-color: #ffd8d8;
  }
  .button.small {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 12px;
  }
  .button.large {
    padding: 13px 20px;
    min-height: 48px;
  }
  .icon-button {
    border: 1px solid var(--line);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
  }
  .icon-button:hover {
    color: var(--blue);
    background: var(--blue-light);
  }
  .button .icon {
    width: 17px;
    height: 17px;
  }
  .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .mobile-new {
    width: 100%;
    margin-bottom: 20px;
  }
  .panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .panel.pad {
    padding: 18px;
  }
  .panel-heading {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
  }
  .panel-heading .subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
  }
  .section-grid {
    display: grid;
    gap: 18px;
    margin: 20px 0;
  }
  .stack {
    display: grid;
    gap: 16px;
  }
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    min-width: 0;
    box-shadow: var(--shadow);
  }
  .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--blue-light);
    color: var(--blue);
    margin-bottom: 12px;
  }
  .stat-icon.teal {
    background: #e8f8f4;
    color: #098576;
  }
  .stat-icon.amber {
    background: #fff5df;
    color: #b9790a;
  }
  .stat-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 550;
  }
  .stat-value {
    font-size: 23px;
    font-weight: 750;
    letter-spacing: -0.7px;
    margin: 3px 0;
    overflow-wrap: anywhere;
  }
  .stat-card.money .stat-value {
    font-size: 19px;
  }
  .stat-hint {
    font-size: 10px;
    color: var(--muted);
  }
  .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 750;
    padding: 4px 8px;
    border-radius: 7px;
    white-space: nowrap;
    line-height: 1.5;
    background: #e9eff6;
    color: #53637a;
  }
  .status-diterima {
    background: #edf1f8;
    color: #5b6d84;
  }
  .status-dicuci {
    background: #e8f0ff;
    color: #2460cd;
  }
  .status-dikeringkan {
    background: #e0f6fa;
    color: #0b8195;
  }
  .status-disetrika {
    background: #f1eafd;
    color: #7b4cb6;
  }
  .status-siap {
    background: #fff0d4;
    color: #a66803;
  }
  .status-selesai,
  .paid {
    background: #def7e9;
    color: #137747;
  }
  .status-dibatalkan {
    background: #fde8e8;
    color: #bc3434;
  }
  .unpaid {
    background: #fff0d8;
    color: #a86a08;
  }
  .desktop-table {
    display: none;
  }
  .table-wrap {
    overflow: auto;
  }
  table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
  }
  th {
    text-align: left;
    background: #f9fbfe;
    font-size: 11px;
    letter-spacing: 0.2px;
    color: var(--muted);
    font-weight: 650;
    padding: 12px 18px;
    white-space: nowrap;
  }
  td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
  }
  tbody tr:last-child td {
    border-bottom: 0;
  }
  tbody tr:hover {
    background: #fafcff;
  }
  .text-right {
    text-align: right;
  }
  .table-sub {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px;
  }
  .link-button {
    border: 0;
    padding: 0;
    background: none;
    color: var(--blue);
    font-weight: 650;
    text-align: left;
    cursor: pointer;
  }
  .mobile-cards {
    padding: 4px 16px;
  }
  .order-card {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
  }
  .order-card:last-child {
    border-bottom: 0;
  }
  .card-top,
  .card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .card-top {
    margin-bottom: 8px;
  }
  .card-bottom {
    margin-top: 12px;
  }
  .card-customer {
    font-size: 15px;
    font-weight: 650;
  }
  .card-meta {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
  }
  .card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .card-total {
    font-weight: 750;
  }
  .order-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
  }
  .order-mini:last-child {
    border-bottom: 0;
  }
  .order-mini small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
  }
  .order-mini .right {
    text-align: right;
  }
  .order-mini .badge {
    margin-top: 5px;
  }
  .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 16px;
    align-items: center;
  }
  .search-field {
    position: relative;
    flex: 1;
    min-width: 180px;
  }
  .search-field .icon {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #95a1b1;
    width: 18px;
    height: 18px;
  }
  .search-field input {
    padding-left: 38px;
  }
  .filters input,
  .filters select {
    min-height: 42px;
  }
  .date-filter {
    flex: 1;
    min-width: 130px;
  }
  .filter-label {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin: 0 0 4px;
  }
  .filter-tabs {
    display: flex;
    gap: 7px;
    overflow: auto;
    padding: 0 0 4px;
    margin-bottom: 14px;
  }
  .filter-tab {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    padding: 8px 13px;
    border-radius: 9px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
  }
  .filter-tab.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
  }
  .list-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
  }
  .pagination {
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
  }
  .pagination .button-row {
    flex-wrap: nowrap;
  }
  .empty {
    padding: 40px 18px;
    text-align: center;
    color: var(--muted);
  }
  .empty .empty-icon {
    display: inline-flex;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    color: #7492bd;
    background: #eff4fb;
    margin-bottom: 12px;
  }
  .empty h3 {
    color: var(--ink);
    margin-bottom: 5px;
  }
  .empty p {
    font-size: 12px;
    max-width: 330px;
    margin: 0 auto 15px;
  }
  .notice {
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 12px;
    background: #edf4ff;
    color: #486895;
    line-height: 1.7;
  }
  .notice.warning {
    background: #fff5e1;
    color: #97651c;
  }
  .notice.error {
    background: #fff0f0;
    color: #b63232;
  }
  .chart {
    padding: 20px 18px 16px;
  }
  .chart svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 200px;
  }
  .chart-caption {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
    margin-top: 10px;
  }
  .chart-total {
    font-weight: 750;
    font-size: 22px;
    margin: 3px 0 14px;
  }
  .skeleton {
    background: linear-gradient(90deg, #e9eef6 25%, #f6f8fc 50%, #e9eef6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 14px;
  }
  .skeleton-title {
    height: 25px;
    width: 190px;
    margin-bottom: 20px;
  }
  .stat-skeleton {
    height: 140px;
  }
  .panel-skeleton {
    height: 300px;
    margin-top: 20px;
  }
  .skeleton-row {
    height: 56px;
    margin: 12px 0;
  }
  .spinner {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin 0.7s linear infinite;
    display: inline-block;
  }
  .error-box {
    padding: 28px;
    text-align: center;
  }
  .error-box p {
    margin: 8px 0 16px;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 74px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: #fff;
    border-top: 1px solid var(--line);
    z-index: 20;
    box-shadow: 0 -3px 20px rgba(20, 40, 70, 0.04);
    height: calc(74px + env(safe-area-inset-bottom));
  }
  .bottom-nav button {
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    font-size: 9px;
    font-weight: 600;
    color: #8995a7;
    min-width: 0;
    padding: 5px 1px;
  }
  .bottom-nav button.active {
    color: var(--blue);
  }
  .bottom-nav button .icon {
    width: 21px;
    height: 21px;
  }
  .bottom-add > span:first-child {
    background: var(--blue);
    width: 34px;
    height: 34px;
    border-radius: 11px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -8px;
  }
  .bottom-nav .bottom-add {
    color: var(--blue);
  }
  label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
  }
  input,
  select,
  textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dce4ee;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    outline: none;
    min-width: 0;
    min-height: 42px;
  }
  input:focus,
  select:focus,
  textarea:focus {
    border-color: #729af1;
    box-shadow: 0 0 0 3px #2563eb0d;
  }
  input:disabled,
  input[readonly] {
    background: #f5f7fa;
    color: #758399;
  }
  textarea {
    resize: vertical;
    min-height: 80px;
  }
  .help {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
  }
  .required {
    color: #dc2626;
  }
  .form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  .form-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
  }
  .form-section:first-child {
    padding-top: 0;
  }
  .form-section:last-child {
    border: 0;
    padding-bottom: 0;
  }
  .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
  }
  .section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 8px;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
  }
  .field-full {
    grid-column: 1/-1;
  }
  .form-error {
    font-size: 12px;
    color: #bc3232;
    background: #fff0f0;
    border-radius: 9px;
    padding: 10px 12px;
    margin: 12px 0;
    display: none;
  }
  .form-error.visible {
    display: block;
  }
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 27, 49, 0.48);
    backdrop-filter: blur(3px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
  }
  .modal {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 820px;
    max-height: calc(100dvh - 24px);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .modal.wide {
    max-width: 1040px;
  }
  .modal.narrow {
    max-width: 460px;
  }
  .modal-header {
    padding: 17px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    gap: 16px;
    flex-shrink: 0;
  }
  .modal-header h2 {
    font-size: 18px;
  }
  .modal-header small {
    color: var(--muted);
  }
  .modal-body {
    padding: 18px;
    overflow: auto;
    overscroll-behavior: contain;
  }
  .modal-footer {
    padding: 14px 18px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    background: #fbfcff;
    flex-shrink: 0;
  }
  .modal form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  .modal form .modal-body {
    flex: 1;
    min-height: 0;
  }
  .customer-search {
    position: relative;
  }
  .customer-suggestions {
    position: absolute;
    top: 100%;
    margin-top: 4px;
    left: 0;
    right: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 20px #162c471a;
    z-index: 5;
    max-height: 240px;
    overflow: auto;
  }
  .customer-option {
    display: block;
    text-align: left;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    background: #fff;
  }
  .customer-option:last-child {
    border: 0;
  }
  .customer-option:hover {
    background: var(--blue-light);
  }
  .customer-option strong,
  .customer-option small {
    display: block;
  }
  .customer-option small {
    color: var(--muted);
  }
  .customer-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0d8a6e;
    margin-top: 6px;
    font-size: 11px;
  }
  .line-items {
    display: grid;
    gap: 10px;
  }
  .line-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border: 1px solid var(--line);
    padding: 13px;
    border-radius: 12px;
    background: #fafcff;
    align-items: end;
  }
  .line-service {
    grid-column: 1/-1;
  }
  .line-item label {
    font-size: 10px;
    color: var(--muted);
  }
  .line-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    grid-column: 1/-1;
    gap: 12px;
  }
  .line-subtotal span {
    font-weight: 700;
  }
  .line-subtotal small {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 10px;
  }
  .remove-line {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 0;
    background: #fdeaea;
    color: #c94141;
  }
  .remove-line .icon {
    width: 15px;
    height: 15px;
  }
  .totals-box {
    background: #f6f9fd;
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
  }
  .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 7px 0;
    font-size: 13px;
  }
  .total-row.grand {
    font-size: 20px;
    font-weight: 750;
    padding-top: 12px;
    border-top: 1px solid #dde6f1;
    margin-top: 12px;
  }
  .total-row.balance {
    font-weight: 650;
    color: #aa6c0a;
  }
  .payment-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
  .payment-choice {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 5px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    background: #fff;
    color: var(--muted);
  }
  .payment-choice.active {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-light);
  }
  .detail-hero {
    padding: 18px;
    background: #f4f8ff;
    border-radius: 12px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
  }
  .detail-hero h2 {
    font-size: 22px;
    margin-top: 4px;
  }
  .detail-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
  }
  .detail-data small {
    display: block;
    color: var(--muted);
    margin-bottom: 3px;
  }
  .detail-data strong {
    overflow-wrap: anywhere;
  }
  .detail-lines {
    width: 100%;
    margin-bottom: 16px;
    table-layout: fixed;
  }
  .detail-lines th,
  .detail-lines td {
    padding: 10px 6px;
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .detail-lines th:nth-child(1) {
    width: 40%;
  }
  .detail-lines th:nth-child(2) {
    width: 15%;
  }
  .detail-lines th:nth-child(3) {
    width: 22%;
  }
  .detail-lines th:nth-child(4) {
    width: 23%;
  }
  .detail-note {
    white-space: pre-wrap;
    background: #fff9ec;
    border-radius: 10px;
    padding: 12px;
    font-size: 12px;
    color: #8b6a34;
    margin-top: 15px;
  }
  .history-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    gap: 12px;
    font-size: 12px;
  }
  .history-line:last-child {
    border: 0;
  }
  .history-line small {
    color: var(--muted);
    display: block;
  }
  .detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .settings-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    font-weight: 650;
    color: var(--ink);
  }
  .shortcut .icon {
    color: var(--blue);
  }
  .shortcut small {
    display: block;
    font-weight: 400;
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px;
  }
  .service-grid {
    display: grid;
    gap: 14px;
  }
  .service-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
  }
  .service-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .service-price {
    font-size: 23px;
    font-weight: 750;
    margin: 16px 0 3px;
    letter-spacing: -0.5px;
  }
  .service-price small {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
  }
  .service-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .logo-preview {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fafcff;
  }
  .toast-root {
    position: fixed;
    right: 14px;
    left: 14px;
    top: 14px;
    z-index: 90;
    display: grid;
    gap: 8px;
    pointer-events: none;
    max-width: 410px;
    margin-left: auto;
  }
  .toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f2744;
    color: #fff;
    padding: 13px 16px;
    box-shadow: 0 4px 20px #0002;
    border-radius: 11px;
    font-size: 12px;
    animation: toast-in 0.2s ease;
  }
  .toast.error {
    background: #a93232;
  }
  .toast.success {
    background: #137d62;
  }
  .receipt-preview {
    background: #edf1f7;
    border-radius: 12px;
    padding: 18px;
    overflow: auto;
    margin-top: 14px;
  }
  .receipt {
    color: #000;
    background: #fff;
    padding: 4mm;
    font-family: Arial, sans-serif;
    font-size: 11px;
    line-height: 1.45;
    word-break: break-word;
    margin: 0 auto;
    max-width: 100%;
    box-sizing: border-box;
  }
  .receipt.size-58 {
    width: 58mm;
    font-size: 10px;
    padding: 3mm;
  }
  .receipt.size-80 {
    width: 80mm;
    font-size: 11px;
    padding: 4mm;
  }
  .receipt.size-a4 {
    width: 180mm;
    font-size: 13px;
    padding: 8mm;
  }
  .receipt .r-logo {
    max-width: 42px;
    max-height: 42px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
  }
  .receipt .r-center {
    text-align: center;
  }
  .receipt h3 {
    font-size: 16px;
    margin-bottom: 5px;
  }
  .receipt .r-rule {
    border-top: 1px dashed #777;
    margin: 9px 0;
  }
  .receipt .r-kv {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0;
  }
  .receipt .r-kv strong {
    max-width: 65%;
    text-align: right;
  }
  .receipt table {
    font-size: inherit;
    table-layout: fixed;
  }
  .receipt th,
  .receipt td {
    background: #fff;
    color: #000;
    padding: 4px 0;
    border: none;
    font-size: inherit;
    white-space: normal;
    vertical-align: top;
  }
  .receipt .r-item {
    font-weight: 600;
  }
  .receipt .r-total {
    font-size: 14px;
    font-weight: bold;
  }
  .receipt .r-footer {
    white-space: pre-wrap;
    margin-top: 10px;
  }
  .receipt .r-note {
    font-size: 10px;
    white-space: pre-wrap;
    margin-top: 6px;
  }
  .report-print {
    font-family: Arial, sans-serif;
    color: #111;
    font-size: 11px;
  }
  .report-print h1 {
    font-size: 22px;
  }
  .report-print h2 {
    font-size: 16px;
    margin: 15px 0 8px;
  }
  .report-print .rp-info {
    margin: 8px 0 16px;
  }
  .report-print table th,
  .report-print table td {
    font-size: 10px;
    border: 1px solid #ccc;
    padding: 6px;
    color: #111;
  }
  .report-print .rp-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .report-print .rp-summary > div {
    padding: 10px;
    border: 1px solid #ddd;
  }
  .report-print .rp-summary strong {
    display: block;
    font-size: 16px;
    margin-top: 3px;
  }
  #print-root {
    display: none;
  }
  .report-table {
    max-height: 440px;
    overflow: auto;
  }
  .report-table th {
    position: sticky;
    top: 0;
  }
  .report-mini-grid {
    display: grid;
    gap: 18px;
    margin-top: 18px;
  }
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  @keyframes shimmer {
    to {
      background-position: -200% 0;
    }
  }
  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @media (min-width: 600px) {
    .form-grid {
      grid-template-columns: 1fr 1fr;
    }
    .stats-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .service-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .modal-body {
      padding: 24px;
    }
    .modal-header,
    .modal-footer {
      padding-left: 24px;
      padding-right: 24px;
    }
    .line-item {
      grid-template-columns: 2.2fr 0.7fr 1fr 1fr;
      padding: 12px;
    }
    .line-service {
      grid-column: auto;
    }
    .line-subtotal {
      grid-column: auto;
    }
    .stat-card {
      padding: 20px;
    }
    .stat-card.money .stat-value {
      font-size: 22px;
    }
    .settings-form {
      max-width: 900px;
    }
    .panel.pad {
      padding: 24px;
    }
  }
  @media (min-width: 900px) {
    .only-desktop {
      display: inline-flex !important;
    }
    .mobile-new {
      display: none;
    }
    .sidebar {
      display: flex;
      flex-direction: column;
      width: 235px;
      position: fixed;
      inset: 0 auto 0 0;
      background: #fff;
      border-right: 1px solid var(--line);
      z-index: 25;
      padding: 28px 16px;
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 10px;
      margin-bottom: 38px;
    }
    .brand-icon {
      width: 40px;
      height: 44px;
      border-radius: 12px;
      background: var(--blue);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .brand-icon .icon {
      width: 26px;
      height: 26px;
    }
    .brand-name {
      display: block;
      font-size: 16px;
      max-width: 150px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .brand span:not(.brand-icon) {
      font-size: 10px;
      color: var(--muted);
    }
    .sidebar-label {
      font-size: 9px;
      letter-spacing: 1.5px;
      font-weight: 700;
      color: #9aa6b6;
      padding: 0 13px;
      margin-bottom: 12px;
    }
    .side-nav {
      display: grid;
      gap: 7px;
    }
    .nav-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      border: none;
      border-radius: 10px;
      background: transparent;
      color: #6c7b8f;
      font-size: 13px;
      font-weight: 550;
      text-align: left;
    }
    .nav-item.active {
      background: var(--blue-light);
      color: var(--blue);
      font-weight: 650;
    }
    .nav-item:hover {
      background: #f3f6fc;
    }
    .nav-item.new-order {
      color: var(--blue);
    }
    .sidebar-foot {
      margin-top: auto;
      padding: 15px 10px 0;
      font-size: 10px;
      color: var(--muted);
      display: flex;
      gap: 7px;
      align-items: flex-start;
    }
    .sidebar-foot small {
      display: block;
      font-size: 9px;
      margin-top: 4px;
    }
    .online-dot {
      width: 6px;
      height: 6px;
      background: #0da985;
      border-radius: 50%;
      margin-top: 5px;
    }
    .app-shell {
      margin-left: 235px;
      padding-bottom: 24px;
    }
    .bottom-nav {
      display: none;
    }
    .topbar {
      padding: 23px 32px;
    }
    .topbar-actions {
      font-size: 12px;
      color: var(--muted);
    }
    #main-content {
      padding: 28px 32px;
    }
    .stats-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
    }
    .section-grid {
      grid-template-columns: 1.65fr 1fr;
    }
    .desktop-table {
      display: block;
    }
    .mobile-cards {
      display: none;
    }
    .service-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .report-mini-grid {
      grid-template-columns: 1.5fr 1fr;
    }
    .toast-root {
      left: auto;
      right: 24px;
      top: 22px;
    }
    .page-head {
      margin-bottom: 24px;
    }
    .stat-value {
      font-size: 28px;
    }
    .panel-heading {
      padding: 20px 22px;
    }
  }
  @media (max-width: 380px) {
    #main-content {
      padding: 16px 12px;
    }
    .stat-card {
      padding: 12px;
    }
    .stat-card.money .stat-value {
      font-size: 17px;
    }
    .button {
      padding: 8px 11px;
    }
    .bottom-nav button {
      font-size: 8px;
    }
    .modal-overlay {
      padding: 5px;
    }
    .modal {
      max-height: calc(100dvh - 10px);
      border-radius: 14px;
    }
    .modal-body {
      padding: 14px;
    }
    .settings-shortcuts {
      gap: 8px;
    }
    .shortcut {
      padding: 12px;
      gap: 8px;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    * {
      animation: none !important;
      transition: none !important;
    }
  }
  @media print {
    html,
    body {
      margin: 0 !important;
      padding: 0 !important;
      background: #fff !important;
      color: #000 !important;
      min-height: 0 !important;
      height: auto !important;
    }
    body > *:not(#print-root) {
      display: none !important;
    }
    #print-root {
      display: block !important;
      width: 100%;
      background: #fff;
    }
    .receipt {
      box-shadow: none !important;
      margin: 0 auto !important;
      max-width: none !important;
    }
    .report-print {
      padding: 0;
    }
    .report-print thead {
      display: table-header-group;
    }
    .report-print tr {
      break-inside: avoid;
    }
    .report-print .rp-summary {
      break-inside: avoid;
    }
    .report-print table th,
    .report-print table td {
      background: #fff !important;
    }
    .r-kv,
    .r-item {
      break-inside: avoid;
    }
  }
/* Private installation login and database capacity. */
#auth-gate{position:fixed;inset:0;z-index:9999;background:linear-gradient(135deg,#eaf1fa,#f8fafc);display:grid;place-items:center;padding:24px;overflow-y:auto}
.login-card{width:min(100%,440px);background:#fff;padding:36px;border:1px solid #dce5f1;border-radius:24px;box-shadow:0 24px 70px #102b4614}
.login-brand{font-size:11px;letter-spacing:.16em;font-weight:800;color:#2677cf;margin-bottom:24px}
.login-card h1{font-size:26px;line-height:1.2;margin:0 0 12px;color:#102b46}
.login-card p{font-size:14px;color:#5a6f85;line-height:1.65;margin-bottom:22px}
.login-card label{display:block;font-weight:650;font-size:13px;margin:16px 0 7px}
.login-card input{display:block;width:100%;min-height:46px}
.login-card button{width:100%;justify-content:center;margin-top:16px;min-height:46px}
#login-error{color:#b42318;font-size:13px;line-height:1.5;margin-top:12px;min-height:20px}
.logged-out>:not(#auth-gate){visibility:hidden}
.usage-heading{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:14px;margin:16px 0 10px}
#storage-usage progress{width:100%;height:12px;accent-color:#2677cf}
.usage-warning{color:#a45d00;font-weight:600;line-height:1.5}
@media(max-width:480px){.login-card{padding:26px 22px;border-radius:20px}.login-card h1{font-size:24px}}
@media print{#auth-gate{display:none!important}}
