:root {
    --bg: #e6edf5;
    --bg-soft: #dbe5f0;
    --surface: #f9fbfe;
    --surface-muted: #edf3f9;
    --surface-accent: #e6eefb;
    --border: #c2cfdf;
    --text: #0b1526;
    --muted: #465770;
    --primary: #1f4dbd;
    --primary-hover: #173d97;
    --primary-soft: rgba(31, 77, 189, 0.12);
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.12);
    --danger: #b42318;
    --danger-soft: rgba(180, 35, 24, 0.1);
    --success: #067647;
    --success-soft: rgba(6, 118, 71, 0.1);
    --info: #155eef;
    --info-soft: rgba(21, 94, 239, 0.1);
    --shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 30px 68px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 24%),
        linear-gradient(180deg, #eef3f8 0%, #dfe8f2 100%);
    line-height: 1.45;
}

body.page-caixa {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 24%),
        linear-gradient(180deg, #e9eff6 0%, #d8e3ef 100%);
}

body.page-login {
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 26%),
        radial-gradient(circle at left bottom, rgba(148, 163, 184, 0.12), transparent 28%),
        linear-gradient(180deg, #e8eef5 0%, #d3ddeb 100%);
}

body.page-auth {
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

input,
select,
textarea,
button {
    font: inherit;
}

button,
.button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    gap: 0.48rem;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 8px;
    padding: 0.44rem 0.78rem;
    background: linear-gradient(180deg, #2b63dd 0%, var(--primary) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(31, 77, 189, 0.16);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(31, 77, 189, 0.18);
}

button:disabled,
.button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button.secondary,
.button.secondary {
    background: linear-gradient(180deg, #fbfdff 0%, #edf3fa 100%);
    color: var(--text);
    border-color: #b8c7da;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

button.danger,
.button.danger {
    background: linear-gradient(180deg, #d24b40 0%, var(--danger) 100%);
    border-color: rgba(180, 35, 24, 0.25);
    color: #fff;
    box-shadow: 0 10px 20px rgba(180, 35, 24, 0.16);
}

button.secondary:hover,
.button.secondary:hover {
    border-color: #afbfd9;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fcfdff 0%, #eff4fa 100%);
    border-radius: 8px;
    padding: 0.56rem 0.7rem;
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    accent-color: var(--primary);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(31, 77, 189, 0.38);
    box-shadow: 0 0 0 4px rgba(31, 77, 189, 0.1);
    background: #ffffff;
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 216px 1fr;
    align-items: start;
}

.app-shell-caixa {
    grid-template-columns: 1fr;
}

.sidebar {
    padding: 0.8rem;
    border-right: 0;
    background: linear-gradient(180deg, #0f172a 0%, #131e35 100%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.68rem 0.72rem;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.brand strong,
.sidebar-user strong {
    display: block;
    font-size: 0.94rem;
    color: #fff;
}

.brand small,
.sidebar-user small,
.muted {
    color: var(--muted);
}

.sidebar .brand small,
.sidebar .sidebar-user small {
    color: rgba(255, 255, 255, 0.78);
}

.brand-mark,
.avatar,
.auth-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #3478f6 0%, #1f4dbd 100%);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: none;
}

.brand-logo,
.auth-brand-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 0.16rem;
}

.nav {
    display: grid;
    gap: 0.3rem;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    position: relative;
    overflow: hidden;
    padding: 0.56rem 0.72rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid transparent;
    font-size: 0.88rem;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav a::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #6ea8ff 0%, #2b63dd 100%);
    opacity: 0;
    transform: scaleY(0.4);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav a.is-active,
.nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateX(3px);
}

.nav a.is-active::before,
.nav a:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.main {
    padding: 0.95rem 1.05rem;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-caixa {
    min-height: 100vh;
    padding: 0.85rem 1rem 1rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.topbar h1 {
    margin: 0;
    font-size: 1.24rem;
    font-weight: 700;
}

.topbar-copy {
    display: grid;
    gap: 0.18rem;
}

.page-heading-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.page-back-button {
    min-width: 0;
}

.topbar-greeting {
    display: inline-block;
    margin-bottom: 0.12rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.62rem;
    padding: 0.55rem 0.72rem;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #eef3f9 100%);
    border: 1px solid var(--border);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.topbar-user strong {
    display: block;
    font-size: 0.9rem;
}

.topbar-user small {
    color: var(--muted);
    font-size: 0.82rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.48rem 0.82rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid rgba(31, 77, 189, 0.16);
    font-size: 0.84rem;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.topbar-actions-dashboard {
    justify-content: flex-end;
    margin-bottom: 0.8rem;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    min-height: 34px;
    padding: 0.44rem 0.78rem;
    border-radius: 8px;
    background: linear-gradient(180deg, #d24b40 0%, var(--danger) 100%);
    color: #fff;
    border: 1px solid rgba(180, 35, 24, 0.25);
    box-shadow: 0 10px 20px rgba(180, 35, 24, 0.16);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.topbar-logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(180, 35, 24, 0.2);
    filter: saturate(1.05);
}

.grid,
.stats-grid,
.two-columns,
.form-row,
.pos-layout {
    display: grid;
    gap: 0.8rem;
}

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

.two-columns {
    grid-template-columns: 1.12fr 0.88fr;
}

.pos-layout {
    grid-template-columns: 1.15fr 0.85fr;
}

.pos-caixa-shell {
    display: grid;
    gap: 0.8rem;
}

.card,
.panel {
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.98) 0%, rgba(242, 247, 252, 0.98) 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 0.78rem 0.84rem;
}

.panel h2,
.panel h3,
.card h2,
.card h3 {
    margin: 0 0 0.62rem;
    font-size: 0.98rem;
}

.stat-card strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.18rem;
    line-height: 1.1;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.96) 0%, rgba(241, 246, 252, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

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

th,
td {
    padding: 0.56rem 0.5rem;
    border-bottom: 1px solid #c8d4e2;
    text-align: left;
    vertical-align: top;
    font-size: 0.89rem;
}

th + th,
td + td {
    border-left: 1px solid rgba(194, 207, 223, 0.72);
}

th {
    color: #42526a;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #eaf1f8;
    border-bottom-color: #bcc9d9;
}

tbody tr:nth-child(even) td {
    background: rgba(243, 247, 251, 0.78);
}

tbody tr:hover td {
    background: #e9f1fe;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.table-action-link {
    min-height: 32px;
    padding: 0.36rem 0.62rem;
    font-size: 0.82rem;
}

.table-note {
    display: grid;
    gap: 0.12rem;
    margin-top: 0.35rem;
}

form.grid-form {
    display: grid;
    gap: 0.75rem;
}

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

.field {
    display: grid;
    gap: 0.35rem;
}

.field label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #344054;
}

.field-hint {
    margin: 0.12rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.toolbar form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    width: 100%;
}

.toolbar input,
.toolbar select {
    max-width: 190px;
}

.smart-search-shell {
    position: relative;
    flex: 1 1 220px;
    min-width: 220px;
}

.smart-search-shell input {
    max-width: none;
}

.smart-search-shell--caixa {
    width: min(520px, 100%);
    min-width: 0;
}

.smart-search-list {
    position: absolute;
    top: calc(100% + 0.32rem);
    left: 0;
    right: 0;
    z-index: 25;
    display: grid;
    gap: 0.28rem;
    padding: 0.38rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(248, 251, 255, 0.98);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(8px);
}

.smart-search-list[hidden] {
    display: none !important;
}

.smart-search-item,
.smart-search-empty {
    width: 100%;
    min-height: 0;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0.58rem 0.62rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    box-shadow: none;
    text-align: left;
}

.smart-search-item strong,
.smart-search-item small {
    display: block;
}

.smart-search-item strong {
    font-size: 0.88rem;
}

.smart-search-item small,
.smart-search-empty {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.smart-search-item:hover,
.smart-search-item.is-active {
    background: #f3f7ff;
    border-color: rgba(31, 77, 189, 0.14);
    transform: none;
}

.pos-screen-head {
    position: sticky;
    top: 0.75rem;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(250px, 320px) minmax(180px, 220px);
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.72rem 0.88rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(246, 250, 254, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.pos-screen-meta {
    min-width: 0;
}

.pos-screen-meta-stack {
    display: grid;
    align-content: start;
    gap: 0.62rem;
    min-width: 0;
}

.pos-screen-meta-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.pos-screen-head strong {
    display: block;
    font-size: 1rem;
}

.pos-screen-head small {
    color: var(--muted);
    font-size: 0.84rem;
}

.pos-screen-head-actions {
    display: grid;
    align-content: center;
    justify-items: end;
    gap: 0.52rem;
    min-width: 0;
}

.pos-screen-head-actions > .button,
.pos-screen-head-actions > button {
    width: auto;
    min-width: 156px;
    padding-inline: 0.9rem;
}

.pos-screen-summary {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    padding: 0.58rem 0.72rem;
    border-radius: 12px;
    border: 1px solid rgba(31, 77, 189, 0.12);
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.98) 0%, rgba(238, 244, 255, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 22px rgba(15, 23, 42, 0.06);
}

.pos-screen-summary-label {
    display: block;
    margin-bottom: 0.08rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pos-screen-summary .summary-row {
    font-size: 0.88rem;
}

.pos-screen-summary .summary-row strong {
    font-size: 0.96rem;
}

.pos-screen-summary .summary-row.total {
    margin-top: 0.22rem;
    padding-top: 0.28rem;
    border-top: 1px solid rgba(31, 77, 189, 0.1);
    font-size: 1.02rem;
}

.pos-screen-summary .summary-row.total strong {
    font-size: 1.08rem;
}

.sale-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(9, 18, 34, 0.46);
}

.sale-modal-overlay[hidden] {
    display: none !important;
}

.sale-modal-card {
    width: min(480px, calc(100vw - 2rem));
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #edf3fa 100%);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.24);
}

.sale-modal-card--compact {
    width: min(420px, calc(100vw - 2rem));
}

.sale-modal-card--whatsapp {
    width: min(520px, calc(100vw - 2rem));
    padding: 1rem;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f4fbf7 100%);
}

.sale-modal-card--coupon-action {
    width: min(500px, calc(100vw - 2rem));
}

.sale-modal-head,
.sale-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sale-modal-head strong {
    display: block;
    font-size: 1rem;
}

.sale-modal-head small {
    color: var(--muted);
    font-size: 0.83rem;
}

.sale-modal-body {
    display: grid;
    gap: 0.8rem;
}

.sale-whatsapp-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.85rem;
}

.sale-whatsapp-badge {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #1faa59 0%, #128c7e 100%);
    box-shadow: 0 14px 32px rgba(18, 140, 126, 0.24);
}

.sale-whatsapp-badge .btn-icon {
    width: 20px;
    height: 20px;
}

.sale-whatsapp-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.sale-whatsapp-summary {
    display: grid;
    gap: 0.45rem;
}

.sale-whatsapp-error {
    padding: 0.72rem 0.8rem;
    border-radius: 11px;
    border: 1px solid rgba(192, 57, 43, 0.16);
    background: #fff3f1;
    color: var(--danger);
    font-size: 0.88rem;
    font-weight: 600;
}

.sale-whatsapp-error[hidden] {
    display: none !important;
}

.receipt-history-panel {
    display: grid;
    gap: 0.9rem;
}

.receipt-history-search {
    gap: 0.75rem;
}

.receipt-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.1rem 0.1rem 0;
}

.receipt-history-head span {
    color: var(--muted);
    font-weight: 600;
}

.receipt-history-list {
    display: grid;
    gap: 0.7rem;
}

.receipt-history-card {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 0;
    padding: 0.85rem 0.92rem;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(70, 87, 112, 0.2);
    background: linear-gradient(180deg, #fcfdff 0%, #edf3f9 100%);
    color: var(--text);
    text-align: left;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

.receipt-history-card::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2b63dd 0%, #5a8df3 100%);
}

.receipt-history-card:hover {
    border-color: rgba(31, 77, 189, 0.26);
    background: linear-gradient(180deg, #ffffff 0%, #e8f1ff 100%);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.receipt-history-card > div {
    position: relative;
    z-index: 1;
}

.receipt-history-card strong,
.receipt-history-card small {
    display: block;
}

.receipt-history-card strong {
    color: var(--text);
}

.receipt-history-card small {
    margin-top: 0.18rem;
    color: #52627b;
}

.receipt-history-empty {
    display: grid;
    gap: 0.3rem;
}

.receipt-action-summary {
    display: grid;
    gap: 0.42rem;
}

.sale-installments-field[hidden] {
    display: none !important;
}

.sale-installments-hint {
    margin: 0.08rem 0 0;
    color: var(--danger);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.24rem 0.64rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.badge.low {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge.ok {
    background: var(--success-soft);
    color: var(--success);
}

.alert {
    padding: 0.72rem 0.82rem;
    border-radius: 9px;
    margin-bottom: 0.7rem;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
}

.alert-success {
    border-color: rgba(31, 139, 76, 0.18);
    background: var(--success-soft);
}

.alert-error {
    border-color: rgba(192, 57, 43, 0.2);
    background: var(--danger-soft);
}

.alert-info {
    border-color: rgba(15, 118, 110, 0.18);
    background: var(--info-soft);
}

.flash-modal-stack {
    position: fixed;
    inset: 0;
    z-index: 10020;
    pointer-events: none;
}

.flash-modal-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(9, 18, 34, 0.16);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.32s ease, visibility 0.32s ease;
}

.flash-modal-overlay.is-closing {
    opacity: 0;
    visibility: hidden;
}

.flash-modal-card {
    width: min(420px, calc(100vw - 2rem));
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    padding: 1.15rem 1.2rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(31, 77, 189, 0.14);
    background: linear-gradient(180deg, rgba(251, 253, 255, 0.98) 0%, rgba(239, 245, 252, 0.98) 100%);
    backdrop-filter: blur(12px);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.18);
    text-align: center;
    animation: flashModalReveal 0.28s ease both;
    position: relative;
    overflow: hidden;
}

.flash-modal-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #2b63dd 0%, #5f8fff 100%);
}

.flash-modal-card--success {
    background: linear-gradient(180deg, #f7fffb 0%, #eefaf3 100%);
}

.flash-modal-card--info {
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.flash-modal-card--success::before {
    background: linear-gradient(90deg, #1f9d57 0%, #4acf87 100%);
}

.flash-modal-card--info::before {
    background: linear-gradient(90deg, #2b63dd 0%, #5f8fff 100%);
}

.flash-modal-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #2b63dd 0%, #1f4dbd 100%);
    box-shadow: 0 10px 24px rgba(31, 77, 189, 0.18);
}

.flash-modal-copy {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text);
}

@keyframes flashModalReveal {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.config-logo-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 10px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.config-logo-preview img {
    max-width: 68px;
    max-height: 68px;
    object-fit: contain;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.pagination a {
    min-width: 36px;
    padding: 0.42rem 0.66rem;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
    font-size: 0.88rem;
}

.pagination a.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.4rem;
}

body.page-login .auth-shell,
body.page-auth .auth-shell {
    flex: 1 0 auto;
    min-height: 0;
}

.auth-stage {
    width: min(460px, 100%);
}

.auth-stage--split {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12);
}

.auth-stage-preload {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-stage-ready {
    animation: authStageReveal 0.45s ease forwards;
}

.auth-visual {
    position: relative;
    display: grid;
    align-content: space-between;
    gap: 1rem;
    min-height: 620px;
    padding: 1.6rem;
    color: #f7fbff;
    background:
        radial-gradient(circle at top right, rgba(90, 162, 255, 0.22), transparent 28%),
        radial-gradient(circle at left bottom, rgba(37, 99, 235, 0.26), transparent 34%),
        linear-gradient(160deg, #0b1730 0%, #102344 58%, #17396e 100%);
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, #000 55%, transparent 100%);
}

.auth-visual-head,
.auth-visual-copy,
.auth-visual-logo-box {
    position: relative;
    z-index: 1;
}

.auth-visual-head strong {
    display: block;
    font-size: 1.08rem;
}

.auth-visual-head small {
    color: rgba(223, 234, 255, 0.76);
    font-size: 0.85rem;
}

.auth-visual-logo-box {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 0.2rem 0;
}

.auth-visual-logo {
    width: min(220px, 72%);
    max-height: 150px;
    object-fit: contain;
}

.auth-visual-mark {
    width: 112px;
    height: 112px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #58a3ff 0%, #2458d3 100%);
}

.auth-visual-kicker {
    margin: 0 0 0.45rem;
    color: rgba(223, 234, 255, 0.75);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-visual-copy h1 {
    margin: 0 0 0.55rem;
    font-size: 2rem;
    line-height: 1.1;
}

.auth-visual-copy p {
    margin: 0;
    max-width: 32rem;
    color: rgba(235, 243, 255, 0.82);
    font-size: 0.96rem;
}

.auth-visual-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.95rem;
}

.auth-panel {
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98) 0%, rgba(232, 239, 247, 0.98) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 1rem;
}

.auth-panel--form {
    display: grid;
    align-content: center;
    padding: 1.3rem 1.3rem 1.15rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.9rem;
    margin-bottom: 0.95rem;
    border-bottom: 1px solid var(--border);
}

.auth-brand strong {
    display: block;
    font-size: 1rem;
}

.auth-brand small {
    color: var(--muted);
    font-size: 0.84rem;
}

.auth-view h1 {
    margin: 0 0 0.3rem;
    font-size: 1.22rem;
    line-height: 1.2;
}

.auth-copy {
    margin: 0 0 0.85rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-view--login {
    padding-top: 0.1rem;
}

.auth-login-intro {
    margin-bottom: 0.95rem;
}

.auth-mini-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.22rem 0.64rem;
    margin-bottom: 0.65rem;
    border-radius: 999px;
    background: var(--surface-accent);
    border: 1px solid rgba(31, 77, 189, 0.14);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-status-card {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
    padding: 0.74rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    font-size: 0.9rem;
}

.auth-actions {
    margin-top: 0.1rem;
}

.auth-actions button {
    width: 100%;
    justify-self: stretch;
}

.auth-actions--login {
    justify-content: flex-start;
}

.auth-actions--login button.auth-submit {
    width: auto;
    min-width: 158px;
    padding-inline: 1.2rem;
}

.field-control {
    position: relative;
}

.field-control .field-icon {
    position: absolute;
    left: 0.82rem;
    top: 50%;
    z-index: 1;
    width: 16px;
    height: 16px;
    color: #5d6c84;
    transform: translateY(-50%);
}

.field-control input {
    padding-left: 2.55rem;
}

.page-login form.grid-form {
    gap: 0.62rem;
}

.page-login .field {
    gap: 0.28rem;
}

.page-login .field label {
    font-size: 0.82rem;
}

.page-login .field-control .field-icon {
    left: 0.74rem;
    width: 15px;
    height: 15px;
}

.page-login .field-control input {
    min-height: 42px;
    padding: 0.44rem 0.72rem 0.44rem 2.3rem;
    border-radius: 8px;
    font-size: 0.92rem;
}

.page-login .auth-actions--login button.auth-submit {
    min-height: 40px;
    padding-inline: 1.05rem;
}

.field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.field-action {
    min-height: 28px;
    padding: 0.2rem 0.58rem;
    border-radius: 999px;
    font-size: 0.76rem;
    box-shadow: none;
}

.field-action .btn-icon {
    width: 14px;
    height: 14px;
}

.sensitive-field-wrap {
    position: relative;
}

.sensitive-field.is-masked {
    -webkit-text-security: disc;
    text-security: disc;
    filter: blur(3px);
    transition: filter 0.18s ease;
}

.sensitive-field-wrap:hover .sensitive-field.is-masked,
.sensitive-field-wrap:focus-within .sensitive-field.is-masked {
    filter: blur(1px);
}

.page-login .auth-mini-chip {
    margin-bottom: 0.7rem;
}

.web-login-splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.18), transparent 40%),
        radial-gradient(circle at 8% 90%, rgba(96, 165, 250, 0.14), transparent 42%),
        linear-gradient(155deg, #09152b, #102344);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.web-login-splash-overlay::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(96, 165, 250, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.08) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, #000 48%, transparent 95%);
}

.web-login-splash-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.web-login-splash-card {
    width: min(560px, calc(100vw - 44px));
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(8, 20, 40, 0.8), rgba(7, 16, 33, 0.9));
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 1.55rem 1.6rem 1.4rem;
    position: relative;
    overflow: hidden;
}

.web-login-splash-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4b93ff, #8abaff, #4b93ff);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.45);
}

.web-login-splash-brand {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 0.95rem;
    align-items: center;
    margin-bottom: 0.95rem;
}

.web-login-splash-logo {
    width: 100%;
    max-width: 112px;
    height: 112px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(8, 16, 30, 0.35);
    border: 1px solid rgba(96, 165, 250, 0.24);
    padding: 0.42rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.web-login-splash-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4b93ff 0%, #2458d3 100%);
}

.web-login-splash-copy h1 {
    margin: 0 0 0.22rem;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: #f5f9ff;
}

.web-login-splash-copy p {
    margin: 0;
    color: #a7bdd8;
    font-size: 0.84rem;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.web-login-splash-headline {
    margin: 0.85rem 0 0.24rem;
    font-size: 1.03rem;
    font-weight: 600;
    color: #eaf3ff;
}

.web-login-splash-status {
    margin: 0;
    font-size: 0.82rem;
    color: #a7bdd8;
    min-height: 1.1rem;
}

.web-login-splash-progress-track {
    margin-top: 0.82rem;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.web-login-splash-progress-bar {
    width: 44%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8abaff, #4b93ff, #b5d4ff);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.55);
    animation: webLoginSplashProgress 1.4s ease-in-out infinite;
}

.web-login-splash-chips {
    margin-top: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.web-login-splash-chips span,
.auth-visual-chips span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: rgba(96, 165, 250, 0.12);
    padding: 0.22rem 0.52rem;
    font-size: 0.68rem;
    color: #dbe9ff;
    letter-spacing: 0.06em;
    font-weight: 700;
    text-transform: uppercase;
}

@keyframes webLoginSplashProgress {
    0%,
    100% { transform: translateX(-12%); }
    50% { transform: translateX(106%); }
}

@keyframes authStageReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.dashboard-summary-card {
    display: grid;
    gap: 0.42rem;
    align-content: center;
    padding: 0.64rem 0.76rem;
    min-height: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.dashboard-summary-greeting {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

.dashboard-summary-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.dashboard-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dashboard-meta-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #183b7a;
    border: 1px solid rgba(31, 77, 189, 0.12);
    font-size: 0.8rem;
    font-weight: 600;
}

.dashboard-meta-chip--accent {
    background: var(--surface-accent);
    color: var(--primary);
    border-color: rgba(31, 77, 189, 0.14);
}

.dashboard-update-card {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    padding: 0.62rem 0.72rem;
}

.dashboard-update-head {
    display: flex;
    align-items: center;
}

.dashboard-update-title {
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-update-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dashboard-update-actions button {
    min-width: 96px;
}

.nav-icon,
.btn-icon,
.topbar-user .avatar,
.app-modal-close svg {
    flex: 0 0 auto;
}

.nav-icon,
.btn-icon {
    width: 16px;
    height: 16px;
}

.btn-label {
    line-height: 1;
}

.dashboard-update-status {
    margin: 0;
    min-height: 32px;
    padding: 0.48rem 0.62rem;
    border-radius: 9px;
    background: var(--surface-accent);
    border: 1px solid rgba(31, 77, 189, 0.1);
    color: var(--text);
    font-size: 0.82rem;
}

.dashboard-stats .stat-card {
    position: relative;
    overflow: hidden;
}

.dashboard-stats .stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #3478f6 0%, #1f4dbd 100%);
}

.dashboard-stats .stat-card span {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-stats .stat-card strong {
    margin-top: 0.35rem;
    font-size: 1.55rem;
}

.dashboard-stats .stat-card small {
    display: block;
    margin-top: 0.32rem;
}

.dashboard-section-title {
    margin-bottom: 0.8rem;
}

.cart-items {
    display: grid;
    gap: 0.6rem;
}

.cart-item,
.search-result {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.64rem 0.72rem;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.search-result {
    width: 100%;
    text-align: left;
}

.receipt {
    width: min(340px, 100%);
    margin: 0 auto;
    padding: 0.92rem;
    background: #fff;
    color: #000;
    font-family: "Courier New", monospace;
}

.receipt-subtitle {
    margin-bottom: 0.75rem;
}

.receipt-logo {
    max-width: 86px;
    max-height: 42px;
    object-fit: contain;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.w-full {
    width: 100% !important;
    justify-self: stretch !important;
}

.panel-soft {
    background: linear-gradient(180deg, #f2f6fb 0%, #e9eff6 100%);
    border-color: rgba(70, 87, 112, 0.14);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.summary-row.total {
    margin-top: 0.45rem;
    font-size: 1rem;
    font-weight: 700;
}

.qty-input {
    width: 88px !important;
    max-width: 88px;
    text-align: center;
}

.receipt-center {
    text-align: center;
}

.receipt-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.38rem;
    margin-bottom: 0.72rem;
}

.receipt-meta-grid--sale {
    margin-bottom: 0.55rem;
}

.receipt-meta-item {
    min-width: 0;
    padding: 0.34rem 0.4rem;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 7px;
}

.receipt-meta-item--full {
    grid-column: 1 / -1;
}

.receipt-meta-item span {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5f6b7a;
}

.receipt-meta-item strong {
    display: block;
    margin-top: 0.16rem;
    font-size: 0.77rem;
    line-height: 1.25;
    word-break: break-word;
}

.receipt-item {
    margin-bottom: 0.52rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px dotted rgba(15, 23, 42, 0.16);
}

.receipt-item:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.receipt-divider {
    border: 0;
    border-top: 1px dashed rgba(15, 23, 42, 0.28);
    margin: 0.68rem 0;
}

.receipt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    width: min(620px, calc(100% - 1rem));
    margin: 0 auto 0.6rem;
}

.modal-body {
    background: #f4f7fb;
}

.modal-page-shell {
    padding: 0.85rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.modal-page-header {
    margin-bottom: 0.7rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-page-header h1 {
    margin: 0;
    font-size: 1.18rem;
}

.app-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.46);
}

.app-modal-overlay[hidden] {
    display: none !important;
}

.app-modal-card {
    width: min(1160px, 92vw);
    height: min(88vh, 920px);
    display: grid;
    grid-template-rows: auto 1fr;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.app-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.68rem 0.82rem;
    border-bottom: 1px solid var(--border);
    background: #f8faf9;
}

.app-modal-close {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
    font-size: 1.2rem;
    line-height: 1;
}

.app-modal-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

body.modal-open {
    overflow: hidden;
}

.site-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.site-footer-inner {
    padding-top: 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.14);
    color: var(--muted);
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.45;
}

.site-footer-admin {
    padding-top: 1.2rem;
}

body.page-login .site-footer,
body.page-auth .site-footer {
    width: 100%;
    padding: 0 1.4rem 1.15rem;
}

body.page-login .site-footer-inner,
body.page-auth .site-footer-inner {
    max-width: 980px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .dashboard-hero,
    .two-columns,
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .app-shell {
        grid-template-columns: 204px 1fr;
    }

    .app-shell-caixa {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 860px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .main {
        padding: 1rem;
    }

    .main-caixa {
        padding: 0.75rem;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-summary-card {
        padding: 0.62rem 0.7rem;
    }

    .dashboard-summary-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-summary-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .pos-screen-head {
        top: 0.5rem;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .pos-screen-meta-actions,
    .pos-screen-head-actions {
        width: 100%;
    }

    .pos-screen-head-actions {
        justify-items: stretch;
    }

    .pos-screen-head-actions > .button,
    .pos-screen-head-actions > button {
        width: 100%;
    }

    .pos-screen-summary {
        width: 100%;
    }

    .smart-search-shell,
    .smart-search-shell--caixa {
        min-width: 0;
        width: 100%;
    }

    .stats-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        padding: 1rem;
    }

    body.page-login .site-footer,
    body.page-auth .site-footer {
        padding: 0 1rem 0.9rem;
    }

    .auth-stage--split {
        grid-template-columns: 1fr;
        width: min(480px, 100%);
        border-radius: 18px;
    }

    .auth-visual {
        min-height: auto;
        padding: 1rem;
    }

    .auth-visual-logo-box {
        min-height: 140px;
    }

    .auth-visual-copy h1 {
        font-size: 1.45rem;
    }

    .auth-panel {
        padding: 1rem;
    }

    .auth-panel--form {
        border-radius: 0 0 18px 18px;
    }

    .auth-actions--login button.auth-submit {
        width: 100%;
    }

    .app-modal-card {
        width: 100%;
        height: 92vh;
    }
}

/* Atualizacao de sistema (Web + Desktop) */
.update-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2, 12, 30, 0.8);
    backdrop-filter: blur(10px);
}

.update-modal-overlay.show {
    display: flex;
}

.update-modal-card {
    width: min(94vw, 530px);
    border-radius: 18px;
    border: 1px solid rgba(88, 173, 255, 0.42);
    background:
        radial-gradient(circle at 0% 0%, rgba(78, 168, 255, 0.34), transparent 50%),
        linear-gradient(160deg, #081935, #0d2954 58%, #0a1f42 100%);
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(173, 219, 255, 0.26);
    color: #e6f0ff;
    overflow: hidden;
}

.update-modal-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.85rem;
    border-bottom: 1px solid rgba(102, 181, 255, 0.28);
}

.update-modal-badge {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #25b3ff 0%, #2563eb 100%);
    border: 1px solid rgba(186, 225, 255, 0.32);
    color: #ffffff;
    box-shadow:
        0 12px 22px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    flex: 0 0 auto;
}

.update-modal-badge svg {
    width: 1.18rem;
    height: 1.18rem;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.update-modal-title-wrap {
    min-width: 0;
}

.update-modal-title {
    margin: 0;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
    color: #f8fbff;
}

.update-modal-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.86rem;
    color: rgba(232, 242, 255, 0.84);
}

.update-modal-body {
    padding: 1rem 1.1rem 0.95rem;
}

.update-modal-message {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.48;
    color: rgba(244, 249, 255, 0.96);
}

.update-modal-status {
    margin-top: 0.72rem;
    font-size: 0.83rem;
    color: rgba(196, 229, 255, 0.96);
    min-height: 1.2rem;
}

.update-modal-progress {
    margin-top: 0.6rem;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(132, 182, 240, 0.22);
    overflow: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.update-modal-card.is-busy .update-modal-progress {
    opacity: 1;
    transform: translateY(0);
}

.update-modal-progress::before {
    content: "";
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3ecbff, #4f84ff);
    animation: updateProgressMove 1.25s linear infinite;
}

.update-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.58rem;
    padding: 0.95rem 1.1rem 1.05rem;
    border-top: 1px solid rgba(102, 181, 255, 0.22);
    background: linear-gradient(180deg, rgba(8, 24, 53, 0), rgba(6, 21, 47, 0.5));
}

.update-modal-btn {
    border: 1px solid rgba(126, 183, 249, 0.38);
    border-radius: 11px;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.update-modal-btn:active {
    transform: translateY(1px);
}

.update-modal-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.update-modal-btn-secondary {
    background: rgba(88, 122, 169, 0.28);
    color: #eaf3ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.update-modal-btn-secondary:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 18px rgba(9, 24, 53, 0.24);
}

.update-modal-btn-primary {
    background: linear-gradient(135deg, #1ea9ff 0%, #2563eb 100%);
    color: #fff;
    border-color: rgba(168, 220, 255, 0.4);
    box-shadow: 0 12px 24px rgba(24, 97, 230, 0.34);
}

.update-modal-btn-primary:hover {
    filter: brightness(1.08);
}

.update-toast {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.update-toast.show {
    opacity: 1;
    pointer-events: auto;
}

.update-toast.is-hiding {
    opacity: 0;
    pointer-events: none;
}

.update-toast-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 12, 30, 0.6);
    backdrop-filter: blur(10px);
}

.update-toast-card {
    position: relative;
    width: min(92vw, 410px);
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px solid rgba(101, 205, 255, 0.34);
    background:
        radial-gradient(circle at top left, rgba(84, 184, 255, 0.28), transparent 44%),
        linear-gradient(155deg, #081b3b, #0d2950 100%);
    color: #e8f5ff;
    box-shadow:
        0 28px 56px rgba(2, 15, 34, 0.52),
        inset 0 1px 0 rgba(179, 221, 255, 0.2);
    transform: translateY(18px) scale(0.96);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.update-toast.show .update-toast-card {
    transform: translateY(0) scale(1);
}

.update-toast.is-hiding .update-toast-card {
    transform: translateY(12px) scale(0.98);
}

.update-toast-icon {
    width: 3.2rem;
    height: 3.2rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(145deg, #15b8a6 0%, #2563eb 100%);
    border: 1px solid rgba(164, 235, 255, 0.28);
    box-shadow:
        0 12px 22px rgba(8, 39, 82, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.update-toast-icon svg {
    width: 1.45rem;
    height: 1.45rem;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.update-toast-copy {
    min-width: 0;
    padding-top: 0.08rem;
}

.update-toast-title {
    display: block;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #f6fbff;
}

.update-toast-message {
    margin: 0.32rem 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(233, 242, 255, 0.92);
}

.update-toast.update-toast-success .update-toast-card {
    border-color: rgba(90, 227, 177, 0.38);
    background:
        radial-gradient(circle at top left, rgba(60, 214, 166, 0.26), transparent 42%),
        linear-gradient(155deg, #081c39, #102b42);
}

.update-toast.update-toast-success .update-toast-icon {
    background: linear-gradient(145deg, #18b367 0%, #0f8b8d 100%);
    border-color: rgba(160, 247, 212, 0.3);
}

.update-toast.update-toast-error .update-toast-card {
    border-color: rgba(255, 131, 131, 0.36);
    background:
        radial-gradient(circle at top left, rgba(255, 124, 124, 0.22), transparent 40%),
        linear-gradient(155deg, #38121e, #2b182c);
}

.update-toast.update-toast-error .update-toast-icon {
    background: linear-gradient(145deg, #ef4444 0%, #f59e0b 100%);
    border-color: rgba(255, 197, 157, 0.32);
}

@keyframes updateProgressMove {
    from {
        transform: translateX(-120%);
    }
    to {
        transform: translateX(290%);
    }
}

@media (max-width: 768px) {
    .update-modal-card {
        width: min(96vw, 430px);
        border-radius: 16px;
    }

    .update-modal-head {
        padding: 0.92rem 0.92rem 0.74rem;
    }

    .update-modal-badge {
        width: 2rem;
        height: 2rem;
        border-radius: 10px;
    }

    .update-modal-title {
        font-size: 1rem;
    }

    .update-modal-subtitle {
        font-size: 0.8rem;
    }

    .update-modal-body {
        padding: 0.88rem 0.92rem 0.82rem;
    }

    .update-modal-message {
        font-size: 0.9rem;
    }

    .update-modal-actions {
        padding: 0.82rem 0.92rem 0.88rem;
        flex-direction: column-reverse;
    }

    .update-modal-btn {
        width: 100%;
        padding: 0.66rem 0.82rem;
        font-size: 0.84rem;
    }

    .update-toast {
        padding: 0.9rem;
    }

    .update-toast-card {
        width: min(94vw, 360px);
        gap: 0.78rem;
        padding: 0.92rem 0.9rem;
        border-radius: 18px;
    }

    .update-toast-icon {
        width: 2.8rem;
        height: 2.8rem;
        border-radius: 14px;
    }

    .update-toast-title {
        font-size: 0.94rem;
    }

    .update-toast-message {
        font-size: 0.88rem;
    }
}

:root:not([data-theme="dark"]) .update-modal-overlay {
    background: rgba(8, 19, 38, 0.58);
}

:root:not([data-theme="dark"]) .update-modal-card {
    background:
        radial-gradient(circle at 0% 0%, rgba(86, 163, 255, 0.22), transparent 48%),
        linear-gradient(160deg, #f1f7ff, #dce9ff);
    color: #0f2f57;
    border-color: rgba(60, 126, 207, 0.4);
    box-shadow:
        0 28px 54px rgba(15, 39, 70, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

:root:not([data-theme="dark"]) .update-modal-head {
    border-bottom-color: rgba(84, 136, 194, 0.24);
    background: linear-gradient(180deg, rgba(102, 170, 255, 0.08), rgba(255, 255, 255, 0));
}

:root:not([data-theme="dark"]) .update-modal-badge {
    background: linear-gradient(145deg, #20a6ff 0%, #2563eb 100%);
    border-color: rgba(34, 94, 187, 0.22);
    color: #ffffff;
    box-shadow:
        0 14px 26px rgba(37, 99, 235, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

:root:not([data-theme="dark"]) .update-modal-title {
    color: #0f2e56;
}

:root:not([data-theme="dark"]) .update-modal-subtitle,
:root:not([data-theme="dark"]) .update-modal-message,
:root:not([data-theme="dark"]) .update-modal-status {
    color: rgba(15, 46, 86, 0.9);
}

:root:not([data-theme="dark"]) .update-modal-actions {
    border-top-color: rgba(84, 136, 194, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(211, 226, 248, 0.58));
}

:root:not([data-theme="dark"]) .update-modal-btn-secondary {
    background: rgba(86, 126, 186, 0.12);
    color: #103057;
    border-color: rgba(79, 126, 186, 0.34);
}

:root:not([data-theme="dark"]) .update-modal-btn-secondary:hover {
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.14);
}

:root:not([data-theme="dark"]) .update-modal-btn-primary {
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

:root:not([data-theme="dark"]) .update-toast {
    color: #11335c;
}

:root:not([data-theme="dark"]) .update-toast-backdrop {
    background: rgba(8, 19, 38, 0.42);
}

:root:not([data-theme="dark"]) .update-toast-card {
    border-color: rgba(76, 132, 194, 0.34);
    background:
        radial-gradient(circle at top left, rgba(91, 167, 255, 0.22), transparent 42%),
        linear-gradient(155deg, #f1f8ff, #dbe8ff);
    color: #103057;
    box-shadow:
        0 26px 48px rgba(18, 46, 81, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

:root:not([data-theme="dark"]) .update-toast-icon {
    background: linear-gradient(145deg, #18b7a4 0%, #2563eb 100%);
    border-color: rgba(33, 100, 188, 0.22);
    color: #ffffff;
    box-shadow:
        0 14px 26px rgba(17, 59, 112, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

:root:not([data-theme="dark"]) .update-toast-title {
    color: #0f2f57;
}

:root:not([data-theme="dark"]) .update-toast-message {
    color: rgba(16, 48, 87, 0.88);
}

:root:not([data-theme="dark"]) .update-toast.update-toast-success .update-toast-card {
    border-color: rgba(57, 160, 120, 0.34);
    background:
        radial-gradient(circle at top left, rgba(91, 219, 163, 0.18), transparent 42%),
        linear-gradient(155deg, #f1fbf6, #d9f5e8);
}

:root:not([data-theme="dark"]) .update-toast.update-toast-success .update-toast-icon {
    background: linear-gradient(145deg, #18a957 0%, #0f8b8d 100%);
    border-color: rgba(23, 117, 77, 0.2);
}

:root:not([data-theme="dark"]) .update-toast.update-toast-error .update-toast-card {
    border-color: rgba(210, 98, 98, 0.3);
    background:
        radial-gradient(circle at top left, rgba(255, 150, 150, 0.18), transparent 40%),
        linear-gradient(155deg, #fff6f7, #ffe2e6);
}

:root:not([data-theme="dark"]) .update-toast.update-toast-error .update-toast-icon {
    background: linear-gradient(145deg, #ef4444 0%, #f59e0b 100%);
    border-color: rgba(182, 66, 66, 0.2);
}

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

    .receipt-actions {
        display: none;
    }

    .site-footer {
        display: none !important;
    }

    .receipt {
        width: 80mm;
        padding: 0;
        box-shadow: none;
    }
}
