* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--app-bg, #f4f4f5);
    color: var(--app-text, #09090b);
    font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

textarea,
select {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    background: var(--app-menu, #fff);
    border-bottom: 1px solid #e4e4e7;
}

.brand {
    align-items: center;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    gap: 12px;
    min-height: 80px;
    padding: 0 24px;
}

.brand-mark {
    align-items: center;
    background: var(--app-primary, #09090b);
    border-radius: 8px;
    color: #fff;
    display: grid;
    flex: 0 0 44px;
    font-size: 14px;
    font-weight: 700;
    height: 44px;
    justify-items: center;
    width: 44px;
}

.brand-mark.large {
    font-size: 24px;
    height: 72px;
    width: 72px;
}

.brand-logo {
    border-radius: 8px;
    flex: 0 0 44px;
    height: 44px;
    object-fit: contain;
    width: 44px;
}

.brand-logo-wide {
    display: block;
    height: 46px;
    max-width: 190px;
    object-fit: contain;
    width: 100%;
}

.brand-title,
.user-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-subtitle,
.user-email,
.card-text,
.eyebrow {
    color: var(--app-secondary, #71717a);
    margin: 0;
}

.brand-subtitle,
.user-email,
.eyebrow {
    font-size: 12px;
}

.nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px;
}

.nav-item {
    align-items: center;
    border-radius: 8px;
    color: #52525b;
    display: flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    gap: 12px;
    padding: 10px 12px;
}

.nav-item.active {
    background: var(--app-primary, #09090b);
    color: #fff;
}

.nav-item.disabled {
    color: #a1a1aa;
}

.nav-icon {
    flex: 0 0 20px;
    height: 20px;
    width: 20px;
}

.sidebar-footer {
    border-top: 1px solid #e4e4e7;
    display: none;
    margin-top: auto;
    padding: 16px;
}

.user-panel {
    background: #fafafa;
    border-radius: 8px;
    padding: 12px;
}

.main-header {
    background: #fff;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    min-height: 80px;
    padding: 16px 20px;
}

.eyebrow {
    font-weight: 700;
    text-transform: uppercase;
}

.page-title {
    font-size: 28px;
    line-height: 1.15;
    margin: 4px 0 0;
}

.content {
    padding: 24px 20px;
}

.grid {
    display: grid;
    gap: 16px;
}

.card {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    padding: 20px;
}

.card-label {
    color: #71717a;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.card-title {
    font-size: 22px;
    line-height: 1.2;
    margin: 8px 0 4px;
}

.card-text {
    font-size: 14px;
}

.section-row {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: space-between;
}

.status {
    background: #ecfdf5;
    border-radius: 8px;
    color: #047857;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    width: fit-content;
}

.button {
    align-items: center;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    padding: 10px 12px;
}

.button.full {
    width: 100%;
}

.button.primary {
    background: var(--app-buttons, #09090b);
    border-color: var(--app-buttons, #09090b);
    color: #fff;
}

.button.secondary {
    background: #fff;
    color: #3f3f46;
}

.button.danger {
    background: #fff;
    border-color: #fecaca;
    color: #b91c1c;
}

.button.small {
    font-size: 13px;
    padding: 7px 10px;
}

.toolbar {
    align-items: stretch;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.search-form {
    display: grid;
    gap: 10px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two {
    grid-template-columns: 1fr;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.textarea {
    min-height: 110px;
    resize: vertical;
}

.table-wrap {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid #e4e4e7;
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: #71717a;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.data-table td {
    font-size: 14px;
}

.table-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.flash {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #047857;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.muted-empty {
    color: #71717a;
    padding: 28px 12px;
    text-align: center;
}

.badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
}

.badge.ok {
    background: #ecfdf5;
    color: #047857;
}

.badge.off {
    background: #f4f4f5;
    color: #52525b;
}

.badge.warn {
    background: #fef3c7;
    color: #92400e;
    margin-left: 6px;
}

.stock-low-row {
    background: #fffbeb;
}

.pagination {
    margin-top: 0;
}

.cb-pagination {
    align-items: center;
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
    border-top: 1px solid #e4e4e7;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: space-between;
    margin: 0 -20px -20px;
    padding: 16px 20px;
}

.cb-pagination-summary {
    align-items: center;
    color: #52525b;
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 6px;
}

.cb-pagination-summary strong {
    color: #09090b;
    font-size: 16px;
}

.cb-pagination-kicker {
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
    color: #71717a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    padding: 4px 9px;
    text-transform: uppercase;
}

.cb-pagination-controls {
    align-items: center;
    display: flex;
    gap: 8px;
    max-width: 100%;
}

.cb-page-list {
    align-items: center;
    display: flex;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
}

.cb-page-btn,
.cb-page-number,
.cb-page-ellipsis {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    min-width: 38px;
}

.cb-page-btn,
.cb-page-number {
    background: #fff;
    border: 1px solid #d4d4d8;
    color: #27272a;
}

.cb-page-btn svg {
    height: 18px;
    width: 18px;
}

.cb-page-btn:hover,
.cb-page-number:hover {
    border-color: var(--app-primary, #09090b);
    box-shadow: 0 6px 18px rgb(9 9 11 / 0.08);
}

.cb-page-number.is-active {
    background: var(--app-primary, #09090b);
    border-color: var(--app-primary, #09090b);
    color: #fff;
}

.cb-page-btn.is-disabled {
    background: #f4f4f5;
    color: #a1a1aa;
    cursor: not-allowed;
}

.cb-page-ellipsis {
    color: #a1a1aa;
    min-width: 28px;
}

.stock-warning-card {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgb(245 158 11 / 0.12);
}

.movement-type {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
}

.movement-type.entrada {
    background: #ecfdf5;
    color: #047857;
}

.movement-type.salida {
    background: #fef2f2;
    color: #b91c1c;
}

.movement-type.ajuste {
    background: #eff6ff;
    color: #1d4ed8;
}

.pos-shell {
    align-items: start;
    display: grid;
    gap: 18px;
}

.pos-search {
    display: grid;
    gap: 10px;
}

.pos-products {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    margin-top: 18px;
}

.pos-product-card {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    overflow: hidden;
}

.pos-product-card.is-empty {
    opacity: 0.62;
}

.pos-product-image {
    background: #f4f4f5;
    height: 128px;
    object-fit: cover;
    width: 100%;
}

.pos-product-image.placeholder {
    align-items: center;
    color: #71717a;
    display: grid;
    font-weight: 700;
    justify-items: center;
}

.pos-product-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.pos-product-body h2 {
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
}

.pos-product-body p {
    color: #71717a;
    font-size: 13px;
    margin: 0;
}

.pos-add-form {
    display: grid;
    gap: 8px;
    grid-template-columns: 76px 1fr;
}

.pos-cart {
    position: sticky;
    top: 16px;
}

.pos-cart-items {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.pos-cart-item {
    border-bottom: 1px solid #e4e4e7;
    display: grid;
    gap: 10px;
    padding-bottom: 12px;
}

.pos-cart-qty {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
}

.pos-cart-line {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.pos-total {
    border-top: 1px solid #e4e4e7;
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    padding-top: 16px;
}

.pos-total div {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.pos-total span {
    color: #71717a;
}

.pos-total strong {
    font-size: 24px;
}

.flash.compact,
.alert.compact {
    margin-bottom: 12px;
}

.pos-terminal {
    display: grid;
    gap: 14px;
}

.pos-terminal.cashier-mode {
    background: var(--app-bg, #f4f4f5);
    inset: 0;
    overflow: auto;
    padding: 16px;
    position: fixed;
    z-index: 60;
}

.pos-terminal-grid {
    align-items: start;
    display: grid;
    gap: 18px;
}

.pos-workspace {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.pos-mode-bar {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
}

.pos-mode-bar strong {
    display: block;
    font-size: 18px;
    margin-top: 2px;
}

.pos-mode-btn {
    min-height: 48px;
    white-space: nowrap;
}

.pos-command-bar {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.pos-search-input {
    font-size: 18px;
    min-height: 54px;
}

.pos-category-strip {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    overflow: visible;
}

.pos-category-strip.is-loading {
    opacity: 0.7;
}

.pos-category-btn {
    background: #fff;
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    color: #27272a;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    min-height: 56px;
    padding: 10px 14px;
}

.pos-category-btn.visual {
    background:
        linear-gradient(135deg, rgb(9 9 11 / 0.62), rgb(9 9 11 / 0.22)),
        var(--category-bg, linear-gradient(135deg, #27272a, #71717a));
    background-position: center;
    background-size: cover;
    border: 0;
    color: #fff;
    display: grid;
    min-height: 74px;
    min-width: 0;
    overflow: hidden;
    place-content: end start;
    position: relative;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

.pos-category-btn.visual::after {
    border: 2px solid transparent;
    border-radius: 8px;
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.pos-category-btn.visual.active::after {
    border-color: #fff;
    box-shadow: inset 0 0 0 2px var(--app-buttons, #09090b);
}

.pos-category-btn span,
.pos-category-btn .pos-category-count {
    color: #71717a;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

.pos-category-btn.visual span,
.pos-category-btn.visual .pos-category-count {
    color: rgb(255 255 255 / 0.82);
}

.pos-category-btn .pos-category-name {
    color: inherit;
    font-size: 15px;
    line-height: 1.05;
    margin: 0;
    overflow-wrap: anywhere;
}

.pos-category-btn.active {
    background: var(--app-buttons, #09090b);
    border-color: var(--app-buttons, #09090b);
    color: #fff;
}

.pos-category-btn.active span {
    color: rgb(255 255 255 / 0.76);
}

.pos-category-btn.visual.active {
    background:
        linear-gradient(135deg, rgb(9 9 11 / 0.78), rgb(9 9 11 / 0.38)),
        var(--category-bg, linear-gradient(135deg, #09090b, #52525b));
    transform: translateY(-1px);
}

.pos-fast-section {
    display: grid;
    gap: 12px;
}

.pos-section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.pos-section-heading h2 {
    font-size: 18px;
    margin: 0;
}

.pos-section-heading span {
    color: #71717a;
    font-size: 13px;
    font-weight: 700;
}

.pos-fast-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
}

.pos-fast-chip,
.pos-touch-product {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-left: 5px solid #16a34a;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    color: #09090b;
    cursor: pointer;
    display: grid;
    overflow: hidden;
    padding: 12px;
    text-align: left;
}

.pos-fast-chip {
    gap: 10px;
    grid-template-columns: 74px minmax(0, 1fr);
    min-height: 108px;
}

.pos-fast-chip:hover,
.pos-touch-product:hover {
    border-color: #a1a1aa;
    transform: translateY(-1px);
}

.pos-fast-chip:disabled,
.pos-touch-product:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
}

.pos-chip-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pos-chip-media {
    align-items: center;
    aspect-ratio: 1;
    background: #f4f4f5;
    border-radius: 8px;
    color: #71717a;
    display: grid;
    font-weight: 900;
    justify-items: center;
    overflow: hidden;
    width: 74px;
}

.pos-chip-media img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.pos-chip-body > span,
.pos-product-name {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.pos-chip-body strong,
.pos-product-foot strong {
    font-size: 20px;
}

.pos-chip-body em,
.pos-product-code,
.pos-product-foot span {
    color: #71717a;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.pos-product-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.pos-touch-product {
    gap: 0;
    grid-template-rows: 148px minmax(104px, auto);
    min-height: 252px;
    padding: 0;
}

.pos-product-media {
    background: #f4f4f5;
    display: block;
    overflow: hidden;
    width: 100%;
}

.pos-product-media img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.pos-product-placeholder {
    align-items: center;
    background:
        linear-gradient(135deg, rgb(244 244 245 / 0.96), rgb(228 228 231 / 0.96));
    color: #71717a;
    display: grid;
    font-size: 30px;
    font-weight: 900;
    height: 100%;
    justify-items: center;
    letter-spacing: 0;
    width: 100%;
}

.pos-product-info {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.pos-touch-product .pos-product-name {
    font-size: 17px;
    min-height: 42px;
}

.pos-product-foot {
    align-items: end;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-top: auto;
}

.pos-product-foot strong {
    font-size: 24px;
    line-height: 1;
}

.stock-ok {
    border-left-color: #16a34a;
}

.stock-low {
    border-left-color: #f59e0b;
}

.stock-critical {
    border-left-color: #dc2626;
}

.pos-load-more {
    min-height: 52px;
}

.pos-cart-panel {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgb(15 23 42 / 0.08);
    display: grid;
    gap: 14px;
    padding: 16px;
}

.pos-cart-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.pos-cart-header h2 {
    font-size: 20px;
    margin: 4px 0 0;
}

.pos-cart-header > strong {
    font-size: 26px;
}

.pos-cart-list {
    display: grid;
    gap: 10px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 2px;
}

.pos-cart-row {
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.pos-cart-main {
    display: grid;
    gap: 3px;
}

.pos-cart-main strong {
    font-size: 15px;
    line-height: 1.18;
}

.pos-cart-main span {
    color: #71717a;
    font-size: 13px;
}

.stock-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    padding: 4px 8px;
    width: fit-content;
}

.stock-pill.ok {
    background: #dcfce7;
    color: #166534;
}

.stock-pill.low {
    background: #fef3c7;
    color: #92400e;
}

.stock-pill.critical {
    background: #fee2e2;
    color: #b91c1c;
}

.pos-qty-control {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
}

.pos-qty-control button,
.pos-qty-control input {
    border: 1px solid #d4d4d8;
    font-size: 18px;
    font-weight: 800;
    min-height: 46px;
    text-align: center;
}

.pos-qty-control button:first-child {
    border-radius: 8px 0 0 8px;
}

.pos-qty-control button:last-child {
    border-radius: 0 8px 8px 0;
}

.pos-qty-control input {
    border-left: 0;
    border-right: 0;
    min-width: 0;
}

.pos-cart-subtotal,
.pos-totals div {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.pos-remove {
    background: transparent;
    border: 0;
    color: #b91c1c;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 0;
}

.pos-totals {
    border-top: 1px solid #e4e4e7;
    display: grid;
    gap: 8px;
    padding-top: 12px;
}

.pos-totals span {
    color: #71717a;
    font-weight: 700;
}

.pos-totals strong {
    font-size: 24px;
}

.pos-charge-btn {
    font-size: 17px;
    min-height: 58px;
}

.pos-empty-state {
    background: #fff;
    border: 1px dashed #d4d4d8;
    border-radius: 8px;
    color: #71717a;
    font-weight: 700;
    padding: 24px;
    text-align: center;
}

.pos-modal-backdrop {
    align-items: center;
    background: rgb(9 9 11 / 0.58);
    display: grid;
    inset: 0;
    padding: 20px;
    position: fixed;
    z-index: 40;
}

.pos-modal-backdrop[hidden] {
    display: none !important;
}

.pos-charge-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgb(0 0 0 / 0.28);
    margin: 0 auto;
    max-width: 520px;
    padding: 20px;
    width: min(100%, 520px);
}

.pos-payment-input {
    font-size: 24px;
    font-weight: 800;
    min-height: 58px;
}

.pos-change-box {
    align-items: center;
    background: #f4f4f5;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    padding: 16px;
}

.pos-change-box span {
    color: #52525b;
    font-weight: 800;
}

.pos-change-box strong {
    font-size: 30px;
}

.pos-modal-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.receipt-body {
    background: #fff;
}

.receipt {
    margin: 0 auto;
    max-width: 420px;
    padding: 24px;
}

.receipt-header {
    border-bottom: 1px dashed #a1a1aa;
    padding-bottom: 14px;
    text-align: center;
}

.receipt-header h1 {
    font-size: 20px;
    margin: 0 0 6px;
}

.receipt-header p,
.receipt-meta p {
    color: #3f3f46;
    font-size: 13px;
    margin: 3px 0;
}

.receipt-meta {
    border-bottom: 1px dashed #a1a1aa;
    padding: 14px 0;
}

.receipt-table {
    border-collapse: collapse;
    margin-top: 14px;
    width: 100%;
}

.receipt-table th,
.receipt-table td {
    border-bottom: 1px solid #e4e4e7;
    font-size: 13px;
    padding: 8px 4px;
    text-align: left;
}

.receipt-table th:nth-child(n+2),
.receipt-table td:nth-child(n+2) {
    text-align: right;
}

.receipt-total {
    align-items: center;
    display: flex;
    font-size: 20px;
    justify-content: space-between;
    padding: 18px 0;
}

.receipt-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cash-summary {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 18px 0;
}

.cash-card {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    padding: 16px;
}

.cash-card p {
    color: #71717a;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
}

.cash-card strong {
    font-size: 24px;
}

.cash-card.is-main {
    border-color: var(--app-primary, #09090b);
}

.appearance-grid {
    display: grid;
    gap: 18px;
}

.appearance-logo {
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    display: block;
    height: 72px;
    margin-top: 10px;
    object-fit: contain;
    width: 120px;
}

.appearance-favicon {
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    display: block;
    height: 42px;
    margin-top: 10px;
    object-fit: contain;
    width: 42px;
}

.color-control {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 54px 1fr;
}

.color-input {
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    cursor: pointer;
    height: 42px;
    padding: 3px;
    width: 54px;
}

.appearance-preview {
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    display: grid;
    gap: 16px;
    grid-template-columns: 120px 1fr;
    margin-top: 18px;
    overflow: hidden;
}

.appearance-preview-menu {
    align-items: center;
    background: var(--app-menu, #fff);
    color: var(--app-primary, #09090b);
    display: grid;
    font-weight: 700;
    justify-items: center;
    min-height: 120px;
}

.appearance-preview > div:last-child {
    padding: 18px;
}

.theme-dark {
    --app-bg: #111113;
    --app-text: #f4f4f5;
}

.theme-dark .card,
.theme-dark .main-header,
.theme-dark .login-card,
.theme-dark .pos-product-card,
.theme-dark .pos-mode-bar,
.theme-dark .pos-command-bar,
.theme-dark .pos-fast-chip,
.theme-dark .pos-touch-product,
.theme-dark .pos-product-media,
.theme-dark .pos-product-placeholder,
.theme-dark .pos-chip-media,
.theme-dark .pos-cart-panel,
.theme-dark .pos-cart-row,
.theme-dark .pos-empty-state,
.theme-dark .pos-charge-modal,
.theme-dark .pos-change-box,
.theme-dark .cash-card,
.theme-dark .sidebar,
.theme-dark .user-panel {
    background: #18181b;
    border-color: #3f3f46;
    color: #f4f4f5;
}

.theme-dark .input,
.theme-dark .button.secondary,
.theme-dark .pos-category-btn,
.theme-dark .pos-qty-control button,
.theme-dark .pos-qty-control input {
    background: #111113;
    border-color: #3f3f46;
    color: #f4f4f5;
}

.theme-dark .data-table th,
.theme-dark .data-table td,
.theme-dark .brand,
.theme-dark .main-header,
.theme-dark .sidebar-footer {
    border-color: #3f3f46;
}

.theme-dark .nav-item {
    color: #d4d4d8;
}

.cash-grid {
    display: grid;
    gap: 18px;
}

.report-filter {
    align-items: end;
    display: grid;
    gap: 10px;
}

.audit-filter {
    align-items: end;
    display: grid;
    gap: 10px;
}

.report-summary {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 18px 0;
}

.report-grid {
    display: grid;
    gap: 18px;
}

.cash-difference {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
}

.cash-difference.neutral {
    background: #f4f4f5;
    color: #52525b;
}

.cash-difference.positive {
    background: #ecfdf5;
    color: #047857;
}

.cash-difference.negative {
    background: #fef2f2;
    color: #b91c1c;
}

.product-thumb {
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    height: 48px;
    object-fit: cover;
    width: 48px;
}

.category-thumb {
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    height: 120px;
    object-fit: cover;
    width: 220px;
}

.category-thumb.small {
    height: 48px;
    width: 76px;
}

.product-placeholder {
    align-items: center;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    color: #71717a;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    height: 48px;
    justify-items: center;
    width: 48px;
}

.product-detail {
    align-items: start;
    display: grid;
    gap: 24px;
}

.product-image-large {
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    max-height: 360px;
    object-fit: cover;
    width: 100%;
}

.pagination {
    margin-top: 16px;
}

.pagination nav > div:first-child {
    display: none;
}

.pagination svg {
    height: 18px;
    width: 18px;
}

.login-page {
    display: grid;
    min-height: 100vh;
    padding: 40px 20px;
    place-items: center;
}

.controlbox-login {
    background:
        linear-gradient(180deg, rgb(255 255 255 / 0.94), rgb(239 246 255 / 0.88)),
        radial-gradient(circle at 12% 10%, rgb(37 99 235 / 0.12), transparent 28%),
        radial-gradient(circle at 92% 88%, rgb(0 122 255 / 0.18), transparent 34%);
    gap: 24px;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    position: relative;
}

.controlbox-login::after {
    background: linear-gradient(110deg, transparent, rgb(37 99 235 / 0.12));
    bottom: -120px;
    content: "";
    height: 260px;
    left: -10%;
    position: absolute;
    transform: rotate(-5deg);
    width: 120%;
}

.login-hero-panel,
.controlbox-login-card {
    position: relative;
    z-index: 1;
}

.login-hero-panel {
    align-items: center;
    border-radius: 8px;
    display: grid;
    justify-items: center;
    max-width: 940px;
    min-height: 360px;
    overflow: hidden;
    padding: 42px;
    position: relative;
    text-align: center;
    width: 100%;
}

.login-hero-panel.has-hero-bg {
    background:
        linear-gradient(90deg, rgb(255 255 255 / 0.96) 0%, rgb(255 255 255 / 0.86) 42%, rgb(255 255 255 / 0.18) 100%),
        var(--login-hero-bg);
    background-position: center;
    background-size: cover;
    box-shadow: 0 24px 80px rgb(15 23 42 / 0.10);
}

.login-hero-panel.has-hero-bg::after {
    background:
        linear-gradient(180deg, transparent 55%, rgb(219 234 254 / 0.56)),
        radial-gradient(circle at 18% 24%, rgb(37 99 235 / 0.10), transparent 30%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.login-hero-panel > * {
    position: relative;
    z-index: 1;
}

.login-hero-panel h1 {
    color: #0f172a;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    margin: 24px 0 10px;
    max-width: 620px;
}

.login-hero-panel p {
    color: #475569;
    font-size: 18px;
    margin: 0;
}

.login-hero-image {
    border-radius: 8px;
    box-shadow: 0 24px 80px rgb(15 23 42 / 0.12);
    max-height: min(58vh, 620px);
    object-fit: contain;
    width: min(100%, 1180px);
}

.login-hero-logo {
    display: block;
    filter: drop-shadow(0 18px 34px rgb(15 23 42 / 0.10));
    max-width: min(100%, 430px);
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}

.login-brand-symbol {
    border-radius: 8px;
    height: 56px;
    object-fit: contain;
    width: 56px;
}

.login-card {
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    max-width: 448px;
    padding: 24px;
    width: 100%;
}

.controlbox-login-card {
    border-color: rgb(37 99 235 / 0.16);
    box-shadow: 0 24px 80px rgb(15 23 42 / 0.14);
}

.login-title {
    font-size: 28px;
    margin: 0 0 4px;
}

.form {
    display: grid;
    gap: 16px;
}

.field-label {
    color: #3f3f46;
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.input {
    border: 1px solid #d4d4d8;
    border-radius: 8px;
    outline: none;
    padding: 10px 12px;
    width: 100%;
}

.input:focus {
    border-color: #09090b;
    box-shadow: 0 0 0 3px rgb(9 9 11 / 0.1);
}

.checkbox {
    align-items: center;
    color: #52525b;
    display: flex;
    font-size: 14px;
    gap: 8px;
}

.error {
    color: #dc2626;
    font-size: 14px;
    margin: 6px 0 0;
}

.mobile-only {
    display: block;
}

.sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@media (min-width: 768px) {
    .grid.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .toolbar {
        align-items: center;
        flex-direction: row;
    }

    .search-form {
        align-items: end;
        display: flex;
    }

    .form-grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail {
        grid-template-columns: 340px 1fr;
    }

    .section-row {
        align-items: center;
        flex-direction: row;
    }

    .cb-pagination {
        flex-direction: row;
    }

    .cb-pagination-summary {
        white-space: nowrap;
    }

    .pos-search {
        align-items: end;
        grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    }

    .pos-command-bar {
        grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.75fr);
    }

    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }

    .pos-touch-product {
        grid-template-rows: 164px minmax(110px, auto);
        min-height: 274px;
    }

    .pos-cart-row {
        grid-template-columns: minmax(0, 1fr) 148px;
    }

    .pos-cart-subtotal {
        grid-column: 1 / -1;
    }

    .cash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-filter {
        grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) auto auto;
    }

    .audit-filter {
        grid-template-columns: repeat(5, minmax(130px, 1fr)) auto auto;
    }

    .report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .appearance-grid {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }
}

@media (min-width: 1024px) {
    .controlbox-login {
        grid-template-columns: minmax(0, 1.45fr) minmax(380px, 460px);
        padding: 48px;
    }

    .pos-shell {
        grid-template-columns: minmax(0, 1fr) 380px;
    }

    .pos-terminal-grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    }

    .pos-terminal.cashier-mode .pos-terminal-grid {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    }

    .pos-terminal.cashier-mode .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .pos-terminal.cashier-mode .pos-touch-product {
        grid-template-rows: 176px minmax(112px, auto);
        min-height: 288px;
    }

    .pos-cart-panel {
        position: sticky;
        top: 16px;
    }

    .app-shell {
        display: grid;
        grid-template-columns: 280px 1fr;
    }

    .sidebar {
        border-bottom: 0;
        border-right: 1px solid #e4e4e7;
        min-height: 100vh;
    }

    .sidebar-inner {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .nav {
        display: block;
        overflow: visible;
    }

    .nav-item + .nav-item {
        margin-top: 4px;
    }

    .sidebar-footer {
        display: block;
    }

    .main-header {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        padding-left: 32px;
        padding-right: 32px;
    }

    .content {
        padding-left: 32px;
        padding-right: 32px;
    }

    .mobile-only {
        display: none;
    }
}

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }

    .brand {
        min-height: 68px;
        padding: 0 16px;
    }

    .brand-title {
        max-width: 190px;
    }

    .nav {
        gap: 6px;
        padding: 10px 12px;
    }

    .nav-item {
        border: 1px solid #e4e4e7;
        border-radius: 8px;
        font-size: 13px;
        min-height: 44px;
        padding: 9px 10px;
    }

    .nav-item.active {
        border-color: var(--app-primary, #09090b);
    }

    .main-header {
        min-height: auto;
        padding: 14px 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .content {
        padding: 16px 12px 22px;
    }

    .card {
        padding: 14px;
    }

    .toolbar {
        gap: 10px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .button {
        min-height: 44px;
    }

    .button.small {
        min-height: 38px;
    }

    .table-actions {
        justify-content: flex-start;
        min-width: max-content;
    }

    .data-table th,
    .data-table td {
        padding: 12px 10px;
    }

    .cb-pagination {
        align-items: stretch;
        margin: 0 -14px -14px;
        padding: 14px;
    }

    .cb-pagination-controls {
        justify-content: space-between;
    }

    .cb-page-list {
        flex: 1;
    }

    .login-page {
        align-content: start;
        min-height: 100svh;
        padding: 16px;
        place-items: stretch;
    }

    .controlbox-login {
        gap: 14px;
    }

    .controlbox-login::after {
        bottom: -170px;
        height: 230px;
    }

    .login-hero-panel {
        min-height: 156px;
        padding: 0;
    }

    .login-hero-panel.has-hero-bg {
        background:
            linear-gradient(180deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.30)),
            var(--login-hero-bg);
        background-position: center;
        background-size: cover;
        box-shadow: 0 12px 34px rgb(15 23 42 / 0.10);
    }

    .login-hero-panel.has-hero-bg::after {
        background: linear-gradient(180deg, transparent 48%, rgb(219 234 254 / 0.42));
    }

    .login-hero-panel h1 {
        font-size: 30px;
    }

    .login-hero-panel p {
        font-size: 15px;
    }

    .login-card {
        max-width: none;
        padding: 18px;
    }

    .controlbox-login-card {
        box-shadow: 0 18px 54px rgb(15 23 42 / 0.12);
    }

    .login-brand {
        gap: 10px;
        margin-bottom: 18px;
    }

    .login-brand-symbol,
    .brand-mark {
        height: 44px;
        width: 44px;
    }

    .login-title {
        font-size: 25px;
    }

    .input {
        font-size: 16px;
        min-height: 50px;
    }

    .pos-mode-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .pos-mode-btn {
        width: 100%;
    }

    .pos-modal-actions {
        grid-template-columns: 1fr;
    }
}

@media print {
    .receipt-actions {
        display: none;
    }

    .receipt {
        max-width: none;
        padding: 0;
    }
}
