:root {
    --blue: #2563eb;
    --blue-dark: #101f46;
    --teal: #00a6b4;
    --green: #0f9f6e;
    --red: #c33a3a;
    --amber: #a15c00;
    --pink: #ff4f8b;
    --lime: #c7f464;
    --ink: #111827;
    --muted: #667085;
    --line: #dbe3f0;
    --soft: #f3f7fb;
    --white: #ffffff;
    --shadow: 0 18px 46px rgba(16, 31, 70, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(0, 166, 180, 0.08), transparent 34%),
        linear-gradient(225deg, rgba(255, 79, 139, 0.08), transparent 32%),
        var(--soft);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.minimal-page {
    background:
        linear-gradient(135deg, rgba(0, 166, 180, 0.1), transparent 38%),
        linear-gradient(225deg, rgba(199, 244, 100, 0.14), transparent 34%),
        #eef4fb;
}

a {
    color: var(--blue);
    text-decoration: none;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(16, 31, 70, 0.96);
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 19px;
    font-weight: 800;
    white-space: nowrap;
}

.brand::before {
    content: none;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--white);
    padding: 4px;
    box-shadow: 0 10px 24px rgba(0, 166, 180, 0.22);
}

.brand-mark {
    position: relative;
    display: inline-block;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 166, 180, 0.22);
}

.brand-mark img {
    position: absolute;
    top: 0;
    left: 0;
    width: 327%;
    height: auto;
    max-width: none;
    transform: translate(-29.1%, -10.6%);
}

.brand-text {
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--white);
    border-radius: 6px;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 14px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: 274px;
    padding: 18px 16px;
    background: #122247;
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 14px 0 40px rgba(16, 31, 70, 0.16);
    overflow-y: auto;
}

.admin-content {
    min-height: 100vh;
    margin-left: 274px;
    min-width: 0;
}

.admin-brand {
    display: flex;
    min-height: 56px;
    margin-bottom: 18px;
    padding: 0 4px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-brand .brand-logo {
    width: 48px;
    height: 48px;
}

.admin-brand .brand-mark {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
}

.admin-role-chip {
    width: fit-content;
    margin: -12px 4px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 5px 9px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.station-topbar .container {
    min-height: 68px;
}

.station-label {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 7px 10px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-brand .brand-text {
    white-space: normal;
    line-height: 1.15;
}

.admin-nav {
    display: grid;
    gap: 7px;
}

.admin-nav-group {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.admin-nav-group details,
.admin-nav-group summary {
    width: 100%;
}

.admin-nav-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 9px 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.admin-nav-group summary::-webkit-details-marker {
    display: none;
}

.admin-nav-group summary:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.admin-nav-chevron {
    font-size: 22px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.18s ease;
}

.admin-nav-group details[open] .admin-nav-chevron {
    transform: rotate(90deg);
}

.admin-nav-submenu {
    display: grid;
    gap: 2px;
    padding: 0 6px 6px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-radius: 8px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 800;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.admin-nav .admin-nav-home {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-nav-submenu a {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
}

.admin-nav .logout-link {
    background: rgba(195, 58, 58, 0.18);
    color: #fff;
}

.admin-nav .customer-page-link {
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.8);
}

.admin-mobile-bar {
    display: none;
}

.admin-menu-toggle,
.admin-menu-backdrop {
    display: none;
}

.admin-menu-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    padding: 10px;
}

.admin-menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #fff;
}

.has-admin-shell .hero {
    padding: 34px 0 22px;
}

.has-admin-shell .hero h1 {
    font-size: 40px;
}

.has-admin-shell main > .container,
.has-admin-shell main > .container.grid {
    margin-top: 20px;
}

.hero {
    padding: 38px 0 24px;
    background:
        linear-gradient(120deg, rgba(37, 99, 235, 0.16), rgba(0, 166, 180, 0.1) 45%, rgba(255, 79, 139, 0.09)),
        #f7fbff;
    border-bottom: 1px solid #e6ecf5;
}

.scan-hero {
    padding: 28px 0 20px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(0, 166, 180, 0.08)),
        #eef4fb;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: 42px;
    color: var(--blue-dark);
    line-height: 1.08;
}

.hero-brand {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
}

.hero-logo {
    width: 190px;
    height: 136px;
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 18px 42px rgba(16, 31, 70, 0.14);
}

.logo-lockup {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fff;
}

.logo-lockup img {
    position: absolute;
    top: 0;
    left: 0;
    width: 163.2%;
    height: auto;
    max-width: none;
    transform: translate(-10.65%, -10.7%);
}

.hero-kicker {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 10px !important;
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--teal) !important;
    border: 1px solid rgba(0, 166, 180, 0.24);
    font-size: 12px !important;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

main > .container,
main > .container.grid {
    margin-top: 18px;
}

.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.machine-card {
    position: relative;
    overflow: hidden;
}

.machine-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--blue), var(--teal), var(--pink), var(--lime));
}

.machine-card h2 {
    margin-top: 6px;
}

.machine-live-note {
    min-height: 22px;
    margin: -2px 0 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.panel h2 {
    margin-top: 0;
    color: var(--ink);
}

.grid {
    display: grid;
    gap: 18px;
    align-items: start;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.machine-status,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-ready,
.status-paid,
.status-finished,
.status-waiting_start {
    color: #07543b;
    background: #dff7ec;
}

.status-running,
.status-queued,
.status-command_sent {
    color: var(--amber);
    background: #fff1cc;
}

.status-error,
.status-offline,
.status-failed {
    color: #8c1f1f;
    background: #ffe1e1;
}

.status-maintenance,
.status-pending {
    color: #344054;
    background: #edf2f7;
}

.status-paused {
    color: #17436f;
    background: #dcecff;
}

.package-option {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.package-option:hover,
.package-option:has(input:checked) {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.package-option:hover {
    transform: translateY(-1px);
}

.package-option input {
    margin: 0;
    grid-row: 1 / span 2;
}

.package-name {
    font-weight: 800;
    display: block;
}

.package-meta {
    color: var(--muted);
    margin-top: 0;
    line-height: 1.45;
    grid-column: 2;
}

.form-row {
    display: grid;
    gap: 7px;
    margin-bottom: 15px;
}

label {
    font-weight: 800;
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 13px;
    font: inherit;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 110px;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.scan-layout {
    display: grid;
    grid-template-columns: minmax(250px, 0.68fr) minmax(0, 1.42fr);
    gap: 20px;
    align-items: start;
}

.machine-summary-panel {
    position: sticky;
    top: 86px;
    overflow: hidden;
}

.machine-summary-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
}

.summary-eyebrow {
    margin: 4px 0 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.machine-summary-panel h2 {
    margin-bottom: 4px;
}

.machine-code {
    margin: 0 0 18px;
    color: var(--teal);
    font-weight: 900;
}

.machine-facts {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.machine-facts div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.machine-facts dt {
    color: var(--muted);
    font-weight: 700;
}

.machine-facts dd {
    margin: 0;
    font-weight: 900;
    text-align: right;
}

.compact-notice {
    margin: 16px 0 0;
    padding: 14px;
}

.compact-notice p {
    margin-top: 5px;
}

.checkout-panel h2 {
    margin-bottom: 16px;
}

.package-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.voucher-apply-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.voucher-apply-button {
    min-width: 112px;
}

.voucher-feedback {
    min-height: 20px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.voucher-feedback.is-success {
    color: #087451;
}

.voucher-feedback.is-error {
    color: var(--red);
}

.checkout-summary {
    display: grid;
    gap: 10px;
    margin: 20px 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    background: #f8fbff;
}

.checkout-summary > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.checkout-summary span {
    color: var(--muted);
}

.checkout-summary strong {
    color: var(--blue-dark);
    text-align: right;
}

.checkout-summary .checkout-total {
    border-top: 1px solid var(--line);
    padding-top: 11px;
    font-size: 18px;
    font-weight: 900;
}

.checkout-submit {
    width: 100%;
}

.settings-overview {
    margin-bottom: 22px;
}

.restricted-setting-card {
    border-color: rgba(15, 159, 110, 0.22);
    background: #f2fcf7;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0 16px;
}

.section-heading h2,
.section-heading p {
    margin: 0;
}

.section-heading > p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.5;
}

.gateway-config-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.gateway-config-card {
    display: flex;
    flex-direction: column;
}

.gateway-config-card[hidden] {
    display: none;
}

.gateway-config-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gateway-config-tabs button {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 9px 13px;
    background: #fff;
    color: var(--blue-dark);
    font-weight: 800;
    cursor: pointer;
}

.gateway-config-tabs button.is-active {
    border-color: #128fa1;
    background: #eaf8fa;
    color: #087381;
}

.gateway-config-card .small-muted {
    margin-top: -8px;
}

.gateway-config-card > .button {
    width: fit-content;
    margin-top: auto;
}

.gateway-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.gateway-card-head > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gateway-card-head h2 {
    margin: 0;
}

.gateway-number {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e8f0fb;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.webhook-info {
    margin-top: 18px;
}

.copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.access-denied {
    margin-top: 40px;
}

input[type="radio"],
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: var(--blue);
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 11px 17px;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
}

.button:hover {
    filter: brightness(0.96);
}

.button.secondary {
    background: #e8f0fb;
    color: var(--blue-dark);
}

.button.success {
    background: var(--green);
}

.button.warning {
    background: var(--amber);
}

.button.danger {
    background: var(--red);
}

.action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.panel > p .button {
    margin: 3px 6px 3px 0;
}

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 17px;
    box-shadow: var(--shadow);
}

.stat strong {
    color: var(--blue-dark);
}

.stat span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stat strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
}

.alert {
    border-radius: 8px;
    padding: 13px 15px;
    margin-bottom: 16px;
    background: #fff1cc;
    color: #7a4d00;
    line-height: 1.5;
}

.success-alert {
    background: #dff7ec;
    color: #07543b;
}

.status-summary {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #f8fbff;
}

.status-summary strong {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.status-summary p {
    margin: 0;
    font-weight: 800;
}

.service-notice {
    border: 1px solid #f3d591;
    border-radius: 8px;
    padding: 18px;
    margin: 18px 0;
    background: #fff8e6;
    color: #674000;
}

.service-notice.success-alert {
    border-color: #b7ebd0;
    background: #effcf5;
    color: #07543b;
}

.service-notice h2 {
    margin: 0 0 8px;
    color: inherit;
    font-size: 22px;
}

.service-notice p {
    margin: 0;
    line-height: 1.55;
}

.realtime-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
    border: 1px solid rgba(0, 166, 180, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(0, 166, 180, 0.08);
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.home-realtime-strip {
    margin-top: 18px;
    margin-bottom: 0;
}

.realtime-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(15, 159, 110, 0.12);
}

.link-button {
    margin-left: auto;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--blue);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    padding: 7px 10px;
}

.notification-button {
    min-height: 36px;
    padding: 8px 12px;
    margin-left: auto;
    font-size: 13px;
    white-space: nowrap;
}

.service-times {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.service-times > span {
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(15, 159, 110, 0.12);
    padding: 14px;
    min-width: 0;
}

.service-times strong {
    display: block;
    margin-bottom: 6px;
    color: #07543b;
    line-height: 1.25;
}

.service-times > span > span {
    display: block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.notification-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99;
    display: grid;
    gap: 4px;
    width: min(360px, calc(100% - 32px));
    border: 1px solid rgba(15, 159, 110, 0.22);
    border-radius: 8px;
    padding: 14px 16px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 20px 50px rgba(16, 31, 70, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.notification-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast.success {
    border-color: rgba(15, 159, 110, 0.28);
    background: #effcf5;
}

.notification-toast.info {
    border-color: rgba(37, 99, 235, 0.22);
    background: #f3f7ff;
}

.notification-toast strong {
    color: var(--blue-dark);
    font-size: 15px;
}

.notification-toast span {
    color: var(--muted);
    line-height: 1.45;
}

.small-muted {
    margin-top: 12px !important;
    color: var(--muted);
    font-size: 13px !important;
}

.active-machine-summary {
    border-color: rgba(15, 159, 110, 0.24);
    background: rgba(15, 159, 110, 0.08);
}

.transaction-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.transaction-actions {
    min-width: 220px;
}

.inline-actions .button {
    width: auto;
    min-height: 38px;
    padding: 9px 12px;
}

.primary-action {
    font-size: 16px;
    min-height: 52px;
}

.status-actions {
    margin-top: 12px;
}

.gateway-status-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 16px;
}

.gateway-status-list .status-summary {
    background: #ffffff;
}

.gateway-status-list p {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 16px;
    font-weight: 800;
}

.voucher-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.voucher-form .form-row {
    margin-bottom: 0;
}

.voucher-form .check-row,
.voucher-form .button,
.compact-voucher-form + .compact-form {
    align-self: end;
}

.voucher-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.voucher-card {
    display: grid;
    gap: 16px;
}

.voucher-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.voucher-code {
    display: inline-flex;
    margin: 0 0 8px;
    border-radius: 999px;
    padding: 7px 11px;
    background: #e9f8fb;
    color: var(--teal);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.voucher-card h2 {
    margin: 0;
}

.voucher-info-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.voucher-info-grid div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fbff;
}

.voucher-info-grid strong,
.voucher-info-grid span {
    display: block;
}

.voucher-info-grid strong {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.voucher-info-grid span {
    font-weight: 900;
    overflow-wrap: anywhere;
}

.inline-edit {
    display: grid;
    gap: 8px;
    min-width: 260px;
}

.admin-machine-grid {
    display: grid;
    gap: 16px;
}

.admin-machine-card {
    display: grid;
    gap: 18px;
    overflow: hidden;
}

.admin-machine-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.admin-machine-head h2 {
    margin: 0 0 6px;
}

.admin-machine-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.admin-machine-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: start;
}

.admin-device-box {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.admin-device-box input,
.admin-edit-form input {
    min-width: 0;
}

.admin-qr-box {
    display: grid;
    gap: 10px;
    justify-items: center;
    align-content: start;
}

.admin-qr-box img {
    width: 180px;
    height: 180px;
    max-width: 100%;
    object-fit: contain;
}

.admin-machine-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 10px;
    align-items: center;
}

.compact-form {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.compact-form select {
    min-width: 150px;
}

.admin-edit-form {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.controller-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.controller-card {
    display: grid;
    gap: 16px;
}

.controller-card.is-highlighted {
    border-color: #16a6b6;
    box-shadow: 0 0 0 3px rgba(22, 166, 182, 0.12), var(--shadow);
}

.controller-card-head,
.controller-stats,
.controller-danger-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.controller-card-head h2,
.controller-card-head p {
    margin: 0;
}

.controller-card-head p {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 800;
}

.controller-wiring {
    margin: 2px 0;
    padding: 16px;
    border: 1px solid var(--line);
    background: #f7fafc;
    border-radius: 8px;
}

.controller-wiring .section-heading {
    margin-bottom: 12px;
}

.controller-wiring h3,
.controller-wiring p {
    margin: 0;
}

.controller-wiring p {
    color: var(--muted);
    font-size: 14px;
}

.wiring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
}

.wiring-channel {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.wiring-channel strong,
.wiring-channel span,
.wiring-channel small {
    display: block;
}

.wiring-channel span {
    margin: 2px 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.wiring-channel small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wiring-channel.is-used {
    border-color: #8bd8c2;
    background: #edfbf6;
}

.controller-stats .status-summary {
    flex: 1 1 0;
}

.controller-machine-list {
    min-height: 24px;
    margin: 0;
}

.controller-settings-form {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.qris-image {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.qr-sheet {
    display: flex;
    justify-content: center;
}

.qr-card {
    width: min(520px, 100%);
    padding: 28px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    text-align: center;
    background: #fff;
}

.qr-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 154px;
    height: 110px;
    margin: 0 auto 8px;
    overflow: hidden;
}

.qr-logo img {
    position: static;
    inset: auto;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    object-fit: contain;
    object-position: center;
    transform: none;
}

.qr-card h2 {
    margin: 10px 0 4px;
    font-size: 32px;
    line-height: 1.15;
}

.qr-card img {
    width: min(420px, 100%);
    height: auto;
    margin: 14px auto;
}

.qr-brand,
.qr-code {
    font-weight: 800;
    color: var(--blue-dark);
}

.qr-code {
    font-size: 26px;
    letter-spacing: 0;
}

.qr-caption {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.45;
}

.footer {
    padding: 32px 0;
    color: var(--muted);
    font-size: 13px;
}

.report-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.report-filter .form-row {
    margin-bottom: 0;
}

.report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-stats,
.report-grid {
    margin-top: 18px;
}

@media print {
    body {
        background: #fff;
    }

    .no-print,
    .topbar,
    .admin-sidebar,
    .admin-mobile-bar,
    .admin-menu-backdrop,
    .footer {
        display: none !important;
    }

    .admin-content {
        margin-left: 0 !important;
    }

    .container {
        width: 100%;
    }

    .panel {
        box-shadow: none;
        border: 0;
    }

    .qr-sheet {
        min-height: 95vh;
        align-items: center;
    }
}

@media (max-width: 920px) {
    .admin-sidebar {
        width: min(82vw, 308px);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    .admin-content {
        margin-left: 0;
    }

    .admin-mobile-bar {
        position: sticky;
        top: 0;
        z-index: 35;
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 64px;
        padding: 10px 16px;
        background: rgba(16, 31, 70, 0.97);
        color: #fff;
        box-shadow: 0 12px 28px rgba(16, 31, 70, 0.14);
    }

    .admin-menu-toggle {
        display: inline-grid;
        align-content: center;
        flex: 0 0 auto;
    }

    .admin-mobile-bar .brand {
        min-width: 0;
        overflow: hidden;
    }

    .admin-mobile-bar .brand-text {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 38;
        border: 0;
        background: rgba(8, 18, 43, 0.46);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.admin-menu-open .admin-sidebar {
        transform: translateX(0);
    }

    body.admin-menu-open .admin-menu-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    body.admin-menu-open {
        overflow: hidden;
    }

    .controller-grid {
        grid-template-columns: 1fr;
    }

    .grid.three,
    .grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .machine-summary-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .topbar {
        position: static;
    }

    .topbar:not(.station-topbar) .container {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 0;
    }

    .station-topbar .container {
        flex-direction: row;
        align-items: center;
        padding: 9px 0;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .nav-links a {
        flex: 0 0 auto;
        background: rgba(255, 255, 255, 0.08);
    }

    .hero {
        padding: 26px 0 18px;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .brand-mark {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .hero-brand {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .hero-logo {
        width: 154px;
        height: 110px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 15px;
    }

    .grid.two,
    .grid.three,
    .grid.four {
        grid-template-columns: 1fr;
    }

    .scan-layout,
    .gateway-config-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: grid;
        align-items: start;
    }

    .panel {
        padding: 16px;
    }

    .button,
    .action-row .button {
        width: 100%;
    }

    .package-option {
        padding: 13px;
    }

    .service-times {
        grid-template-columns: 1fr;
    }

    .service-notice {
        padding: 16px;
        background: #fff9ea;
    }

    .service-notice.success-alert {
        background: #effcf5;
    }

    .service-notice h2 {
        font-size: 24px;
        line-height: 1.18;
    }

    .service-notice p {
        font-size: 16px;
        line-height: 1.55;
    }

    .realtime-strip {
        align-items: stretch;
        gap: 10px;
    }

    .realtime-strip .realtime-dot {
        margin-top: 6px;
    }

    .realtime-strip span:not(.realtime-dot) {
        flex: 1 1 calc(100% - 24px);
    }

    .notification-button {
        width: 100%;
        margin-left: 0;
    }

    .service-times > span {
        padding: 14px 16px;
    }

    .report-filter {
        grid-template-columns: 1fr;
    }

    .report-actions .button {
        width: 100%;
    }

    .gateway-status-list {
        grid-template-columns: 1fr;
    }

    .gateway-config-card > .button {
        width: 100%;
    }

    .voucher-form {
        grid-template-columns: 1fr;
    }

    .voucher-card-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .voucher-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-machine-head,
    .admin-machine-actions,
    .compact-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-machine-body {
        grid-template-columns: 1fr;
    }

    .admin-qr-box {
        justify-items: stretch;
    }

    .admin-qr-box img {
        justify-self: center;
    }

    .compact-form select {
        width: 100%;
    }

    .qris-image {
        margin: 0 auto;
    }

    .qr-card {
        padding: 20px;
    }

    .qr-card h2 {
        font-size: 26px;
    }

    th,
    td {
        padding: 11px 10px;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .hero h1 {
        font-size: 30px;
    }

    .status-summary {
        padding: 13px;
    }

    .voucher-info-grid {
        grid-template-columns: 1fr;
    }

    .notification-toast {
        right: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
    }

    .brand-text {
        font-size: 16px;
    }

    .station-label {
        display: none;
    }

    .voucher-apply-row,
    .copy-field {
        grid-template-columns: 1fr;
    }

    .voucher-apply-button,
    .copy-field .button {
        width: 100%;
    }
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.section-heading-row h2 {
    margin: 0;
}

.section-heading-row p {
    margin: 6px 0 0;
    color: var(--muted);
}

.voucher-import-panel {
    margin-bottom: 18px;
}

.voucher-import-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 16px;
    align-items: end;
    margin-top: 18px;
}

.voucher-import-form .form-row {
    margin: 0;
}

.voucher-import-form input[type="file"] {
    padding: 12px;
    background: #f8fbff;
}

.voucher-import-form small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
}

.import-warning ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.employee-access-note {
    border-left: 4px solid #1b9aaa;
}

.owner-delete-box {
    width: 100%;
    border: 1px solid #efc3c3;
    border-radius: 8px;
    background: #fff8f8;
}

.owner-delete-box summary {
    padding: 10px 12px;
    color: #9f2727;
    font-weight: 800;
    cursor: pointer;
}

.owner-delete-form {
    display: grid;
    gap: 9px;
    padding: 0 12px 12px;
}

.owner-delete-form label span {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 800;
}

.owner-delete-form input {
    width: 100%;
}

.admin-dashboard-hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
}

.dashboard-eyebrow {
    margin: 0 0 8px !important;
    color: #087f8f !important;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.dashboard-health {
    min-width: 190px;
    border: 1px solid #a8dfd1;
    border-radius: 8px;
    padding: 14px 16px;
    background: #effcf7;
    color: #07543b;
}

.dashboard-health.needs-attention {
    border-color: #f3d591;
    background: #fff8e8;
    color: #8a5100;
}

.dashboard-health span,
.dashboard-health strong {
    display: block;
}

.dashboard-health span {
    font-size: 12px;
    font-weight: 800;
}

.dashboard-health strong {
    margin-top: 4px;
    font-size: 18px;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-stat {
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-stat small {
    margin-top: 7px;
    color: var(--muted);
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.dashboard-panel {
    min-width: 0;
}

.compact-button {
    width: auto;
    min-height: 40px;
    white-space: nowrap;
}

.dashboard-machine-list,
.dashboard-transaction-list {
    display: grid;
    margin-top: 18px;
}

.dashboard-machine-row,
.dashboard-transaction-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px 4px;
    border-top: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}

.dashboard-machine-row:hover,
.dashboard-transaction-row:hover {
    background: #f8fbff;
}

.machine-type-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #e7f7fb;
    color: #087f8f;
    font-weight: 900;
}

.machine-row-copy,
.transaction-row-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.machine-row-copy small,
.transaction-row-copy small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transaction-row-total {
    display: grid;
    justify-items: end;
    gap: 6px;
    text-align: right;
}

.dashboard-quick-section {
    margin-top: 18px;
}

.dashboard-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.dashboard-quick-grid a {
    display: grid;
    gap: 5px;
    min-height: 94px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 17px;
    background: #fff;
    color: var(--blue-dark);
    text-decoration: none;
    box-shadow: var(--shadow);
}

.dashboard-quick-grid a:hover {
    border-color: #84ced7;
    transform: translateY(-1px);
}

.dashboard-quick-grid span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.empty-state {
    padding: 18px 0;
    color: var(--muted);
}

@media (max-width: 1000px) {
    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .section-heading-row,
    .admin-dashboard-hero .container {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-health {
        min-width: 0;
    }

    .dashboard-stat-grid,
    .dashboard-quick-grid,
    .voucher-import-form {
        grid-template-columns: 1fr;
    }

    .voucher-import-form .button,
    .voucher-import-panel .section-heading-row .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dashboard-stat {
        min-height: 108px;
    }

    .dashboard-machine-row,
    .dashboard-transaction-row {
        align-items: flex-start;
    }

    .dashboard-machine-row .badge {
        margin-top: 3px;
    }

    .transaction-row-total {
        min-width: 96px;
    }
}

/* Integrated add-on POS */
.compact-page-head {
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(17, 43, 93, 0.08);
    padding: 24px 0 20px;
    background: #f5f9ff;
}

.compact-page-head .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.compact-page-head h1 {
    margin: 5px 0 4px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
}

.compact-page-head p {
    margin: 0;
    color: var(--muted);
}

.active-payment-pill,
.pos-payment-note {
    display: grid;
    gap: 3px;
    border: 1px solid #cfe8e4;
    border-radius: 8px;
    padding: 11px 14px;
    background: #f0faf7;
}

.active-payment-pill span,
.pos-payment-note span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.pos-category-tabs {
    display: flex;
    gap: 7px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 3px;
}

.pos-category-tabs button {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 12px;
    background: #fff;
    color: var(--blue-dark);
    font-weight: 800;
    cursor: pointer;
}

.pos-category-tabs button.is-active {
    border-color: #108fa0;
    background: #eaf8fa;
    color: #087381;
}

.friendly-empty-state {
    grid-column: 1 / -1;
    border: 1px dashed #b8c8dc;
    border-radius: 8px;
    padding: 28px;
    text-align: center;
}

.friendly-empty-state p {
    color: var(--muted);
}

.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr);
    gap: 18px;
    align-items: start;
}

.pos-catalog,
.pos-cart {
    min-width: 0;
}

.pos-cart {
    position: sticky;
    top: 18px;
}

.pos-search {
    width: min(100%, 320px);
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.pos-product {
    display: grid;
    gap: 7px;
    min-height: 142px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    color: var(--blue-dark);
    text-align: left;
    cursor: pointer;
}

.pos-product:hover {
    border-color: #54b8c5;
    background: #f5fcfd;
}

.pos-product.is-sold-out {
    opacity: .55;
    cursor: not-allowed;
}

.pos-product-category {
    color: #087f8f;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.pos-product strong {
    font-size: 17px;
    line-height: 1.3;
}

.pos-product small {
    color: var(--muted);
}

.pos-cart-items {
    display: grid;
    margin: 14px 0;
    border-top: 1px solid var(--line);
}

.pos-cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

.pos-cart-row > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.pos-cart-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-cart-row small {
    color: var(--muted);
}

.pos-qty-control {
    display: grid;
    grid-template-columns: 34px 32px 34px;
    align-items: center;
}

.pos-qty-control button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #edf4fd;
    color: var(--blue-dark);
    font-size: 19px;
    font-weight: 900;
    cursor: pointer;
}

.pos-qty-control span {
    text-align: center;
    font-weight: 900;
}

.pos-cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 18px;
    border-radius: 8px;
    padding: 15px;
    background: #eef9f6;
}

.pos-cart-summary strong {
    color: #07543b;
    font-size: 24px;
}

.pos-payment-note {
    margin: 0 0 14px;
}

.payment-waiting-alert strong {
    font-size: 16px;
}

.pos-pay-button {
    width: 100%;
}

.pos-admin-product-list {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.pos-admin-product.is-inactive {
    opacity: .72;
}

.stock-chip {
    border-radius: 999px;
    padding: 8px 12px;
    background: #dff6ec;
    color: #07543b;
    font-size: 13px;
    font-weight: 900;
}

.stock-chip.is-low {
    background: #fff0c9;
    color: #8a5100;
}

.pos-product-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, .75fr);
    gap: 18px;
    margin-top: 16px;
}

.stock-adjust-form {
    align-self: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #f8fbff;
}

.report-filter {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
}

.report-summary {
    margin-top: 18px;
}

.receipt-page {
    width: min(100%, 460px);
    margin: 24px auto;
    padding: 0 14px 28px;
}

.thermal-receipt {
    border: 1px solid #dbe4f0;
    padding: 22px;
    background: #fff;
    color: #111;
    box-shadow: var(--shadow);
}

.thermal-receipt header {
    border-bottom: 1px dashed #777;
    padding-bottom: 14px;
    text-align: center;
}

.thermal-receipt header img {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.thermal-receipt h1 {
    margin: 5px 0;
    font-size: 22px;
}

.thermal-receipt p {
    margin: 4px 0;
}

.receipt-meta,
.receipt-items,
.receipt-totals {
    border-bottom: 1px dashed #777;
    padding: 12px 0;
}

.receipt-meta p,
.receipt-totals p,
.receipt-items > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.receipt-meta strong,
.receipt-totals strong {
    text-align: right;
}

.receipt-items {
    display: grid;
    gap: 10px;
}

.receipt-items span {
    display: grid;
}

.receipt-items small {
    margin-top: 3px;
    color: #555;
}

.receipt-void {
    margin: 14px 0;
    border: 2px solid #b42318;
    padding: 10px;
    color: #b42318;
    text-align: center;
    font-weight: 900;
}

.thermal-receipt footer {
    padding-top: 12px;
    text-align: center;
}

.receipt-actions {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.audit-json {
    max-width: 420px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 11px;
}

@media (max-width: 1120px) {
    .pos-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .pos-layout,
    .pos-product-admin-grid {
        grid-template-columns: 1fr;
    }

    .pos-cart {
        position: static;
    }

    .compact-page-head .container {
        align-items: stretch;
        flex-direction: column;
    }

    .report-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .pos-product-grid,
    .report-filter {
        grid-template-columns: 1fr;
    }

    .pos-product {
        min-height: 118px;
    }

    .pos-search {
        width: 100%;
    }

    .section-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .thermal-receipt {
        padding: 16px;
    }
}

@media print {
    @page {
        size: 80mm auto;
        margin: 3mm;
    }

    body {
        background: #fff !important;
    }

    .receipt-page {
        width: 74mm;
        margin: 0;
        padding: 0;
    }

    .thermal-receipt {
        border: 0;
        padding: 0;
        box-shadow: none;
        font-size: 11px;
    }

    .thermal-receipt header img {
        width: 18mm;
        height: 18mm;
    }

    .receipt-actions {
        display: none !important;
    }
}
