.tcfix-install-panel,
.tc-pwa-install,
#tc-pwa-install,
[data-tc-install-prompt],
.tillconnect-install-prompt {
    position: relative !important;
}

.tcfix-install-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 9999 !important;
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(7, 27, 58, .12) !important;
    color: #071b3a !important;
    font: 700 24px/30px Arial, sans-serif !important;
    text-align: center !important;
    cursor: pointer !important;
}
.tcfix-install-close:hover,
.tcfix-install-close:focus-visible {
    background: rgba(7, 27, 58, .22) !important;
    outline: 2px solid #19c99a !important;
}

body.tcfix-packages-page main.tcfix-packages {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.tcfix-wrap {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
}
.tcfix-packages-hero {
    padding: 82px 0 72px;
    background: radial-gradient(circle at 86% 18%, rgba(25,201,154,.17), transparent 30%), #071b3a;
    color: #fff;
}
.tcfix-kicker {
    display: block;
    margin-bottom: 12px;
    color: #19c99a;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.tcfix-packages-hero h1 {
    max-width: 850px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(2.1rem, 4.2vw, 4rem);
    line-height: 1.04;
    letter-spacing: -.04em;
}
.tcfix-packages-hero p {
    max-width: 800px;
    margin: 0;
    color: #c1cde0;
    font-size: 1.05rem;
}
.tcfix-packages-section {
    padding: 84px 0 92px;
    background: #f6f8fb;
}
.tcfix-package-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}
.tcfix-package-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 24px;
    border: 1px solid #dce5ef;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(7,27,58,.06);
}
.tcfix-package-card.featured {
    border-color: #19c99a;
    background: #071b3a;
    color: #fff;
    box-shadow: 0 22px 50px rgba(7,27,58,.18);
}
.tcfix-package-name {
    margin-bottom: 9px;
    color: #119775;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.featured .tcfix-package-name { color: #19c99a; }
.tcfix-package-card h2 {
    min-height: 2.35em;
    margin: 0 0 12px !important;
    color: #071b3a;
    font-size: clamp(.9rem, 1.05vw, 1.08rem) !important;
    line-height: 1.16 !important;
    letter-spacing: -.02em !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.featured h2 { color: #fff !important; }
.tcfix-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}
.tcfix-price strong {
    color: #071b3a;
    font-size: 2rem;
    line-height: 1;
}
.tcfix-price span {
    color: #67778e;
    font-size: .72rem;
    font-weight: 750;
}
.featured .tcfix-price strong { color: #19c99a; }
.featured .tcfix-price span { color: #c1cde0; }
.tcfix-package-card > p {
    min-height: 88px;
    margin: 0 0 15px;
    color: #65758b;
    font-size: .85rem;
}
.featured > p { color: #c1cde0; }
.tcfix-limits {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 10px;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 13px;
    background: #f3f7fb;
}
.featured .tcfix-limits { background: rgba(255,255,255,.08); }
.tcfix-limits strong { color: #071b3a; font-size: 1.05rem; }
.tcfix-limits span { color: #65758b; font-size: .7rem; }
.featured .tcfix-limits strong { color: #19c99a; }
.featured .tcfix-limits span { color: #c1cde0; }
.tcfix-package-card ul {
    flex: 1;
    margin: 0 0 18px;
    padding-left: 18px;
    color: #53647a;
    font-size: .79rem;
}
.featured ul { color: #c1cde0; }
.tcfix-package-card li { margin: 7px 0; }
.tcfix-addons {
    display: grid;
    gap: 5px;
    margin: 0 0 18px;
    padding: 13px;
    border: 1px solid rgba(25,201,154,.4);
    border-radius: 13px;
    background: rgba(25,201,154,.09);
    font-size: .74rem;
}
.tcfix-addons strong { color: #fff; }
.tcfix-addons span { color: #c1cde0; }
.tcfix-addons b { color: #19c99a; }
.tcfix-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding: 10px 17px;
    border: 1px solid #071b3a;
    border-radius: 11px;
    background: transparent;
    color: #071b3a;
    font-weight: 850;
    text-decoration: none !important;
}
.featured .tcfix-button {
    border-color: #19c99a;
    background: #19c99a;
    color: #071b3a;
}
.tcfix-note {
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: 16px;
    background: #fff3df;
    color: #526176;
    font-size: .88rem;
}
.tcfix-note strong { color: #071b3a; }

@media (max-width: 1180px) {
    .tcfix-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tcfix-package-card h2 { min-height: 0; font-size: 1rem !important; }
    .tcfix-package-card > p { min-height: 0; }
}
@media (max-width: 680px) {
    .tcfix-wrap { width: min(100% - 28px, 1440px); }
    .tcfix-packages-hero { padding: 62px 0 54px; }
    .tcfix-packages-section { padding: 58px 0 68px; }
    .tcfix-package-grid { grid-template-columns: 1fr; }
}

/* 1.4.0: show each business's own identity in the manager header. */
.tc-app-header .tc-wordmark .tcfix-header-logo {
    display: block;
    max-width: 92px;
    max-height: 31px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.tc-app-header .tc-wordmark .tc-mark.has-logo {
    width: auto;
    min-width: 37px;
    max-width: 110px;
    padding: 3px 7px;
    overflow: hidden;
    background: #fff;
}

/* 1.5.0: simple, separate Food / Drinks dispatch controls in Tables & tabs. */
#tc-tab-editor .tc-tab-dispatch-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1 1 620px;
    min-width: min(620px, 100%);
    gap: 10px;
}
#tc-tab-editor .tc-tab-dispatch-card {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dfe5ee;
    border-radius: 12px;
    background: #f8fafc;
}
#tc-tab-editor .tc-tab-dispatch-card.is-food { border-left: 5px solid #071b3a; }
#tc-tab-editor .tc-tab-dispatch-card.is-drinks { border-left: 5px solid #19c99a; }
#tc-tab-editor .tc-tab-dispatch-copy { display: grid; gap: 2px; min-width: 0; }
#tc-tab-editor .tc-tab-dispatch-copy strong { font-size: 14px; line-height: 1.2; }
#tc-tab-editor .tc-tab-dispatch-copy small { color: #65758b; font-size: 12px; }
#tc-tab-editor .tc-tab-dispatch-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#tc-tab-editor .tc-tab-dispatch-buttons .btn { min-height: 40px; margin: 0; }
#tc-tab-editor .tc-tab-dispatch-help {
    flex: 1 0 100%;
    margin: -2px 0 0;
    color: #65758b;
    font-size: 12px;
}
#tc-tab-editor .tc-tab-secondary-actions { flex: 0 0 auto; }
@media(max-width: 920px) {
    #tc-tab-editor .tc-tab-dispatch-grid { grid-template-columns: 1fr; min-width: 0; width: 100%; }
}
@media(max-width: 719px) {
    #tc-tab-editor .tc-tab-dispatch-grid { display: grid; margin-bottom: 8px; gap: 7px; }
    #tc-tab-editor .tc-tab-dispatch-card { align-items: stretch; flex-direction: column; padding: 9px; }
    #tc-tab-editor .tc-tab-dispatch-buttons { display: grid; grid-template-columns: 1.35fr 1fr; }
    #tc-tab-editor .tc-tab-dispatch-buttons .btn { width: 100%; }
    #tc-tab-editor .tc-tab-dispatch-help { margin: 6px 0 8px; }
    #tc-tab-editor .tc-tab-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* 1.7.0 - reliable offline status/queue shared by desktop and SUNMI tills. */
#tcfix-offline-status.tcfix-offline-pill,
#tcfix-offline-status {
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: #dcf7ea;
    color: #0d684b;
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
    cursor: pointer;
}
#tcfix-offline-status.is-offline,
#tcfix-offline-status.has-queued {
    border-color: #efd37b;
    background: #fff0b9;
    color: #5b4300;
}
.tcfix-offline-modal[hidden] { display: none !important; }
.tcfix-offline-modal { position: fixed; inset: 0; z-index: 2147483600; display: grid; place-items: center; padding: 18px; }
.tcfix-offline-backdrop { position: absolute; inset: 0; background: rgba(7,27,58,.58); }
.tcfix-offline-dialog {
    position: relative; z-index: 1; display: flex; flex-direction: column;
    width: min(560px, 96vw); max-height: min(720px, 92dvh); overflow: hidden;
    border: 1px solid #dce5ef; border-radius: 20px; background: #fff;
    box-shadow: 0 28px 90px rgba(7,27,58,.28); color: #071b3a;
}
.tcfix-offline-dialog > header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:20px 22px 14px; border-bottom:1px solid #e5eaf0; }
.tcfix-offline-dialog > header h2 { margin:2px 0 4px; font-size:24px; }
.tcfix-offline-dialog > header p { margin:0; color:#65758b; font-size:14px; }
.tcfix-offline-close { flex:0 0 auto; width:38px; height:38px; border:0; border-radius:50%; background:#eef2f7; color:#071b3a; font-size:26px; line-height:1; }
.tcfix-offline-list { min-height:160px; overflow:auto; padding:18px 22px; }
.tcfix-offline-empty { margin:38px 0; color:#65758b; text-align:center; }
.tcfix-offline-order { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:10px; padding:14px 16px; border:1px solid #dfe6ef; border-radius:14px; background:#f9fbfd; }
.tcfix-offline-order > div { display:grid; gap:3px; min-width:0; }
.tcfix-offline-order strong { overflow-wrap:anywhere; }
.tcfix-offline-order span,.tcfix-offline-order small { color:#65758b; font-size:12px; }
.tcfix-offline-order b { flex:0 0 auto; font-size:13px; }
.tcfix-offline-order.has-error { border-color:#eab0b6; background:#fff5f6; }
.tcfix-offline-order.has-error b,.tcfix-offline-order.has-error small { color:#9d2635; }
.tcfix-offline-dialog > footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 22px 18px; border-top:1px solid #e5eaf0; }
#tcfix-offline-help { color:#65758b; font-size:12px; }

/* SUNMI D3 / short landscape viewports: payment controls always remain reachable.
   Core's critical inline CSS uses overflow:hidden, so these selectors are
   intentionally more specific. */
@media (min-width:720px) and (max-height:860px) {
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-panel {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain !important;
        padding: 10px 12px !important;
        scrollbar-gutter: stable;
    }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff #tc-basket-items {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain !important;
        padding: 3px 0 !important;
    }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-heading { padding-bottom:5px !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-heading h2 { font-size:22px !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-line { min-height:52px !important; padding:5px 0 !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-notes { padding-top:4px !important; }
    /* The suggestion is useful on large screens, but on the D3 it steals the
       space needed for payment actions. The products remain available normally. */
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-upsell-suggestion { display:none !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-notes textarea { min-height:40px !important; height:40px !important; padding:5px 7px !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-discount-entry { margin-top:3px !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-total { padding:5px 0 !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-total strong { font-size:25px !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff #tc-payment-actions {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 4 !important;
        flex: 0 0 auto !important;
        display: grid !important;
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
        gap:5px !important;
        margin:0 -2px -2px !important;
        padding:6px 2px max(4px, env(safe-area-inset-bottom)) !important;
        background:#fff !important;
        box-shadow:0 -8px 16px rgba(255,255,255,.92) !important;
    }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff #tc-payment-actions .btn {
        min-height:38px !important;
        padding:5px 6px !important;
        font-size:12.5px !important;
        line-height:1.15 !important;
    }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff #tc-payment-actions [data-payment="dojo_moto"] { grid-column:1 / -1 !important; }
    #tcfix-offline-status { min-height:32px; padding:5px 10px; font-size:12px; }
}
@media (min-width:720px) and (max-height:740px) {
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-upsell-suggestion { display:none !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-line { min-height:46px !important; }
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff #tc-payment-actions .btn { min-height:35px !important; font-size:12px !important; }
}

/* 1.8.0: only Safe Fixes owns the till connectivity status. */
body.tillconnect-app-page .tcws-sync-indicator{display:none!important}

/* 1.11.0: reserve four ordinary sale lines (three on short tills), then
   scroll only the item list. More specific than Core's critical inline CSS. */
body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-panel {
    overflow-y:auto !important;
}
body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff #tc-basket-items {
    flex:1 0 232px !important;
    min-height:232px !important;
    height:232px !important;
    max-height:360px !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    touch-action:pan-y !important;
    padding:4px 0 !important;
}
body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-line {
    min-height:56px !important;
    padding:5px 0 !important;
}
body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff .tc-basket-line-copy strong {font-size:14px;line-height:1.2}
@media(max-height:740px) {
    body.tillconnect-app-page.tillconnect-staff-till-page #tc-till-app.is-staff #tc-basket-items {
        flex-basis:176px !important;min-height:176px !important;height:176px !important;max-height:240px !important;
    }
}
.tc-tab-add-all {min-height:46px;margin-top:8px;font-weight:700}
.tcfix-print-warning {color:#842029;font-weight:700}

/* 1.8.3 - inline order refund controls */
.tcfix-order-refund-card .tcfix-order-refund-summary{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
.tcfix-order-refund-card .tcfix-order-refund-summary>div{border:1px solid #dfe6ef;border-radius:.7rem;padding:.65rem .75rem;background:#f8fafc}
.tcfix-order-refund-card .tcfix-order-refund-summary span{display:block;font-size:.75rem;color:#667085;margin-bottom:.15rem}
.tcfix-order-refund-card .tcfix-order-refund-summary strong{font-size:1rem}
@media(max-width:767px){.tcfix-order-refund-card .tcfix-order-refund-summary{grid-template-columns:1fr}}
