.psa-admin,
.psa-front {
    --psa-orange: #0b2a5b;
    --psa-yellow: #eaf2ff;
    --psa-green: #118c4f;
    --psa-blue: #123c7c;
    --psa-ink: #0f172a;
    --psa-muted: #64748b;
    --psa-line: #dbe4f0;
    color: var(--psa-ink);
    font-size: 18px;
}

.psa-admin *,
.psa-admin *::before,
.psa-admin *::after,
.psa-front *,
.psa-front *::before,
.psa-front *::after {
    box-sizing: border-box;
}

.psa-admin input,
.psa-admin select,
.psa-admin textarea,
.psa-front input,
.psa-front select,
.psa-front textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 46px;
    border: 2px solid var(--psa-line);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 18px;
}

.psa-admin input[type="checkbox"],
.psa-admin input[type="radio"],
.psa-front input[type="checkbox"],
.psa-front input[type="radio"] {
    width: auto;
    max-width: none;
    min-height: 0;
}

.psa-admin input[type="number"],
.psa-front input[type="number"] {
    text-align: right;
}

.psa-table-wrap td:not(:first-child),
.psa-table-wrap th:not(:first-child),
.psa-cards strong {
    text-align: right;
}

.psa-table-wrap th,
.psa-table-wrap td {
    padding: 7px 8px;
    vertical-align: middle;
    white-space: nowrap;
}

.psa-table-wrap th:first-child,
.psa-table-wrap td:first-child {
    width: auto;
    min-width: 0;
    white-space: normal;
}

.psa-table-wrap td:last-child,
.psa-table-wrap th:last-child,
.psa-table-wrap .psa-money,
.psa-pos-order-list td:last-child,
.psa-pos-order-list th:last-child {
    white-space: nowrap;
}

.psa-password-field {
    position: relative;
    display: block;
}

.psa-password-field input {
    padding-right: 50px;
}

.psa-password-field input::-ms-reveal,
.psa-password-field input::-ms-clear {
    display: none;
}

.psa-eye-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background-color: #eaf2ff;
    color: var(--psa-blue);
    padding: 0;
    font-size: 15px;
    font-weight: 900;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
}

.psa-eye-btn.active {
    background: var(--psa-blue);
    color: #ffffff;
}

.psa-check-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px;
}

@page {
    size: A4 portrait;
    margin: 8mm;
}

@media print {
    .psa-app-top,
    .psa-app-nav,
    .psa-filter,
    .psa-logout-btn,
    .psa-print-actions {
        display: none !important;
    }

    .psa-front {
        font-size: 10px;
        line-height: 1.2;
        padding: 0 !important;
    }

    .psa-panel,
    .psa-cards div {
        break-inside: avoid;
        border: 1px solid #dbe4f0;
        box-shadow: none !important;
    }

    .psa-panel {
        max-width: none !important;
        margin: 6px 0 !important;
        padding: 8px !important;
    }

    .psa-panel h2 {
        margin: 0 0 6px !important;
        font-size: 16px !important;
    }

    .psa-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 6px !important;
        max-width: none !important;
    }

    .psa-cards div {
        padding: 8px !important;
    }

    .psa-cards strong {
        margin-top: 4px !important;
        font-size: 15px !important;
    }

    .psa-table-wrap {
        overflow: visible !important;
    }

    .psa-table-wrap table {
        width: 100% !important;
        font-size: 9px !important;
        table-layout: fixed;
    }

    .psa-table-wrap th,
    .psa-table-wrap td {
        padding: 3px 4px !important;
        word-break: break-word;
    }
}

.psa-panel {
    box-sizing: border-box;
    max-width: 980px;
    margin: 16px 0;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.psa-panel h2 {
    margin-top: 0;
    font-size: 26px;
}

.psa-report-card {
    border: 1px solid transparent;
    border-radius: 12px;
    background: #ffffff;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(11, 42, 91, .04);
}

.psa-report-stack {
    display: grid;
    gap: 12px;
}

.psa-report-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    color: var(--psa-blue);
    font-size: 20px;
    font-weight: 950;
    line-height: 1.2;
    transition: background .12s ease, color .12s ease;
}

.psa-report-card > summary span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.psa-report-card > summary em {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 28px;
    margin-left: auto;
    border-radius: 999px;
    background: #eaf2ff;
    color: var(--psa-blue);
    padding: 0 8px;
    font-size: 14px;
    font-style: normal;
    font-weight: 950;
}

.psa-report-card > summary::-webkit-details-marker {
    display: none;
}

.psa-report-card > summary::after {
    content: "";
    flex: 0 0 auto;
    display: block;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background-color: #eaf2ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='m2 2 5 5 5-5' fill='none' stroke='%23123c7c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    transition: transform .12s ease, background-color .12s ease, color .12s ease;
}

.psa-report-card > summary:hover {
    background: #f8fbff;
}

.psa-report-card[open] > summary {
    border-bottom: 1px solid var(--psa-line);
    background: #f8fbff;
}

.psa-report-card[open] > summary::after {
    background-color: var(--psa-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='m2 2 5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    transform: rotate(180deg);
}

.psa-report-card-body {
    padding: 14px 16px 18px;
}

.psa-report-overview .psa-title-row {
    align-items: end;
    margin-bottom: 12px;
}

.psa-report-overview .psa-title-row h2,
.psa-report-detail h2 {
    margin: 0;
}

.psa-report-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.psa-report-metric-grid div {
    min-width: 0;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.psa-report-metric-grid span {
    display: block;
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 900;
}

.psa-report-metric-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--psa-orange);
    font-size: clamp(18px, 3.8vw, 26px);
    font-weight: 950;
    line-height: 1.05;
    text-align: right;
    white-space: nowrap;
}

.psa-report-table table {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

.psa-report-table th,
.psa-report-table td {
    padding: 7px 8px;
}

.psa-report-table th:not(:first-child),
.psa-report-table td:not(:first-child) {
    white-space: nowrap;
}

.psa-report-table td:first-child,
.psa-report-table th:first-child,
.psa-report-table-wide td:nth-child(2),
.psa-report-table-wide th:nth-child(2),
.psa-report-table-wide td:nth-child(3),
.psa-report-table-wide th:nth-child(3) {
    white-space: normal;
}

.psa-product-chart {
    display: grid;
    gap: 12px;
}

.psa-chart-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.psa-chart-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--psa-blue);
    font-size: 24px;
    font-weight: 950;
}

.psa-chart-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.psa-chart-head,
.psa-chart-total {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--psa-blue);
    font-weight: 950;
}

.psa-chart-head strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.psa-chart-head span,
.psa-chart-total span {
    flex: 0 0 auto;
    text-align: right;
}

.psa-chart-main em {
    color: var(--psa-muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.psa-chart-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #eaf2ff;
}

.psa-chart-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--psa-blue), var(--psa-orange));
}

.psa-chart-total,
.psa-empty-chart {
    border-radius: 8px;
    background: #f6f9fe;
    padding: 12px;
}

.psa-line-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.psa-line-summary div {
    border-radius: 8px;
    background: #f6f9fe;
    padding: 12px;
}

.psa-line-summary span {
    display: block;
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 900;
}

.psa-line-summary strong {
    display: block;
    color: var(--psa-blue);
    font-size: 18px;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.psa-line-chart-wrap {
    overflow-x: auto;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.psa-line-chart {
    display: block;
    width: 100%;
    min-width: 680px;
    height: auto;
}

.psa-line-chart line {
    stroke: #dbe4f0;
    stroke-width: 2;
}

.psa-line-chart text {
    fill: var(--psa-muted);
    font-size: 18px;
    font-weight: 800;
    text-anchor: middle;
}

.psa-line-chart polyline {
    fill: none;
    stroke: var(--psa-line-color);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.psa-line-chart circle {
    fill: #ffffff;
    stroke: var(--psa-line-color);
    stroke-width: 4;
}

.psa-line-legend {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.psa-line-legend div {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    border-radius: 8px;
    background: #f6f9fe;
    padding: 10px;
}

.psa-line-legend i {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--psa-line-color);
}

.psa-line-legend span {
    min-width: 0;
    color: var(--psa-blue);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.psa-line-legend strong {
    color: var(--psa-ink);
    text-align: right;
}

.psa-product-insight {
    display: grid;
    grid-template-columns: minmax(240px, 0.55fr) minmax(320px, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
}

.psa-top-products,
.psa-product-chart-box {
    padding: 16px;
}

.psa-top-products {
    border-right: 1px solid var(--psa-line);
}

.psa-chart-title,
.psa-top-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.psa-chart-title {
    margin-bottom: 14px;
    color: var(--psa-blue);
    font-weight: 900;
}

.psa-chart-title span {
    color: var(--psa-muted);
    font-size: 12px;
    font-weight: 800;
}

.psa-top-product-row {
    grid-template-columns: 18px minmax(0, 1fr) auto;
    min-height: 44px;
    color: var(--psa-ink);
    font-size: 13px;
}

.psa-top-product-row i,
.psa-pie-legend i {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--psa-line-color);
}

.psa-top-product-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.psa-top-product-row strong {
    color: var(--psa-blue);
    text-align: right;
    white-space: nowrap;
}

.psa-pie-wrap {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.psa-pie {
    width: min(240px, 55vw);
    aspect-ratio: 1;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(11, 42, 91, 0.08);
}

.psa-pie-legend {
    display: grid;
    gap: 8px;
}

.psa-pie-legend div {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
}

.psa-hour-chart {
    display: grid;
    grid-template-columns: repeat(24, minmax(28px, 1fr));
    gap: 8px;
    align-items: end;
    min-width: 720px;
    min-height: 230px;
    padding: 12px 4px 0;
    background: repeating-linear-gradient(to top, transparent 0, transparent 47px, #e8eef7 48px);
}

.psa-hour-col {
    display: grid;
    gap: 8px;
    align-items: end;
    min-height: 230px;
}

.psa-hour-stack {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    height: 190px;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

.psa-hour-stack i {
    display: block;
    min-height: 4px;
    background: var(--psa-line-color);
}

.psa-hour-col span {
    color: var(--psa-muted);
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    transform: rotate(-45deg);
}

@media (max-width: 760px) {
    .psa-line-summary {
        grid-template-columns: 1fr;
    }

    .psa-line-chart {
        min-width: 620px;
    }

    .psa-line-legend div {
        grid-template-columns: 14px minmax(0, 1fr);
    }

    .psa-line-legend strong {
        grid-column: 2;
        text-align: left;
    }

    .psa-product-insight,
    .psa-pie-wrap {
        grid-template-columns: 1fr;
    }

    .psa-top-products {
        border-right: 0;
        border-bottom: 1px solid var(--psa-line);
    }

    .psa-product-chart-box {
        overflow-x: auto;
    }
}

.psa-frameless-page .psa-panel {
    max-width: none;
    margin: 12px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.psa-frameless-page .psa-panel h2 {
    margin: 14px 0 10px;
    padding: 0 2px;
}

.psa-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin: 16px 0;
}

.psa-report-filter-groups {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
}

.psa-report-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.psa-report-tab-accordions {
    grid-template-columns: 1fr;
}

.psa-report-tab-card {
    min-width: 0;
}

.psa-report-tab-card > summary {
    list-style: none;
}

.psa-report-tab-card > summary::-webkit-details-marker {
    display: none;
}

.psa-report-tabs a {
    display: grid;
    gap: 0;
    min-height: 72px;
    border: 2px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
    color: var(--psa-blue);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(11, 42, 91, 0.08);
}

.psa-report-tabs a.active,
.psa-report-tab-card.active > summary a {
    border-color: var(--psa-line);
    background: #ffffff;
    color: var(--psa-blue);
}

.psa-report-tabs strong {
    font-size: clamp(18px, 5vw, 26px);
    font-weight: 950;
}

.psa-report-tabs span {
    display: none;
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 850;
}

.psa-report-tabs a.active span,
.psa-report-tab-card.active > summary a span {
    color: var(--psa-muted);
}

.psa-report-tab-card .psa-filter,
.psa-report-manage-tools {
    margin: 10px 0 0;
}

.psa-report-tab-card .psa-report-overview,
.psa-report-tab-card .psa-report-detail,
.psa-report-tab-card .psa-report-inner-panel {
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
}

.psa-report-manage-tools .psa-export-btn {
    border-color: var(--psa-blue);
    background: var(--psa-blue);
    color: #ffffff;
}

.psa-report-manage-tools .psa-export-btn:hover {
    background: #0b2a5b;
    color: #ffffff;
}

.psa-report-manage-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.psa-report-manage-buttons > .psa-add-box,
.psa-report-manage-buttons > .psa-small-btn {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    margin: 0;
}

.psa-report-manage-buttons > .psa-add-box > summary,
.psa-report-manage-buttons > .psa-small-btn {
    display: grid;
    place-items: center;
    min-height: 44px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
}

.psa-report-manage-buttons .psa-report-import-box > summary {
    background: var(--psa-blue);
    color: #ffffff;
}

.psa-report-manage-buttons .psa-report-reset-box > summary {
    background: #c81e1e;
    color: #ffffff;
}

.psa-report-manage-buttons > .psa-add-box[open] {
    grid-column: 1 / -1;
}

.psa-report-inline-filter {
    grid-template-columns: minmax(0, 1fr) auto;
}

.psa-report-inline-filter .psa-report-month,
.psa-report-inline-filter .psa-report-date-range {
    grid-column: 1 / -1;
}

.psa-filter-group {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #f6f9fe;
    padding: 14px;
}

.psa-filter-group legend {
    padding: 0 8px;
    color: var(--psa-blue);
    font-size: 18px;
    font-weight: 950;
}

.psa-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.psa-filter-grid label {
    min-width: 0;
}

.psa-report-month[hidden],
.psa-report-date-range[hidden] {
    display: none !important;
}

.psa-filter-grid input,
.psa-filter-grid select {
    min-height: 48px;
    padding: 10px 12px;
    font-size: clamp(18px, 4.8vw, 24px);
}

.psa-filter-grid .psa-small-btn {
    min-height: 48px;
    padding: 10px 18px;
    align-self: end;
}

.psa-product-report-filter {
    display: block;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #f6f9fe;
    padding: 14px;
}

.psa-filter label,
.psa-form label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.psa-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 980px;
}

.psa-cards div {
    min-width: 0;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: white;
    padding: 18px;
}

.psa-cards span {
    display: block;
    color: var(--psa-muted);
    font-weight: 800;
}

.psa-cards strong {
    display: block;
    margin-top: 10px;
    color: var(--psa-orange);
    font-size: clamp(22px, 3.4vw, 28px);
    line-height: 1.05;
    white-space: nowrap;
}

.psa-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.psa-print-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.psa-form {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 620px;
}

.psa-recipe-calculator {
    display: grid;
    gap: 16px;
}

.psa-raw-materials {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.psa-raw-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.psa-raw-overview div {
    min-width: 0;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.psa-raw-overview span {
    display: block;
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 900;
}

.psa-raw-overview strong {
    display: block;
    margin-top: 6px;
    color: var(--psa-blue);
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.psa-raw-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
    gap: 10px;
    align-items: start;
    margin-bottom: 16px;
}

.psa-raw-search {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--psa-muted);
    font-weight: 900;
}

.psa-raw-search input {
    min-height: 48px;
}

.psa-raw-receive-box {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
}

.psa-raw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    min-width: 0;
}

.psa-raw-card {
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 0;
    overflow: hidden;
}

.psa-raw-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    list-style: none;
    cursor: pointer;
}

.psa-raw-card-head::-webkit-details-marker {
    display: none;
}

.psa-raw-card[open] > .psa-raw-card-head {
    border-bottom: 1px solid var(--psa-line);
}

.psa-raw-card-head > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.psa-raw-card-head strong {
    overflow-wrap: anywhere;
    color: var(--psa-blue);
}

.psa-raw-card-head em {
    color: var(--psa-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.psa-raw-card-head b {
    flex: 0 0 auto;
    color: var(--psa-orange);
    font-weight: 900;
    white-space: nowrap;
}

.psa-raw-card-body {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.psa-raw-delete-form {
    margin: 0;
}

.psa-raw-form,
.psa-raw-receive-form {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.psa-raw-card .psa-action-row {
    align-items: stretch;
}

.psa-raw-card .psa-action-row > * {
    box-sizing: border-box;
    flex: 1 1 140px;
    text-align: center;
}

.psa-raw-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.psa-raw-actions .psa-small-btn {
    flex: 1 1 auto;
}

.psa-raw-actions .psa-raw-delete-btn {
    flex: 0 0 42px;
    background: #eef5ff;
    color: var(--psa-blue);
}

.psa-raw-movement-head {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.psa-raw-movement-head h3 {
    margin: 0;
}

.psa-raw-movement-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.psa-raw-movement-filters button {
    border: 0;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--psa-blue);
    padding: 8px 14px;
    font-weight: 900;
    cursor: pointer;
}

.psa-raw-movement-filters button.active {
    background: var(--psa-blue);
    color: #ffffff;
}

.psa-raw-movement-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.psa-raw-movement-card {
    display: grid;
    grid-template-columns: minmax(88px, auto) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 10px;
}

.psa-raw-movement-card time {
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 800;
}

.psa-raw-movement-card div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.psa-raw-movement-card strong {
    overflow-wrap: anywhere;
    color: var(--psa-ink);
    font-weight: 950;
}

.psa-raw-movement-card span {
    overflow-wrap: anywhere;
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 800;
}

.psa-raw-movement-card b {
    border-radius: 999px;
    background: #e9f9ef;
    color: #0f8b4c;
    padding: 8px 10px;
    font-weight: 950;
    white-space: nowrap;
}

.psa-raw-movement-card.type-delivery_use b {
    background: #ffe9e9;
    color: #c81e1e;
}

.psa-raw-movement-card.type-delivery_return b {
    background: #eaf2ff;
    color: var(--psa-blue);
}

.psa-recipe-form {
    max-width: none;
    min-width: 0;
}

.psa-recipe-list,
.psa-recipe-ingredients,
.psa-recipe-runner {
    display: grid;
    gap: 12px;
}

.psa-recipe-card {
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 0;
    overflow: hidden;
}

.psa-recipe-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 10px 12px;
    color: var(--psa-blue);
    font-weight: 900;
    list-style: none;
    cursor: pointer;
}

.psa-recipe-card summary::-webkit-details-marker {
    display: none;
}

.psa-recipe-card-body {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--psa-line);
    padding: 12px;
}

.psa-recipe-card-head,
.psa-recipe-ingredient {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) minmax(110px, .7fr) auto;
    gap: 8px;
    align-items: end;
}

.psa-recipe-card-head {
    grid-template-columns: minmax(0, 1fr);
}

.psa-recipe-card label,
.psa-recipe-runner label {
    margin: 0;
    color: var(--psa-muted);
    font-size: 14px;
    font-weight: 900;
}

.psa-recipe-card input,
.psa-recipe-card select,
.psa-recipe-runner input {
    margin-top: 4px;
}

.psa-icon-btn,
.psa-icon-danger-btn,
.psa-recipe-close {
    display: grid;
    place-items: center;
    width: 42px !important;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px !important;
    border: 0;
    border-radius: 10px;
    padding: 0 !important;
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.psa-icon-btn {
    background: var(--psa-blue);
}

.psa-icon-danger-btn {
    background: #c81e1e;
}

.psa-recipe-close {
    flex: 0 0 auto;
    border: 0;
    background: #eaf2ff;
    color: var(--psa-blue);
    font-size: 16px;
    font-weight: 950;
}

.psa-recipe-card > .psa-icon-danger-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.psa-section-body {
    padding-top: 14px;
}

.psa-recipe-runner {
    border-top: 1px solid var(--psa-line);
    padding-top: 14px;
}

.psa-recipe-runner h3 {
    margin: 0;
    font-size: 20px;
}

.psa-recipe-stock-grid,
.psa-recipe-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.psa-recipe-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
}

.psa-recipe-result span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 900;
}

.psa-recipe-result strong {
    flex: 0 0 auto;
    color: var(--psa-orange);
    white-space: nowrap;
}

.psa-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
}

.psa-check-grid legend {
    padding: 0 6px;
    color: var(--psa-muted);
    font-weight: 900;
}

.psa-check-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #eef5ff;
    font-weight: 900;
}

.psa-cat-title,
.psa-cat-report {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.psa-cat-icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--psa-cat-color, #1d4ed8);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.psa-delivery-form label,
.psa-delivery-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px 84px 28px;
    align-items: center;
    gap: 10px;
}

.psa-delivery-form label.psa-wholesale-row,
.psa-delivery-row.psa-wholesale-row {
    grid-template-columns: minmax(0, 1fr) 110px 28px;
}

.psa-delivery-mode {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    background: #f6f9fe;
    padding: 12px;
}

.psa-delivery-mode label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--psa-line);
    border-radius: 999px;
    background: #ffffff;
    padding: 8px 12px;
    color: var(--psa-blue);
    font-weight: 900;
}

.psa-delivery-mode p {
    flex-basis: 100%;
    margin: 0;
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 800;
}

.psa-delivery-row {
    border-bottom: 1px solid var(--psa-line);
    padding: 10px 0;
}

.psa-delivery-row.is-editing {
    border-radius: 8px;
    background: #f8fbff;
    padding: 10px;
}

.psa-delivery-row-mode {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}

.psa-delivery-row-mode[hidden],
.psa-delivery-row-save[hidden] {
    display: none !important;
}

.psa-delivery-row-mode button {
    border: 1px solid var(--psa-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--psa-blue);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.psa-delivery-row-mode button.active {
    border-color: var(--psa-blue);
    background: var(--psa-blue);
    color: #ffffff;
}

.psa-delivery-row-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    min-width: 0;
}

.psa-delivery-row-save {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 15px;
}

.psa-field-mini {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.psa-delivery-form label > span:first-child,
.psa-delivery-row > span:first-child {
    font-size: clamp(23px, 2.9vw, 34px);
    font-weight: 900;
    line-height: 1.05;
}

.psa-delivery-form .psa-field-mini input {
    min-height: 40px;
    padding: 5px 8px;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.psa-field-mini em {
    color: var(--psa-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}

.psa-delivery-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px 84px 28px;
    gap: 12px;
    color: var(--psa-muted);
    font-size: 14px;
    font-weight: 900;
}

.psa-edit-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto auto;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--psa-line);
    padding: 10px 0;
}

.psa-add-box {
    border: 2px dashed var(--psa-orange);
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.psa-add-box summary {
    cursor: pointer;
    color: var(--psa-orange);
    font-size: 24px;
    font-weight: 900;
    list-style: none;
}

.psa-add-box summary::-webkit-details-marker,
.psa-list-card summary::-webkit-details-marker {
    display: none;
}

.psa-add-box[open] summary {
    margin-bottom: 14px;
}

.psa-clean-list {
    display: grid;
    gap: 10px;
}

.psa-section-toggle > summary {
    cursor: pointer;
    color: var(--psa-ink);
    font-size: 26px;
    font-weight: 900;
    list-style: none;
    margin: 14px 0 10px;
}

.psa-section-toggle > summary::-webkit-details-marker {
    display: none;
}

.psa-section-toggle > summary::after {
    content: "＋";
    float: right;
    color: var(--psa-blue);
}

.psa-section-toggle[open] > summary::after {
    content: "－";
}

.psa-section-count {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    min-height: 24px;
    margin-left: 8px;
    border-radius: 999px;
    background: #eaf2ff;
    color: var(--psa-blue);
    font-size: 14px;
    font-weight: 950;
    vertical-align: middle;
}

.psa-list-card {
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.psa-list-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 14px;
    list-style: none;
}

.psa-list-card summary span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.psa-list-card summary strong {
    overflow: hidden;
    font-size: 22px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psa-list-card summary em {
    overflow: hidden;
    color: var(--psa-muted);
    font-style: normal;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psa-list-card summary b {
    flex: 0 0 auto;
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--psa-blue);
    padding: 6px 10px;
    font-size: 14px;
}

.psa-list-card .psa-form,
.psa-list-card p,
.psa-delete-form {
    border-top: 1px solid var(--psa-line);
    padding: 14px;
    margin: 0;
}

.psa-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: #b91c1c;
    color: white !important;
    padding: 10px 14px;
    font-size: 18px;
    font-weight: 900;
    text-decoration: none !important;
}

.psa-danger-panel {
    border-color: #fecaca;
    background: #fff7f7;
}

.psa-danger-panel summary {
    cursor: pointer;
    color: #991b1b;
    font-size: 22px;
    font-weight: 900;
}

.psa-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.psa-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.psa-share-card {
    max-width: 760px;
    border: 3px solid var(--psa-orange);
    border-radius: 8px;
    background: #ffffff;
    padding: 24px;
    overflow: hidden;
}

.psa-share-card h2 {
    margin: 6px 0 18px;
    color: var(--psa-orange);
    font-size: clamp(26px, 7vw, 36px);
}

.psa-share-card table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: clamp(17px, 4.6vw, 24px);
}

.psa-share-card th,
.psa-share-card td {
    border-bottom: 1px solid var(--psa-line);
    padding: 8px 5px;
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

.psa-share-card th:not(:first-child),
.psa-share-card td:not(:first-child) {
    text-align: right;
}

.psa-share-card th:last-child,
.psa-share-card td:last-child {
    white-space: nowrap;
}

.psa-share-date,
.psa-share-note,
.psa-muted {
    color: var(--psa-muted);
    font-weight: 800;
}

.psa-front {
    max-width: 760px;
    margin: 0 auto;
    padding: 14px 14px 112px;
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

.psa-front-hero {
    border-radius: 8px;
    background: var(--psa-yellow);
    padding: 20px;
    margin-bottom: 16px;
}

.psa-front-hero p {
    margin: 0 0 6px;
    font-weight: 900;
}

.psa-front-hero h2 {
    margin: 0;
    font-size: 34px;
}

.psa-entry-form {
    display: grid;
    gap: 14px;
}

.psa-entry-card {
    display: grid;
    grid-template-columns: 1fr 170px;
    gap: 14px;
    align-items: center;
    border: 2px solid var(--psa-line);
    border-radius: 8px;
    background: white;
    padding: 16px;
}

.psa-entry-card span {
    display: inline-block;
    border-radius: 8px;
    background: #eaf2ff;
    color: var(--psa-blue);
    padding: 5px 8px;
    font-weight: 900;
}

.psa-entry-card h3 {
    margin: 8px 0;
    font-size: 30px;
}

.psa-entry-card label {
    display: grid;
    gap: 8px;
    margin: 0;
    text-align: center;
    font-weight: 900;
}

.psa-entry-card input {
    width: 100%;
    font-size: 48px;
    font-weight: 900;
    text-align: center;
}

.psa-entry-sales-list {
    display: grid;
    gap: 12px;
}

.psa-entry-sales-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    border-color: #d8e2f0;
    box-shadow: 0 8px 18px rgba(11, 42, 91, .06);
}

.psa-entry-product {
    min-width: 0;
    border-bottom: 1px dashed #cbd7e8;
    padding-bottom: 8px;
}

.psa-entry-product h3 {
    margin: 0;
}

.psa-entry-slip-row {
    display: grid;
    grid-template-columns: minmax(58px, .7fr) minmax(98px, 1fr) minmax(98px, .9fr);
    gap: 8px;
    align-items: end;
}

.psa-entry-metrics div,
.psa-entry-line {
    border-radius: 8px;
    background: #f6f9fe;
    padding: 9px;
}

.psa-entry-metrics small,
.psa-entry-line small,
.psa-entry-grand span {
    display: block;
    margin-bottom: 4px;
    color: var(--psa-muted);
    font-size: 13px;
    font-weight: 900;
}

.psa-entry-metrics strong,
.psa-entry-line strong,
.psa-entry-grand strong {
    display: block;
    color: var(--psa-blue);
    font-size: clamp(18px, 4.8vw, 24px);
    font-weight: 950;
    line-height: 1.1;
    text-align: right;
}

.psa-entry-remaining {
    align-self: stretch;
    justify-content: center;
    border-radius: 8px;
    background: #f6f9fe;
    padding: 9px;
}

.psa-entry-sales-card .psa-entry-remaining input {
    max-width: 92px;
    margin-left: auto;
    margin-right: auto;
    text-align: right;
}

.psa-entry-grand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 2px solid var(--psa-blue);
    border-radius: 8px;
    background: #ffffff;
    padding: 14px 16px;
}

.psa-employee-app .psa-front-hero {
    margin-bottom: 12px;
}

.psa-entry-top {
    position: relative;
}

.psa-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.psa-password-menu {
    position: relative;
}

.psa-password-menu summary {
    list-style: none;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
    padding: 12px 14px;
    font-weight: 900;
    cursor: pointer;
}

.psa-password-menu summary::-webkit-details-marker {
    display: none;
}

.psa-password-menu-form {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 10000;
    display: grid;
    gap: 10px;
    width: min(330px, calc(100vw - 28px));
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--psa-ink);
    padding: 12px;
    box-shadow: 0 16px 34px rgba(11, 42, 91, .18);
}

.psa-password-menu[open] summary {
    background: #ffffff;
    color: var(--psa-blue);
}

.psa-password-menu-form label {
    color: var(--psa-ink);
}

.psa-password-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.psa-password-actions .psa-small-btn {
    width: 100%;
}

.psa-password-cancel {
    background: #eaf2ff;
    color: var(--psa-blue) !important;
}

.psa-entry-grand span {
    margin: 0;
    font-size: 17px;
    color: var(--psa-blue);
}

.psa-entry-grand strong {
    font-size: clamp(24px, 6vw, 34px);
}

.psa-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border: 0;
    border-radius: 8px;
    background: var(--psa-orange);
    color: white !important;
    padding: 12px 18px;
    font-size: 22px;
    font-weight: 900;
    text-decoration: none !important;
    transition: transform .12s ease, filter .12s ease, background .12s ease;
}

.psa-save-button {
    position: sticky;
    bottom: 88px;
    width: 100%;
    box-shadow: 0 10px 24px rgba(11, 42, 91, .28);
}

.psa-success {
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    padding: 14px;
    margin-bottom: 14px;
    font-weight: 900;
}

.psa-dismissible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.psa-close-notice {
    width: auto !important;
    min-height: 34px !important;
    border: 0;
    border-radius: 8px;
    background: #166534;
    color: #ffffff;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.psa-app {
    width: min(980px, 100%);
    max-width: 980px;
    margin: 0 auto;
    padding: 0 0 88px;
}

.psa-app-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #071d42, #123c7c);
    color: white;
    padding: 18px;
    margin: 0 0 14px;
}

.psa-company-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: white;
    object-fit: contain;
    padding: 6px;
}

.psa-logo-preview {
    width: 96px;
    height: 96px;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    object-fit: contain;
    padding: 8px;
    background: white;
}

.psa-app-top p {
    margin: 0 0 4px;
    font-weight: 800;
    opacity: .9;
}

.psa-app-top h1 {
    margin: 0;
    color: white;
    font-size: 34px;
}

.psa-app-top a {
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 8px;
    color: white !important;
    padding: 10px 14px;
    font-weight: 900;
    text-decoration: none !important;
}

.psa-app-top .psa-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
    white-space: nowrap;
    transition: transform .12s ease, background .12s ease;
}

.psa-logout-btn span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    color: var(--psa-blue);
    font-size: 15px;
    line-height: 1;
}

.psa-logout-btn strong {
    font-size: 16px;
}

.psa-logout-btn:active {
    transform: scale(.97);
    background: rgba(255, 255, 255, .24);
}

.psa-app-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    width: min(980px, 100%);
    min-height: 76px;
    transform: translateX(-50%);
    border-top: 1px solid var(--psa-line);
    background: white;
    box-shadow: 0 -8px 20px rgba(0, 0, 0, .12);
    padding-bottom: env(safe-area-inset-bottom);
}

.psa-app-nav a,
.psa-app-nav button {
    display: grid;
    place-items: center;
    gap: 2px;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: white;
    color: #5f6368 !important;
    padding: 8px 2px 10px;
    font-weight: 900;
    text-decoration: none !important;
    touch-action: manipulation;
    cursor: pointer;
}

.psa-app-nav a span,
.psa-app-nav button span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 22px;
    line-height: 1;
}

.psa-app-nav a strong,
.psa-app-nav button strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psa-app-nav a.active,
.psa-app-nav button.active {
    background: #eaf2ff;
    color: var(--psa-orange) !important;
}

.psa-app-nav a.active span,
.psa-app-nav button.active span {
    background: var(--psa-orange);
    color: white;
}

.psa-app-nav a.psa-nav-logout span {
    background: #eef2f7;
    color: var(--psa-ink);
}

.psa-employee-nav {
    grid-template-columns: repeat(2, 1fr);
}

.psa-login-screen {
    display: grid;
    place-items: center;
    min-height: 70vh;
}

.psa-login-card {
    width: min(100%, 460px);
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: white;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.psa-login-card h1 {
    margin: 0 0 8px;
    font-size: 42px;
}

.psa-login-card p {
    margin: 0 0 20px;
    color: var(--psa-muted);
    font-weight: 800;
}

.psa-login-card label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    font-weight: 900;
}

.psa-error {
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    padding: 14px;
    margin-bottom: 14px;
    font-weight: 900;
}

.psa-small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--psa-ink);
    color: white !important;
    padding: 10px 14px;
    font-size: 18px;
    font-weight: 900;
    text-decoration: none !important;
    transition: transform .12s ease, filter .12s ease, background .12s ease;
}

.psa-primary:active,
.psa-small-btn:active,
.psa-danger-btn:active,
.psa-app-nav a:active,
.button:active {
    transform: scale(.97);
    filter: brightness(.92);
}

.psa-whatsapp-btn {
    background: #128c4a;
}

.psa-disabled-btn {
    background: #94a3b8;
    cursor: not-allowed;
}

.psa-delivery-form input:disabled {
    background: #eef2f7;
    color: #475569;
    cursor: not-allowed;
}

.psa-share-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.psa-front table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.psa-front th,
.psa-front td {
    border-bottom: 1px solid var(--psa-line);
    padding: 12px 10px;
    text-align: left;
    white-space: nowrap;
}

.psa-front th {
    background: #eef5ff;
    font-weight: 900;
}

.psa-front tfoot td,
.psa-admin tfoot td {
    background: #eef5ff;
    color: var(--psa-orange);
    font-weight: 900;
    text-align: right;
}

.psa-front tfoot td:first-child,
.psa-admin tfoot td:first-child {
    text-align: left;
}

.psa-front tfoot td:not(:first-child),
.psa-admin tfoot td:not(:first-child) {
    text-align: right;
}

.psa-front .psa-share-card table {
    min-width: 0;
}

.psa-front .psa-share-card th,
.psa-front .psa-share-card td {
    white-space: normal;
}

.psa-front .psa-share-card th:not(:first-child),
.psa-front .psa-share-card td:not(:first-child),
.psa-front .psa-share-card th:last-child,
.psa-front .psa-share-card td:last-child {
    white-space: nowrap;
}

.psa-staff-row {
    grid-template-columns: 1fr 1fr 1fr auto 1fr auto;
}

.psa-shortcuts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button-hero {
    min-height: 50px !important;
    font-size: 18px !important;
}

@media (max-width: 760px) {
    .psa-report-tabs {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .psa-report-tab-accordions {
        grid-template-columns: 1fr;
    }

    .psa-report-tab-card > summary {
        min-width: 0;
    }

    .psa-report-tab-card > :not(summary) {
        width: 100%;
        min-width: 0;
    }

    .psa-report-tabs a {
        min-height: 58px;
        padding: 10px;
        box-shadow: 0 5px 14px rgba(11, 42, 91, 0.06);
    }

    .psa-report-tabs strong {
        font-size: clamp(18px, 5.2vw, 22px);
        line-height: 1.1;
    }

    .psa-report-filter-groups {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .psa-filter-group {
        padding: 12px;
    }

    .psa-filter-group legend {
        font-size: 16px;
    }

    .psa-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .psa-filter-grid input,
    .psa-filter-grid select {
        min-height: 44px;
        padding: 8px 10px;
        font-size: clamp(17px, 5vw, 22px);
    }

    .psa-edit-row,
    .psa-staff-row,
    .psa-entry-card {
        grid-template-columns: 1fr;
    }

    .psa-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .psa-delivery-form label,
    .psa-delivery-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        border: 1px solid var(--psa-line);
        border-radius: 8px;
        padding: 10px;
    }

    .psa-delivery-form label > span:first-child,
    .psa-delivery-row > span:first-child {
        grid-column: 1 / -1;
    }

    .psa-delivery-head {
        display: none;
    }

    .psa-delivery-form label input,
    .psa-delivery-row input {
        width: 100%;
        text-align: center;
        font-size: 24px;
        font-weight: 900;
    }

    .psa-delivery-form label > span:last-child,
    .psa-delivery-row-actions {
        grid-column: 1 / -1;
        text-align: right;
    }

    .psa-field-mini em {
        font-size: 16px;
    }

    .psa-share-card {
        padding: 14px;
    }

    .psa-action-row,
    .psa-title-row,
    .psa-action-row .psa-small-btn {
        width: 100%;
    }

    .psa-front {
        font-size: 18px;
    }

    .psa-app-top {
        align-items: flex-start;
    }

    .psa-app-top h1 {
        font-size: 28px;
    }

    .psa-app-top .psa-logout-btn {
        padding: 8px 10px;
    }

    .psa-app-nav {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .psa-filter-grid {
        grid-template-columns: 1fr;
    }

    .psa-report-inline-filter {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .psa-report-inline-filter .psa-small-btn {
        width: auto;
        min-width: 76px;
        padding-right: 12px;
        padding-left: 12px;
    }
}


.psa-delivery-category {
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.psa-delivery-category summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #eef5ff;
    color: var(--psa-blue);
    cursor: pointer;
}

.psa-delivery-category summary span {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--psa-cat-color, #1d4ed8);
    color: #ffffff;
    font-weight: 900;
}

.psa-delivery-category summary strong {
    font-size: 22px;
    font-weight: 900;
}

.psa-delivery-product-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.psa-delivery-product-name > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.psa-delivery-edit-icon,
.psa-delivery-product-name b {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border: 0;
    border: 1px solid var(--psa-cat-color, #1d4ed8);
    border-radius: 7px;
    background: var(--psa-cat-color, #1d4ed8);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
}

.psa-delivery-edit-icon {
    border-color: var(--psa-blue);
    background: var(--psa-blue);
}

.psa-delivery-edit-icon svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: currentColor;
}


.psa-panel.psa-delivery-wide {
    max-width: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 6px 0;
}

.psa-delivery-detail-card > .psa-section-toggle > .psa-section-body {
    display: grid;
    gap: 14px;
}

.psa-delivery-wide .psa-filter,
.psa-delivery-wide .psa-delivery-form,
.psa-delivery-wide .psa-share-card {
    max-width: none;
}

.psa-product-groups {
    display: grid;
    gap: 14px;
}

.psa-product-group {
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.psa-product-group > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #eef5ff;
    cursor: pointer;
}

.psa-product-group > summary strong {
    flex: 1;
    font-size: 22px;
    font-weight: 900;
}

.psa-product-group > summary em {
    border-radius: 8px;
    background: #fff;
    color: var(--psa-blue);
    font-style: normal;
    font-weight: 900;
    padding: 5px 10px;
}

.psa-product-title {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.psa-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 900;
}

.psa-status-on {
    background: #dcfce7;
    color: #166534;
}

.psa-status-off {
    background: #e5e7eb;
    color: #475569;
}

.psa-toggle {
    display: block !important;
    max-width: 190px;
    font-weight: 900;
}

.psa-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.psa-toggle span {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 38px;
    border: 2px solid var(--psa-line);
    border-radius: 999px;
    background: #e5e7eb;
    color: #64748b;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.psa-toggle span::before {
    content: "";
    position: absolute;
    inset: 4px auto 4px 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    transition: transform 0.18s ease;
}

.psa-toggle b,
.psa-toggle em {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 14px;
    font-style: normal;
}

.psa-toggle input:checked + span {
    border-color: #16a34a;
    background: #16a34a;
    color: #ffffff;
}

.psa-toggle input:checked + span::before {
    transform: translateX(100%);
}

.psa-toggle input:not(:checked) + span em {
    color: #0f172a;
}

.psa-toggle input:checked + span b {
    color: #ffffff;
}

.psa-toggle input:checked + span em {
    color: rgba(255, 255, 255, 0.74);
}

.psa-toggle input:disabled + span {
    cursor: not-allowed;
    opacity: 0.58;
}

.psa-share-note-field {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--psa-muted);
    font-size: 15px;
    font-weight: 800;
}

.psa-share-note-field textarea {
    width: 100%;
    min-height: 58px;
    resize: vertical;
}

.psa-share-note {
    margin: 14px 0 0;
    color: #334155;
    font-size: 17px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.psa-fill-link-box {
    display: grid;
    gap: 10px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
    background: #f8fbff;
}

.psa-fill-link-box label {
    display: grid;
    gap: 6px;
    color: var(--psa-muted);
    font-weight: 900;
}

.psa-fill-send-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    margin-top: 14px;
}

.psa-fill-send-row .psa-fill-link-box {
    min-width: 0;
    margin: 0;
}

.psa-fill-send-row > .psa-small-btn {
    min-width: 88px;
}

.psa-settings-form input:disabled,
.psa-settings-form select:disabled,
.psa-settings-form textarea:disabled {
    background: #f3f6fb;
    color: #334155;
    opacity: 1;
}

.psa-settings-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--psa-line);
    border-radius: 8px;
}

.psa-settings-actions button {
    width: auto;
    min-width: 0;
    min-height: 40px;
    border-radius: 0;
    padding: 8px 4px;
    font-size: 15px;
}

.psa-settings-actions button + button {
    border-left: 1px solid rgba(255, 255, 255, 0.45);
}

.psa-settings-actions .psa-small-btn,
.psa-settings-actions .psa-danger-btn {
    width: auto;
}

.psa-save-btn:disabled {
    cursor: not-allowed;
    filter: grayscale(1);
    opacity: 0.55;
}

.psa-inline-delete {
    border-top: 0;
    margin-top: 8px;
    padding-top: 0;
}

.psa-product-image-preview {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: #e8f0fb;
    border: 1px solid #d8e2f0;
}

.psa-product-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.psa-pos {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    margin: 0 !important;
    padding: 0;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body:has(.psa-pos) {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

body:has(.psa-pos) .site-header,
body:has(.psa-pos) .wp-site-blocks > header,
body:has(.psa-pos) header.wp-block-template-part {
    display: none !important;
}

body:has(.psa-pos) .site-content,
body:has(.psa-pos) .entry-content,
body:has(.psa-pos) .wp-site-blocks,
body:has(.psa-pos) main {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body:has(.psa-pos) .wp-site-blocks > *,
body:has(.psa-pos) .entry-content > * {
    margin-block-start: 0 !important;
}

body:has(.psa-pos) .entry-content > .psa-pos,
body:has(.psa-pos) main .psa-pos {
    margin-top: 0 !important;
}

body:has(.psa-app) .entry-content,
body:has(.psa-app) main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body:has(.psa-app) .wp-site-blocks > *,
body:has(.psa-app) .entry-content > * {
    margin-block-start: 0 !important;
}

body:has(.psa-app) .entry-content > .psa-app,
body:has(.psa-app) main .psa-app {
    margin-top: 0 !important;
}

.psa-pos-top {
    position: sticky;
    top: 0;
    z-index: 20;
    flex: 0 0 auto;
    display: flex;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #0b2a5b;
    color: #ffffff;
}

.psa-pos-title {
    min-width: 0;
}

.psa-pos-top p,
.psa-pos-top h1 {
    margin: 0;
}

.psa-pos-top p {
    opacity: .9;
    font-weight: 800;
}

.psa-pos-top h1 {
    color: #ffffff;
    font-size: 26px;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psa-pos-top .psa-logout-btn {
    flex: 0 0 auto;
    min-width: 78px;
    padding: 8px 10px;
}

.psa-pos-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.psa-pos-branch {
    display: block;
    padding: 12px 14px;
    background: #f3f7fc;
    font-weight: 900;
}

.psa-pos-shell {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
}

.psa-pos-menu {
    position: relative;
    top: auto;
    align-self: start;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
    padding: 6px;
    background: #f4f7fb;
    border-right: 1px solid #dbe4f0;
}

.psa-pos-category {
    display: grid;
    place-items: center;
    gap: 3px;
    width: 100%;
    min-height: 72px;
    margin-bottom: 7px;
    padding: 8px 4px !important;
    border: 0 !important;
    border-radius: 14px;
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 900;
    box-shadow: 0 7px 18px rgba(11, 42, 91, .07);
    appearance: none;
}

.psa-pos-category span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--psa-cat-color, #e8eef7);
    color: #ffffff;
    font-size: 18px;
}

.psa-pos-category strong {
    max-width: 64px;
    font-size: 12px;
    line-height: 1.12;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.psa-pos-category.active {
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(11, 42, 91, .18);
    color: #0b2a5b !important;
    outline: 3px solid #dbeafe;
    outline-offset: -3px;
}

.psa-pos-category.active span {
    filter: saturate(1.1);
}

.psa-pos-products {
    display: grid;
    align-content: start;
    gap: 0;
    padding: 6px 8px 92px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.psa-pos-product.psa-pos-hidden {
    display: none !important;
}

.psa-pos-product.psa-pos-priority {
    background: #f7fbff;
}

.psa-pos-empty {
    margin: 16px 8px;
    padding: 18px;
    border-radius: 14px;
    background: #f3f7fc;
    color: #0b2a5b;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.psa-pos-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    align-items: center;
    gap: 10px;
    min-height: 74px;
    padding: 9px 22px 9px 14px;
    border-bottom: 1px solid #edf2f7;
    background: #ffffff;
    min-width: 0;
}

.psa-pos-product.selected {
    background: #f3f7fc;
}

.psa-pos-photo {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    overflow: hidden;
    background: #e8f0fb;
    display: grid;
    place-items: center;
}

.psa-pos-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.psa-pos-photo span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--psa-cat-color, #0b2a5b);
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.psa-pos-info h2 {
    margin: 0 0 5px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.16;
    overflow-wrap: normal;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.psa-pos-info strong {
    color: #f28c18;
    font-size: 20px;
    font-weight: 900;
    white-space: nowrap;
    display: inline-block;
}

.psa-pos-stock {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.psa-pos-sold-out {
    opacity: .66;
}

.psa-pos-sold-out .psa-pos-stock {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    color: #991b1b;
    background: #fee2e2;
}

.psa-pos-qty {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: end;
    min-width: 108px;
}

.psa-pos-qty button {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px;
    min-height: 32px;
    padding: 0 !important;
    appearance: none;
    box-sizing: border-box;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #f28c18 !important;
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
}

.psa-pos-qty .psa-pos-minus {
    color: #f28c18 !important;
    background: #fff3e2 !important;
    border: 2px solid #ffd49c !important;
}

.psa-pos-qty button:disabled {
    cursor: not-allowed;
    color: #94a3b8 !important;
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}

.psa-pos-qty-input {
    display: block;
    flex: 0 0 34px;
    width: 52px;
    min-width: 52px;
    height: 32px;
    min-height: 32px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    text-align: right;
    color: #0b2a5b;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    padding: 2px 5px 2px 2px;
    appearance: textfield;
    -moz-appearance: textfield;
}

.psa-pos-qty-input::-webkit-outer-spin-button,
.psa-pos-qty-input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
}

.psa-pos-qty-input:disabled {
    color: #94a3b8;
    background: #f1f5f9;
}

.psa-pos-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 92px;
    align-items: stretch;
    min-height: 76px;
    background: #071225;
    box-shadow: 0 -8px 28px rgba(15, 23, 42, .18);
}

.psa-pos-total {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #ffffff;
}

.psa-pos-total small {
    color: #9fb3cf;
    font-weight: 900;
}

.psa-pos-total strong {
    font-size: 25px;
    font-weight: 900;
    white-space: nowrap;
}

.psa-pos-payment {
    display: grid;
    gap: 6px;
    padding: 8px 10px;
    background: #0c1b32;
    color: #ffffff;
}

.psa-pos-pay-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.psa-pos-pay-methods label {
    margin: 0;
}

.psa-pos-pay-methods input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.psa-pos-pay-methods span {
    display: block;
    padding: 6px 4px;
    border-radius: 8px;
    background: #1e2f49;
    color: #dbeafe;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.psa-pos-pay-methods input:checked + span {
    background: #ffffff;
    color: #0b2a5b;
}

.psa-pos-received {
    display: grid;
    grid-template-columns: auto 118px;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #9fb3cf;
    font-size: 12px;
    font-weight: 900;
}

.psa-pos-received input {
    width: 118px;
    min-height: 32px;
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    text-align: right;
    font-size: 18px;
    font-weight: 900;
}

.psa-pos-paid-screen {
    min-height: 100vh;
    padding-bottom: 24px;
    background: #ffffff;
}

.psa-pos-paid-main {
    display: grid;
    gap: 22px;
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 18px 22px;
    text-align: center;
}

.psa-pos-paid-main h2 {
    margin: 0;
    color: #12833c;
    font-size: clamp(38px, 10vw, 64px);
    font-weight: 900;
    line-height: 1.08;
}

.psa-pos-paid-main h2 span {
    display: inline-block;
    margin-right: 8px;
}

.psa-pos-change-card {
    justify-self: center;
    width: min(100%, 520px);
    padding: 28px 18px;
    border-radius: 26px;
    background: #eafff1;
}

.psa-pos-change-card p {
    margin: 0 0 10px;
    color: #1d6b3e;
    font-size: clamp(27px, 7vw, 42px);
    font-weight: 800;
}

.psa-pos-change-card strong {
    display: block;
    color: #129044;
    font-size: clamp(58px, 15vw, 108px);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.psa-pos-paid-details {
    justify-self: center;
    width: min(100%, 520px);
    padding: 18px 24px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .12);
}

.psa-pos-paid-details div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #0f172a;
}

.psa-pos-paid-details div:last-child {
    border-bottom: 0;
}

.psa-pos-paid-details span {
    font-size: clamp(22px, 6vw, 36px);
    font-weight: 700;
    text-align: left;
}

.psa-pos-paid-details strong {
    font-size: clamp(22px, 6vw, 34px);
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.psa-pos-paid-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.psa-pos-next-order {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 76px;
    border-radius: 18px;
    background: #1976d2;
    color: #ffffff !important;
    font-size: clamp(34px, 10vw, 62px);
    font-weight: 900;
    text-decoration: none !important;
}

.psa-pos-print-receipt,
.psa-pos-share-receipt {
    min-height: 58px;
    border: 0;
    border-radius: 14px;
    background: #071225;
    color: #ffffff;
    font-size: clamp(20px, 6vw, 34px);
    font-weight: 900;
}

.psa-pos-change {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #ffffff;
    font-weight: 900;
}

.psa-pos-change small {
    color: #9fb3cf;
}

.psa-pos-receipt-share {
    margin: 10px 0;
}

.psa-pos-paid-result {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    color: #0b2a5b;
    font-weight: 900;
}

.psa-pos-paid-result span,
.psa-pos-paid-result strong {
    padding: 8px 10px;
    border-radius: 10px;
    background: #eaf2ff;
}

.psa-pos-checkout-panel {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    align-items: end;
    background: rgba(7, 18, 37, .55);
}

.psa-pos-checkout-panel[hidden] {
    display: none !important;
}

.psa-pos-checkout-card {
    max-height: 88vh;
    overflow: auto;
    padding: 16px;
    border-radius: 18px 18px 0 0;
    background: #ffffff;
    box-shadow: 0 -14px 42px rgba(15, 23, 42, .24);
}

.psa-pos-receipt-list {
    margin: 14px 0 8px;
    border-top: 1px dashed #cbd5e1;
    border-bottom: 1px dashed #cbd5e1;
}

.psa-pos-receipt-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid #edf2f7;
}

.psa-pos-receipt-row:last-child {
    border-bottom: 0;
}

.psa-pos-receipt-row span {
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.psa-pos-receipt-row b {
    color: #0b2a5b;
    font-size: 18px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.psa-pos-checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    padding: 12px;
    border-radius: 12px;
    color: #ffffff;
    background: #071225;
    font-weight: 900;
}

.psa-pos-checkout-total strong {
    font-size: 24px;
}

.psa-pos-submit-payment {
    width: 100%;
    min-height: 54px;
    margin-top: 12px;
    border: 0;
    border-radius: 12px;
    background: #f28c18;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.psa-pos-clear,
.psa-pos-confirm {
    border: 0;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.psa-pos-clear {
    display: grid;
    place-items: center;
    background: #334155;
    font-size: 25px;
    line-height: 1;
}

.psa-pos-clear span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

.psa-pos-confirm {
    background: #f28c18;
}

.psa-pos-settings-panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    align-items: end;
    background: rgba(7, 18, 37, .52);
}

.psa-pos-settings-panel[hidden] {
    display: none !important;
}

.psa-pos-settings-card {
    max-height: 88vh;
    overflow: auto;
    padding: 16px;
    border-radius: 18px 18px 0 0;
    background: #ffffff;
    box-shadow: 0 -14px 42px rgba(15, 23, 42, .24);
}

.psa-pos-settings-card > .psa-title-row .psa-pos-settings-close {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0 !important;
    border-radius: 999px;
    font-size: 16px;
    line-height: 1;
}

.psa-pos-settings-card h2,
.psa-pos-settings-card h3,
.psa-pos-settings-card h4 {
    color: #0b2a5b;
}

.psa-pos-setting-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
    margin-bottom: 10px;
}

.psa-pos-setting-tab {
    appearance: none;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 54px;
    padding: 10px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #f8fbff;
    color: #0b2a5b !important;
    font-family: inherit;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    cursor: pointer;
}

.psa-pos-setting-tab.is-active {
    border-color: #0b2a5b;
    background: #0b2a5b;
    color: #ffffff !important;
}

.psa-pos-setting-panel {
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.psa-pos-setting-panel[hidden],
.psa-pos-logout-confirm[hidden] {
    display: none !important;
}

.psa-pos-closing,
.psa-pos-password {
    padding: 12px;
}

.psa-pos-logout-confirm {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 18, 37, 0.58);
}

.psa-pos-logout-dialog {
    width: min(420px, 100%);
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.psa-pos-logout-dialog h3 {
    margin: 0 0 22px;
    color: #0b2a5b;
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
}

.psa-pos-logout-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.psa-pos-logout-actions .psa-small-btn,
.psa-pos-logout-actions .psa-danger-btn {
    display: grid;
    place-items: center;
    min-height: 48px;
    text-decoration: none !important;
}

.psa-pos-close-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0 14px;
}

.psa-pos-close-cards div {
    padding: 12px;
    border-radius: 12px;
    background: #f3f7fc;
}

.psa-pos-close-cards span {
    display: block;
    color: #64748b;
    font-weight: 900;
}

.psa-pos-close-cards strong {
    display: block;
    margin-top: 4px;
    color: #0b2a5b;
    font-size: 22px;
    font-weight: 900;
}

.psa-pos-password {
    margin-top: 0;
    border-top: 0;
}

.psa-pos-summary-card {
    margin: 8px 0 10px;
    max-width: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    transform: none;
    transform-origin: top left;
}

.psa-pos-summary-card .psa-share-date {
    font-size: 14px;
}

.psa-pos-summary-card h2 {
    margin: 4px 0 12px;
    font-size: clamp(21px, 5.6vw, 29px);
}

.psa-pos-summary-card table {
    font-size: clamp(14px, 3.7vw, 19px);
}

.psa-pos-summary-card th,
.psa-pos-summary-card td {
    padding: 7px 4px;
}

.psa-pos-summary-image {
    width: 100%;
    margin-bottom: 12px;
}

.psa-pos-order-list table {
    table-layout: auto;
}

.psa-pos-order-list th,
.psa-pos-order-list td {
    white-space: nowrap;
}

.psa-pos-order-list .psa-pos-order-no-cell {
    width: 1%;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.psa-pos-order-row {
    cursor: pointer;
}

.psa-pos-order-row:hover,
.psa-pos-order-row:focus {
    background: #f3f7fc;
    outline: 2px solid #cbd5e1;
    outline-offset: -2px;
}

.psa-pos-order-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(7, 18, 37, 0.58);
}

.psa-pos-order-modal[hidden] {
    display: none !important;
}

.psa-pos-order-dialog {
    width: min(560px, 100%);
    max-height: min(82vh, 720px);
    overflow: auto;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.psa-pos-order-dialog h3 {
    margin: 0;
    color: #0b2a5b;
    font-size: 26px;
    font-weight: 900;
}

.psa-pos-order-dialog > .psa-title-row .psa-pos-order-close {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0 !important;
    border-radius: 999px;
    font-size: 16px;
    line-height: 1;
}

.psa-pos-order-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 12px 0;
}

.psa-pos-order-meta div {
    padding: 10px;
    border-radius: 12px;
    background: #f3f7fc;
}

.psa-pos-order-meta span {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.psa-pos-order-meta strong {
    display: block;
    margin-top: 3px;
    color: #0b2a5b;
    font-size: 16px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.psa-pos-order-items table {
    table-layout: auto;
}

/* Large system-font guard: keep number fields readable without letting them blow up the layout. */
.psa-entry-card,
.psa-delivery-form label,
.psa-table-wrap table {
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.psa-entry-card h3 {
    font-size: clamp(24px, 5.8vw, 30px);
    line-height: 1.08;
}

.psa-entry-card input {
    min-height: 54px;
    max-height: 68px;
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1;
    padding-top: 6px;
    padding-bottom: 6px;
}

.psa-delivery-form .psa-field-mini input,
.psa-delivery-form label input {
    max-height: 54px;
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1;
}

.psa-table-wrap th,
.psa-table-wrap td {
    font-size: clamp(13px, 3.8vw, 16px);
    line-height: 1.2;
}

.psa-primary,
.psa-small-btn {
    line-height: 1.15;
}

@media (max-width: 760px) {
    body:has(.psa-app) {
        margin: 0 !important;
        overflow-x: hidden;
    }

    body:has(.psa-app) .entry-content,
    body:has(.psa-app) main {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding-top: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .psa-app {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-left: 0;
        overflow-x: hidden;
    }

    .psa-app-top {
        width: 100%;
        box-sizing: border-box;
        border-radius: 0;
        margin: 0 0 12px;
        padding: 14px 12px;
    }

    .psa-app-top h1 {
        font-size: clamp(23px, 7vw, 30px);
        line-height: 1.1;
    }

    .psa-panel,
    .psa-cards,
    .psa-filter,
    .psa-report-card,
    .psa-report-overview,
    .psa-report-detail,
    .psa-delivery-wide .psa-delivery-form,
    .psa-delivery-wide .psa-share-card,
    .psa-raw-materials,
    .psa-recipe-calculator {
        box-sizing: border-box;
        width: calc(100% - 16px);
        max-width: calc(100% - 16px);
        margin-right: 8px;
        margin-left: 8px;
    }

    .psa-panel.psa-delivery-wide {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        margin-right: 10px;
        margin-left: 10px;
        padding-right: 0;
        padding-left: 0;
    }

    .psa-delivery-wide .psa-filter,
    .psa-delivery-wide .psa-delivery-form,
    .psa-delivery-wide .psa-share-card,
    .psa-delivery-detail-card .psa-delivery-wide,
    .psa-panel.psa-delivery-wide .psa-recipe-calculator,
    .psa-panel.psa-delivery-wide .psa-raw-materials {
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-left: 0;
    }

    .psa-entry-card {
        gap: 10px;
        padding: 12px;
    }

    .psa-report-overview,
    .psa-report-detail {
        padding: 12px;
    }

    .psa-report-overview .psa-title-row {
        display: grid;
        gap: 4px;
        margin-bottom: 10px;
    }

    .psa-report-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .psa-report-metric-grid div {
        padding: 9px 7px;
    }

    .psa-report-metric-grid span {
        min-height: 30px;
        font-size: 11px;
        line-height: 1.15;
    }

    .psa-report-metric-grid strong {
        margin-top: 4px;
        font-size: clamp(14px, 4.4vw, 18px);
    }

    .psa-report-stack {
        gap: 9px;
    }

    .psa-report-card > summary {
        min-height: 54px;
        padding: 11px 12px;
        font-size: 18px;
    }

    .psa-report-card > summary::after {
        width: 34px;
        height: 34px;
    }

    .psa-report-card > summary em {
        min-width: 34px;
        height: 30px;
        font-size: 14px;
        padding: 0 9px;
    }

    .psa-report-card-body {
        padding: 8px;
    }

    .psa-raw-materials,
    .psa-recipe-calculator {
        padding: 12px;
    }

    .psa-raw-materials {
        overflow: visible;
    }

    .psa-raw-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .psa-raw-overview div {
        padding: 10px 8px;
    }

    .psa-raw-overview span {
        font-size: 12px;
    }

    .psa-raw-overview strong {
        font-size: clamp(18px, 5.5vw, 24px);
    }

    .psa-raw-toolbar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .psa-raw-receive-box,
    .psa-raw-receive-box summary,
    .psa-raw-receive-form,
    .psa-raw-receive-form label,
    .psa-raw-receive-form input,
    .psa-raw-receive-form select,
    .psa-raw-receive-form button {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .psa-recipe-calculator {
        overflow: hidden;
    }

    .psa-raw-materials .psa-section-body,
    .psa-recipe-calculator .psa-section-body,
    .psa-raw-grid,
    .psa-raw-card,
    .psa-raw-form,
    .psa-raw-receive-form,
    .psa-recipe-form,
    .psa-recipe-list,
    .psa-recipe-ingredients,
    .psa-recipe-runner,
    .psa-recipe-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .psa-section-toggle > summary {
        margin: 4px 0 8px;
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.1;
    }

    .psa-entry-sales-card {
        grid-template-columns: 1fr;
    }

    .psa-entry-slip-row {
        grid-template-columns: minmax(50px, .6fr) minmax(86px, 1fr) minmax(88px, .9fr);
        gap: 6px;
    }

    .psa-entry-line {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .psa-entry-line small {
        margin: 0;
    }

    .psa-entry-sales-card .psa-entry-remaining {
        grid-template-columns: 1fr;
        align-items: center;
        text-align: center;
    }

    .psa-entry-sales-card .psa-entry-remaining input {
        width: 100%;
        max-width: 92px;
        margin: 0 auto;
    }

    .psa-top-actions {
        gap: 6px;
    }

    .psa-password-menu summary,
    .psa-app-top .psa-logout-btn {
        padding: 9px 10px;
    }

    .psa-password-menu[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 9998;
        background: rgba(15, 23, 42, .36);
    }

    .psa-password-menu-form {
        position: fixed;
        top: 96px;
        left: 14px;
        right: 14px;
        z-index: 10000;
        width: auto;
        max-height: calc(100vh - 124px);
        overflow: auto;
        padding: 14px;
    }

    .psa-password-menu-form .psa-password-field input {
        min-height: 48px;
        max-height: 54px;
        padding-right: 48px;
        font-size: 18px;
    }

    .psa-password-menu-form .psa-eye-btn {
        width: 34px;
        max-width: 34px;
        height: 34px;
        line-height: 34px;
    }

    .psa-entry-grand {
        padding: 12px;
    }

    .psa-entry-card h3 {
        font-size: clamp(22px, 6.4vw, 28px);
    }

    .psa-entry-card label {
        gap: 6px;
    }

    .psa-entry-card input {
        min-height: 50px;
        max-height: 62px;
        font-size: clamp(26px, 9vw, 36px);
    }

    .psa-delivery-form label,
    .psa-delivery-row {
        grid-template-columns: minmax(0, 1fr) minmax(74px, 82px) minmax(74px, 82px) 0;
        gap: 6px;
        padding: 8px;
    }

    .psa-delivery-form label.psa-wholesale-row,
    .psa-delivery-row.psa-wholesale-row {
        grid-template-columns: minmax(0, 1fr) minmax(82px, 94px) 0;
    }

    .psa-delivery-form label > span:first-child,
    .psa-delivery-row > span:first-child {
        font-size: clamp(20px, 6vw, 27px);
        line-height: 1.08;
    }

    .psa-delivery-form label input,
    .psa-delivery-form .psa-field-mini input,
    .psa-delivery-row input {
        min-height: 38px;
        max-height: 50px;
        font-size: clamp(18px, 7vw, 22px);
        padding: 4px 6px;
    }

    .psa-delivery-edit-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        border-radius: 9px;
        font-size: 15px;
    }

    .psa-delivery-row-mode {
        justify-content: flex-end;
    }

    .psa-delivery-row-mode button {
        min-height: 38px;
        padding: 7px 10px;
        font-size: 13px;
    }

    .psa-delivery-row-actions {
        grid-column: 1 / -1;
    }

    .psa-field-mini em {
        font-size: clamp(12px, 3.8vw, 14px);
        line-height: 1.05;
    }

    .psa-primary {
        min-height: 50px;
        font-size: clamp(18px, 5.2vw, 21px);
        padding: 10px 14px;
    }

    .psa-small-btn {
        min-height: 40px;
        font-size: clamp(15px, 4.5vw, 17px);
        padding: 8px 10px;
    }

    .psa-table-wrap table {
        font-size: 14px;
    }

    .psa-table-wrap th,
    .psa-table-wrap td {
        padding: 7px 6px;
        font-size: clamp(12px, 3.7vw, 15px);
    }

    .psa-report-table th,
    .psa-report-table td {
        padding: 6px 5px;
        font-size: 12px;
        line-height: 1.15;
    }

    .psa-report-table {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .psa-report-table table {
        width: max-content;
        min-width: 560px;
        table-layout: auto;
    }

    .psa-report-table-wide table {
        min-width: 700px;
    }

    .psa-report-table td,
    .psa-report-table th {
        width: auto;
        max-width: none;
        white-space: nowrap;
    }

    .psa-report-table td:first-child,
    .psa-report-table th:first-child,
    .psa-report-table-wide td:nth-child(2),
    .psa-report-table-wide th:nth-child(2),
    .psa-report-table-wide td:nth-child(3),
    .psa-report-table-wide th:nth-child(3) {
        min-width: 82px;
        white-space: normal;
    }

    .psa-recipe-card-head,
    .psa-recipe-ingredient {
        grid-template-columns: minmax(0, 1fr) minmax(76px, 88px) 42px;
        min-width: 0;
    }

    .psa-recipe-card,
    .psa-raw-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .psa-recipe-card-body,
    .psa-raw-card-body {
        padding-right: 10px;
        padding-left: 10px;
    }

    .psa-recipe-ingredient label:first-child {
        grid-column: 1 / -1;
    }

    .psa-recipe-ingredient button {
        grid-column: 3;
        justify-self: end;
        align-self: end;
    }

    .psa-recipe-stock-grid,
    .psa-recipe-result-grid {
        grid-template-columns: 1fr;
    }

    .psa-raw-grid {
        grid-template-columns: 1fr;
    }

    .psa-recipe-add-ingredient {
        box-sizing: border-box;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        text-align: center;
    }

    .psa-raw-movement-table {
        display: block;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: scroll !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
    }

    .psa-raw-movement-table table {
        display: table;
        width: max-content;
        min-width: 620px;
        max-width: none;
    }

    .psa-raw-movement-table th,
    .psa-raw-movement-table td {
        padding: 6px 5px;
        font-size: 12px;
        white-space: nowrap;
    }

    .psa-raw-movement-table th:last-child,
    .psa-raw-movement-table td:last-child {
        min-width: 120px;
        white-space: normal;
    }

    .psa-raw-card-head {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 10px;
    }

    .psa-raw-movement-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
        padding: 9px;
    }

    .psa-raw-movement-card time {
        grid-column: 1 / -1;
        font-size: 12px;
    }

    .psa-raw-movement-card b {
        padding: 7px 8px;
        font-size: 13px;
    }

    .psa-recipe-form > .psa-action-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .psa-recipe-form > .psa-action-row > * {
        width: 100%;
        max-width: 100%;
    }

    .psa-raw-card .psa-action-row {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .psa-raw-card .psa-action-row > *,
    .psa-raw-receive-form .psa-primary {
        box-sizing: border-box;
        width: auto;
        max-width: 100%;
        min-width: 0;
    }

    .psa-raw-card .psa-action-row > * {
        flex: 1 1 auto;
    }

    .psa-raw-card .psa-action-row .psa-raw-delete-btn {
        flex: 0 0 42px;
    }

    .psa-raw-receive-form .psa-primary {
        justify-self: end;
    }

    .psa-raw-receive-form {
        gap: 10px;
        overflow: hidden;
        padding-top: 2px;
    }

    .psa-raw-card-body {
        padding: 10px;
    }

    .psa-pos-order-list .psa-pos-order-no-cell {
        max-width: 98px;
    }

    .psa-pos-order-modal {
        align-items: end;
        padding: 10px;
    }

    .psa-pos-order-dialog {
        max-height: 84vh;
        padding: 14px;
        border-radius: 16px 16px 0 0;
    }

    .psa-pos-order-dialog h3 {
        font-size: 22px;
    }

    .psa-pos-order-meta {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .psa-pos-order-meta div {
        padding: 8px;
    }

    .psa-cards div {
        padding: 12px;
    }

    .psa-cards strong {
        font-size: clamp(22px, 7vw, 28px);
        line-height: 1;
    }

    .psa-pos-top {
        padding: 10px 12px;
    }

    .psa-pos-top h1 {
        font-size: clamp(22px, 6.3vw, 28px);
    }

    .psa-pos-top .psa-logout-btn {
        min-width: 72px;
        padding: 7px 9px;
    }

    .psa-pos-shell {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .psa-pos-menu {
        top: auto;
        padding: 5px;
    }

    .psa-pos-category {
        min-height: 68px;
    }

    .psa-pos-category span {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }

    .psa-pos-category strong {
        max-width: 58px;
        font-size: 11px;
    }

    .psa-pos-product {
        grid-template-columns: minmax(0, 1fr) 100px;
        gap: 7px;
        min-height: 72px;
        padding: 8px 18px 8px 14px;
    }

    .psa-pos-info h2 {
        font-size: clamp(17px, 4.9vw, 21px);
        line-height: 1.14;
    }

    .psa-pos-info strong {
        font-size: clamp(17px, 4.7vw, 20px);
        white-space: nowrap;
    }

    .psa-pos-qty {
        min-width: 100px;
        gap: 4px;
    }

    .psa-pos-qty button {
        flex-basis: 29px;
        width: 29px !important;
        min-width: 29px !important;
        max-width: 29px !important;
        height: 29px;
        min-height: 29px;
        font-size: 18px;
    }

    .psa-pos-qty-input {
        flex-basis: 52px;
        width: 52px;
        min-width: 52px;
        height: 29px;
        min-height: 29px;
        font-size: 17px;
    }

    .psa-pos-setting-tabs {
        gap: 8px;
    }

    .psa-pos-setting-tab {
        min-height: 58px;
        padding: 8px 4px;
        font-size: 16px;
    }

    .psa-pos-logout-dialog h3 {
        font-size: 32px;
    }

    .psa-pos-bottom {
        grid-template-columns: minmax(0, 1fr) 60px 78px;
        min-height: 68px;
    }

    .psa-pos-pay-methods span {
        padding: 6px 2px;
        font-size: 11px;
    }

    .psa-pos-received input {
        width: 102px;
        min-height: 28px;
        font-size: 16px;
    }

    .psa-pos-total {
        gap: 8px;
        padding: 9px 10px;
    }

    .psa-pos-total strong {
        font-size: clamp(19px, 5.6vw, 25px);
    }

    .psa-pos-clear,
    .psa-pos-confirm {
        font-size: 18px;
    }

    .psa-pos-clear {
        font-size: 23px;
    }

    /* Keep the paid confirmation, including every action, inside one phone viewport. */
    .psa-pos-paid-screen,
    .psa-pos-paid-screen .psa-pos-paid-main,
    .psa-pos-paid-screen .psa-pos-change-card,
    .psa-pos-paid-screen .psa-pos-paid-details {
        box-sizing: border-box;
    }

    .psa-pos-paid-screen .psa-pos-top {
        gap: 6px;
        padding: 6px 10px;
    }

    .psa-pos-paid-screen .psa-pos-title p {
        font-size: 12px;
        line-height: 1.1;
    }

    .psa-pos-paid-screen .psa-pos-title h1 {
        font-size: 20px;
    }

    .psa-pos-paid-screen .psa-pos-top .psa-logout-btn {
        min-width: 62px;
        min-height: 44px;
        gap: 5px;
        padding: 5px 7px;
    }

    .psa-pos-paid-screen .psa-logout-btn span {
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .psa-pos-paid-screen .psa-logout-btn strong {
        font-size: 13px;
    }

    .psa-pos-paid-screen .psa-pos-paid-main {
        gap: 10px;
        width: 100%;
        padding: 14px 9px 10px;
    }

    .psa-pos-paid-screen .psa-pos-paid-main h2 {
        font-size: clamp(28px, 8vw, 34px);
    }

    .psa-pos-paid-screen .psa-pos-paid-main h2 span {
        margin-right: 4px;
    }

    .psa-pos-paid-screen .psa-pos-change-card {
        width: min(100%, 520px);
        padding: 12px 9px;
        border-radius: 13px;
    }

    .psa-pos-paid-screen .psa-pos-change-card p {
        margin-bottom: 4px;
        font-size: clamp(16px, 4.5vw, 21px);
    }

    .psa-pos-paid-screen .psa-pos-change-card strong {
        font-size: clamp(38px, 11vw, 52px);
    }

    .psa-pos-paid-screen .psa-pos-paid-details {
        width: min(100%, 520px);
        padding: 8px 12px;
        border-radius: 10px;
        box-shadow: 0 7px 18px rgba(15, 23, 42, .12);
    }

    .psa-pos-paid-screen .psa-pos-paid-details div {
        gap: 8px;
        padding: 6px 0;
    }

    .psa-pos-paid-screen .psa-pos-paid-details span {
        font-size: clamp(11px, 3.4vw, 16px);
    }

    .psa-pos-paid-screen .psa-pos-paid-details strong {
        font-size: clamp(11px, 3.6vw, 17px);
    }

    .psa-pos-paid-screen .psa-pos-paid-actions {
        gap: 6px;
        margin-top: 4px;
    }

    .psa-pos-paid-screen .psa-pos-next-order {
        min-height: 48px;
        border-radius: 9px;
        font-size: clamp(22px, 6.5vw, 30px);
    }

    .psa-pos-paid-screen .psa-pos-print-receipt,
    .psa-pos-paid-screen .psa-pos-share-receipt {
        min-height: 44px;
        border-radius: 7px;
        font-size: clamp(14px, 4.2vw, 18px);
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    .psa-pos-paid-main,
    .psa-pos-paid-main * {
        visibility: visible !important;
    }

    .psa-pos-paid-main {
        position: absolute;
        inset: 0;
        max-width: none;
        padding: 24px;
    }

    .psa-pos-paid-actions,
    .psa-pos-top {
        display: none !important;
    }
}
