:root {
    --color-primary: #7C3AED;
    --color-primary-dark: #5B21B6;
    --color-secondary: #EC4899;
    --color-accent: #F59E0B;
    --color-success: #10B981;
    --color-danger: #EF4444;
    --color-warning: #F97316;
    --color-info: #3B82F6;
    --color-bg: #F8FAFC;
    --color-bg-soft: #F4F1FF;
    --color-card: #FFFFFF;
    --color-text: #111827;
    --color-muted: #6B7280;
    --color-border: #E5E7EB;
    --color-border-strong: #D8D3F2;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
    --sidebar-width: clamp(224px, 17vw, 264px);
    --content-max: 1600px;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

html {
    font-size: clamp(12.5px, 0.62vw + 4px, 16px);
}

body {
    font-size: 1rem;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.10), transparent 28%),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.08), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 252, 0.9));
    z-index: -1;
}

img {
    max-width: 100%;
    display: block;
}

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

a:hover {
    color: var(--color-primary-dark);
}

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

button {
    cursor: pointer;
}

select,
input,
textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    background: #fff;
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(124, 58, 237, 0.7);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

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

hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 1.5rem 0;
}

.card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.card-pad {
    padding: clamp(1rem, 1.8vw, 1.5rem);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    background: transparent;
    color: var(--color-text);
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.button.primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: 0 14px 26px rgba(124, 58, 237, 0.24);
}

.button.primary:hover {
    box-shadow: 0 18px 32px rgba(124, 58, 237, 0.3);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(124, 58, 237, 0.16);
    color: var(--color-primary);
}

.button.small {
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.button.full,
.full {
    width: 100%;
}

.plan-badge,
.preview-pill,
.credential-chip,
.pos-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.58rem 0.9rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.12);
    color: var(--color-primary-dark);
    font-weight: 700;
}

.alert {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-warning {
    color: #8a4b08;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.18);
}

.alert-success {
    color: #0f766e;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.18);
}

.alert-danger {
    color: #b42318;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.18);
}

.alert-info {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.18);
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.table-wrapper table,
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
    table-layout: auto;
}

th,
td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.88);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

th {
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tbody tr:hover {
    background: rgba(124, 58, 237, 0.03);
}

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

.form-row {
    display: grid;
    gap: 1rem;
}

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

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

label {
    display: grid;
    gap: 0.48rem;
    font-weight: 700;
}

label span {
    color: var(--color-muted);
    font-size: 0.92rem;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 100vh;
    padding: 1.5rem 1.1rem;
    background: rgba(255, 255, 255, 0.92);
    border-right: 1px solid rgba(229, 231, 235, 0.88);
    backdrop-filter: blur(14px);
}

.sidebar-brand,
.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.sidebar-brand strong,
.landing-brand strong {
    display: block;
    font-size: 1.45rem;
}

.sidebar-brand span,
.landing-brand span {
    color: var(--color-muted);
}

.sidebar-brand-mark,
.landing-brand-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 18px 34px rgba(124, 58, 237, 0.24);
}

.sidebar-nav {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    color: #374151;
    font-weight: 700;
}

.sidebar-link i {
    font-size: 1.05rem;
}

.sidebar-link span {
    white-space: nowrap;
}

.sidebar-link:hover,
.sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.96), rgba(91, 33, 182, 0.96));
    color: #fff;
    box-shadow: 0 18px 28px rgba(124, 58, 237, 0.2);
}

.sidebar-foot {
    margin-top: auto;
}

.brand-card {
    display: grid;
    gap: 0.4rem;
    padding: 1.2rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 244, 255, 0.96));
    border: 1px solid rgba(124, 58, 237, 0.12);
    text-align: center;
}

.brand-card-logo {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #b88712;
    font-size: 2rem;
    background: linear-gradient(180deg, #fffdf5, #fff);
}

.brand-card span {
    color: #a78b7a;
}

.app-main {
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(200px, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem clamp(0.85rem, 2vw, 1.5rem);
    background: rgba(248, 250, 252, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.84);
}

.topbar-business form,
.topbar-actions,
.topbar-actions form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.topbar-select {
    min-width: 220px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.92);
}

.topbar-search {
    min-width: 0;
}

.topbar-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.94);
    min-height: 52px;
}

.topbar-search input:disabled {
    opacity: 0.9;
    color: var(--color-muted);
}

.app-content {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding: clamp(1rem, 2vw, 1.8rem);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-header h1,
.section-heading h2,
.auth-head h1,
.ticket-head strong,
.pos-header h1,
.landing-copy h1 {
    margin: 0;
    line-height: 1.1;
}

.page-header h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.page-header p,
.section-heading p,
.auth-head p,
.landing-copy p,
.ticket-head span,
.user-summary span {
    margin: 0.4rem 0 0;
    color: var(--color-muted);
}

.page-header.split,
.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.plan-card {
    display: grid;
    gap: 0.35rem;
    min-width: min(100%, 360px);
    padding: 1rem 1.25rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.06));
    border: 1px solid rgba(124, 58, 237, 0.14);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    display: grid;
    gap: 0.45rem;
    padding: 1.15rem 1.2rem;
}

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

.stat-card strong {
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.content-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}

.two-columns,
.users-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.stack-section {
    display: grid;
    gap: 1rem;
}

.bullet-list,
.stack-list,
.permission-stack {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.bullet-list li,
.list-item,
.permission-line,
.stat-stack > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.84);
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.bullet-list strong {
    color: var(--color-success);
}

.list-item.is-selected {
    border-color: rgba(124, 58, 237, 0.25);
    background: rgba(124, 58, 237, 0.08);
}

.list-item span {
    color: var(--color-muted);
}

.inline-forms {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.mini-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.adjust-box {
    margin-top: 1.2rem;
    padding: 1.15rem;
    border-radius: 22px;
    background: rgba(124, 58, 237, 0.05);
    border: 1px solid rgba(124, 58, 237, 0.12);
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.permission-card {
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: linear-gradient(180deg, #fff, #fbfbff);
}

.permission-card h3,
.variant-card h3,
.preview-card h3 {
    margin: 0 0 0.85rem;
}

.permission-line {
    padding: 0.8rem 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: 0;
}

.permission-card .permission-line:last-child,
.permission-stack .permission-line:last-child {
    border-bottom: 0;
}

.permission-line input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--color-primary);
    justify-self: end;
}

.permission-stack.compact .permission-line {
    padding: 0.65rem 0;
}

.toggle-pill {
    display: inline-flex;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    position: relative;
}

.toggle-pill::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 4px;
    left: 4px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.toggle-pill.on {
    background: rgba(124, 58, 237, 0.34);
}

.toggle-pill.on::after {
    transform: translateX(20px);
}

.toggle-pill.off {
    background: rgba(148, 163, 184, 0.32);
}

.user-summary {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.stat-stack {
    display: grid;
    gap: 0.75rem;
}

.success-text {
    color: var(--color-success);
}

.warning-text {
    color: var(--color-warning);
}

.logo-preview {
    width: min(220px, 100%);
    padding: 1rem;
    border-radius: 22px;
    border: 1px dashed rgba(124, 58, 237, 0.28);
    background: rgba(255, 255, 255, 0.72);
}

.logo-preview img {
    width: 100%;
    object-fit: contain;
}

.landing-shell {
    width: min(100%, var(--content-max));
    margin: 0 auto;
    padding: clamp(1rem, 2vw, 2rem);
}

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0 1.5rem;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.landing-nav a:not(.button) {
    color: var(--color-muted);
    font-weight: 700;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.9fr);
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: center;
    padding: clamp(1.4rem, 4vw, 3rem);
    min-height: 520px;
    background:
        radial-gradient(circle at top left, rgba(124, 58, 237, 0.12), transparent 36%),
        radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.12), transparent 28%),
        rgba(255, 255, 255, 0.94);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 0.85rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: rgba(124, 58, 237, 0.08);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.landing-copy h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    max-width: 12ch;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.3rem;
}

.landing-stats,
.preview-grid,
.feature-grid,
.module-grid,
.pricing-grid {
    display: grid;
    gap: 1rem;
}

.landing-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.6rem;
}

.landing-stats div,
.preview-grid div {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(229, 231, 235, 0.85);
}

.landing-stats strong,
.preview-grid strong {
    display: block;
    font-size: 1.45rem;
}

.landing-stats span,
.preview-grid span {
    color: var(--color-muted);
}

.landing-preview {
    display: grid;
    place-items: center;
}

.preview-card {
    width: min(100%, 360px);
    padding: 1.4rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 241, 255, 0.95));
    border: 1px solid rgba(124, 58, 237, 0.12);
    box-shadow: var(--shadow-lg);
}

.preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.landing-section {
    margin-top: clamp(2rem, 5vw, 4rem);
}

.section-heading {
    margin-bottom: 1.25rem;
}

.feature-grid,
.module-grid,
.pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.module-card,
.pricing-card,
.feature-grid .card {
    padding: 1.25rem;
}

.pricing-card.is-featured {
    border-color: rgba(124, 58, 237, 0.18);
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.07), rgba(255, 255, 255, 0.96));
}

.pricing-label {
    color: var(--color-secondary);
    font-weight: 800;
}

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

.launchpad-page {
    min-height: calc(100vh - 4rem);
    display: grid;
    place-items: center;
    padding: 1rem;
}

.launchpad-wrap {
    width: min(100%, 1080px);
    padding: clamp(1.5rem, 4vw, 2.4rem);
    display: grid;
    gap: 1.5rem;
}

.launchpad-head {
    display: grid;
    gap: 0.8rem;
    justify-items: center;
    text-align: center;
}

.launchpad-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.1);
    color: var(--color-primary-dark);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.launchpad-pill-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.launchpad-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    color: var(--color-muted);
    font-weight: 700;
}

.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.launchpad-tile {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    gap: 0.7rem;
    padding: 1.15rem;
    text-align: center;
    border-radius: 28px;
    border: 1px solid rgba(229, 231, 235, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 241, 255, 0.96));
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.launchpad-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.22);
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.09);
}

.launchpad-tile-icon {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    font-size: 1.7rem;
    box-shadow: 0 18px 28px rgba(124, 58, 237, 0.25);
}

.launchpad-tile strong {
    font-size: 1.02rem;
}

.launchpad-tile span {
    color: var(--color-muted);
    font-size: 0.88rem;
}

.auth-shell.wide .auth-card {
    width: min(100%, 960px);
}

.auth-card {
    width: min(100%, 520px);
    padding: clamp(1.4rem, 3vw, 2rem);
}

.auth-head {
    display: grid;
    place-items: center;
    gap: 0.85rem;
    text-align: center;
    margin-bottom: 1.4rem;
}

.auth-head.left {
    justify-items: start;
    text-align: left;
}

.auth-foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.15rem;
    color: var(--color-muted);
}

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

.pos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pos-header-actions,
.pos-header-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.pos-products,
.pos-cart {
    padding: 1rem;
}

.pos-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.chip-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.chip {
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: #fff;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.chip.is-active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: 0 12px 22px rgba(124, 58, 237, 0.22);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 170px));
    gap: 1rem;
    justify-content: start;
    align-content: start;
}

.product-card {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    text-align: left;
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    border-color: rgba(124, 58, 237, 0.22);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.product-thumb {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.1));
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--color-primary-dark);
}

.product-card strong {
    font-size: 1rem;
}

.product-card span,
.product-card small,
.cart-item span,
.cart-item small,
.muted {
    color: var(--color-muted);
}

.cart-items {
    display: grid;
    gap: 0.8rem;
    margin: 1rem 0;
    max-height: 420px;
    overflow: auto;
    padding-right: 0.2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.9rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.95);
}

.qty-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qty-box button,
.variant-option {
    border: 1px solid rgba(124, 58, 237, 0.14);
    border-radius: 12px;
    background: #fff;
}

.qty-box button {
    min-width: 34px;
    min-height: 34px;
    color: var(--color-primary-dark);
}

.totals-box,
.payment-box {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.95);
    margin-bottom: 1rem;
}

.totals-box > div,
.payment-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.grand-total {
    padding-top: 0.3rem;
    border-top: 1px solid rgba(229, 231, 235, 0.88);
}

.grand-total strong {
    font-size: 1.75rem;
    color: var(--color-primary-dark);
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.payment-summary {
    display: grid;
    gap: 0.55rem;
}

.payment-method-summary {
    min-height: 72px;
    padding: 0.85rem 0.95rem;
    border: 1px dashed rgba(124, 58, 237, 0.28);
    border-radius: 18px;
    background: rgba(124, 58, 237, 0.04);
}

.payment-method-summary .muted {
    margin: 0;
}

.payment-method-list {
    display: grid;
    gap: 0.45rem;
}

.payment-method-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(216, 211, 242, 0.9);
}

.payment-method-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.payment-method-switches {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.payment-method-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(124, 58, 237, 0.18);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary-dark);
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.payment-method-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(124, 58, 237, 0.12);
}

.payment-method-chip.is-active {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    box-shadow: 0 14px 24px rgba(91, 33, 182, 0.24);
}

.payment-method-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.payment-method-panel {
    display: none;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(216, 211, 242, 0.92);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 241, 255, 0.72));
}

.payment-method-panel.is-active {
    display: grid;
}

.payment-dialog-card {
    width: min(96vw, 840px);
    gap: 1.2rem;
}

.payment-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-right: 3rem;
}

.payment-dialog-head h3,
.payment-dialog-total strong {
    margin: 0;
}

.payment-dialog-head p {
    margin: 0.35rem 0 0;
    color: var(--color-muted);
}

.payment-dialog-total {
    min-width: 180px;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.16);
}

.payment-dialog-total span {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--color-muted);
}

.payment-dialog-total strong {
    font-size: 1.55rem;
    color: var(--color-primary-dark);
}

.payment-dialog-summary {
    margin-top: 0.2rem;
}

.dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.variant-dialog {
    width: min(96vw, 680px);
    max-width: calc(100vw - 1rem);
    border: 0;
    padding: 0;
    background: transparent;
}

.variant-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
}

.variant-card {
    position: relative;
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.4rem;
    border-radius: 28px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: var(--shadow-lg);
}

.dialog-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--color-primary-dark);
    font-size: 1.35rem;
}

.variant-option-list {
    display: grid;
    gap: 0.75rem;
}

.variant-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    text-align: left;
}

.variant-option small {
    color: var(--color-muted);
}

.ticket-card {
    width: min(100%, 760px);
    padding: 1.6rem;
}

.ticket-card--thermal {
    width: min(100%, 80mm);
    max-width: 80mm;
    margin: 0 auto;
}

.ticket-card--58 {
    max-width: 58mm;
    padding: 0.85rem;
    font-size: 0.72rem;
}

.ticket-card--80 {
    max-width: 80mm;
    padding: 1rem;
    font-size: 0.82rem;
}

.ticket-logo {
    max-width: 120px;
    max-height: 72px;
    margin: 0 auto 0.8rem;
    object-fit: contain;
}

.ticket-head,
.ticket-grid {
    display: grid;
    gap: 0.4rem;
}

.ticket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.84);
}

.ticket-footer {
    margin: 1rem 0 1.4rem;
    text-align: center;
    color: var(--color-muted);
}

.ticket-actions {
    display: grid;
    gap: 0.65rem;
}

.ticket-actions .button {
    width: 100%;
    justify-content: center;
}

.ticket-card--thermal .ticket-grid {
    margin: 0.75rem 0;
    padding: 0.55rem;
    border-radius: 14px;
}

.ticket-card--thermal .table-wrapper {
    overflow: visible;
}

.ticket-card--thermal table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
}

.ticket-card--thermal th,
.ticket-card--thermal td {
    padding: 0.24rem 0.18rem;
    font-size: inherit;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ticket-card--58 .ticket-head strong {
    font-size: 1rem;
}

.ticket-card--80 .ticket-head strong {
    font-size: 1.15rem;
}

.ticket-card--58 .ticket-head span,
.ticket-card--58 .ticket-footer,
.ticket-card--58 th,
.ticket-card--58 td {
    font-size: 0.66rem;
}

canvas {
    width: 100% !important;
    max-width: 100%;
}

@media (min-width: 1025px) and (max-width: 1600px), (min-width: 1025px) and (max-height: 820px) {
    .sidebar {
        padding: 1rem 0.9rem;
        gap: 1rem;
    }

    .sidebar-brand strong {
        font-size: 1.3rem;
    }

    .sidebar-brand-mark {
        width: 50px;
        height: 50px;
        border-radius: 16px;
        font-size: 1.45rem;
    }

    .sidebar-link {
        gap: 0.72rem;
        padding: 0.78rem 0.92rem;
        border-radius: 14px;
    }

    .brand-card {
        padding: 0.95rem;
        border-radius: 20px;
    }

    .brand-card-logo {
        width: 62px;
        height: 62px;
        font-size: 1.65rem;
    }

    .topbar {
        gap: 0.75rem;
        padding: 0.72rem 1rem;
    }

    .app-content {
        padding: 0.9rem 1rem 1rem;
    }

    select,
    input,
    textarea {
        padding: 0.72rem 0.88rem;
    }

    .topbar-search input {
        min-height: 46px;
    }

    .button {
        min-height: 42px;
        padding: 0.68rem 1rem;
        border-radius: 13px;
    }

    .button.small {
        min-height: 34px;
        padding: 0.48rem 0.8rem;
    }

    .plan-badge,
    .preview-pill,
    .credential-chip,
    .pos-note {
        padding: 0.5rem 0.75rem;
    }

    .card-pad,
    .pos-products,
    .pos-cart,
    .totals-box,
    .payment-box,
    .ticket-card {
        padding: 0.9rem;
    }

    .page-header {
        margin-bottom: 1rem;
    }

    .page-header h1 {
        font-size: clamp(1.75rem, 2.1vw, 2.45rem);
    }

    .page-header.split,
    .section-row,
    .stats-grid,
    .content-grid,
    .dashboard-grid,
    .two-columns,
    .users-layout,
    .stack-section,
    .form-grid,
    .form-row,
    .pos-shell {
        gap: 0.85rem;
    }

    .stats-grid {
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 0.95rem 1rem;
    }

    .alert {
        padding: 0.85rem 1rem;
    }

    .bullet-list li,
    .list-item,
    .permission-line,
    .stat-stack > div {
        padding: 0.78rem 0.9rem;
    }

    th,
    td {
        padding: 0.75rem 0.85rem;
    }

    .pos-layout {
        grid-template-columns: minmax(0, 1.72fr) minmax(390px, 0.84fr);
        gap: 0.85rem;
        align-items: stretch;
    }

    .pos-products,
    .pos-cart {
        max-height: calc(100vh - 96px);
        overflow: auto;
    }

    .pos-toolbar,
    .chip-row,
    .pos-header,
    .pos-header-actions,
    .pos-header-links {
        gap: 0.75rem;
    }

    .chip-row {
        margin: 0.75rem 0;
    }

    .chip {
        padding: 0.56rem 0.88rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 150px));
        gap: 0.8rem;
        padding-right: 0.2rem;
    }

    .product-card {
        gap: 0.45rem;
        padding: 0.85rem;
        border-radius: 20px;
    }

    .product-thumb {
        border-radius: 18px;
        font-size: 2rem;
    }

    .product-card strong {
        font-size: 0.95rem;
    }

    .cart-items {
        gap: 0.7rem;
        margin: 0.75rem 0;
        max-height: min(32vh, 290px);
    }

    .cart-item {
        padding: 0.75rem;
        border-radius: 16px;
    }

    .totals-box,
    .payment-box {
        gap: 0.75rem;
        border-radius: 18px;
        margin-bottom: 0.85rem;
    }

    .grand-total strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 1280px) {
    .topbar {
        grid-template-columns: 1fr;
    }

    .topbar-actions {
        justify-content: flex-start;
    }

    .topbar-business form {
        width: 100%;
    }

    .topbar-select {
        width: 100%;
        min-width: 0;
    }

    .dashboard-grid,
    .two-columns,
    .users-layout,
    .pos-layout,
    .landing-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        min-height: auto;
        gap: 0.85rem;
        padding: 0.85rem 1rem 0.95rem;
        border-right: 0;
        border-bottom: 1px solid rgba(229, 231, 235, 0.88);
    }

    .sidebar-brand {
        gap: 0.75rem;
    }

    .sidebar-brand strong {
        font-size: 1.2rem;
    }

    .sidebar-brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 1.25rem;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.65rem;
        overflow-x: auto;
        padding-bottom: 0.2rem;
        scrollbar-width: thin;
    }

    .sidebar-link {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 0.8rem 0.95rem;
    }

    .sidebar-foot {
        display: none;
    }

    .app-content {
        padding: 1rem;
    }

    .landing-header,
    .page-header,
    .page-header.split,
    .section-row,
    .pos-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .form-row.two,
    .form-row.three,
    .payment-grid,
    .mini-form,
    .landing-stats,
    .preview-grid,
    .pos-toolbar,
    .ticket-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 0.75rem 0.85rem 0.85rem;
        gap: 0.7rem;
    }

    .sidebar-brand {
        display: none;
    }

    .topbar {
        padding: 0.75rem 0.85rem;
        gap: 0.75rem;
    }

    .topbar-search {
        display: none;
    }

    .topbar-business form,
    .auth-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .topbar-actions form {
        flex-direction: row;
        align-items: center;
    }

    .stats-grid,
    .feature-grid,
    .module-grid,
    .pricing-grid,
    .permission-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(148px, 148px));
    }

    .payment-method-switches,
    .payment-method-panels,
    .dialog-actions {
        grid-template-columns: 1fr;
    }

    .payment-dialog-head {
        flex-direction: column;
        padding-right: 0;
    }

    .cart-item,
    .bullet-list li,
    .list-item,
    .stat-stack > div {
        flex-direction: column;
        align-items: stretch;
    }

    .table-wrapper table,
    table {
        min-width: 100%;
    }

    th,
    td {
        padding: 0.8rem 0.75rem;
    }
}

@media (max-width: 560px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 132px));
    }

    .landing-shell,
    .app-content,
    .auth-shell,
    .ticket-shell {
        padding: 0.9rem;
    }

    .sidebar,
    .card-pad,
    .pos-products,
    .pos-cart,
    .auth-card,
    .ticket-card {
        padding: 0.9rem;
    }

    .sidebar-nav {
        gap: 0.5rem;
    }

    .sidebar-link {
        padding: 0.72rem 0.88rem;
        font-size: 0.94rem;
    }

    .topbar-actions {
        align-items: stretch;
    }

    .topbar-select,
    .topbar-actions .button,
    .topbar-actions form {
        width: 100%;
    }

    .table-wrapper table,
    table {
        min-width: 100%;
    }

    th,
    td {
        padding: 0.72rem 0.65rem;
    }
}

@media print {
    body::before,
    .button,
    .sidebar,
    .topbar {
        display: none !important;
    }

    .ticket-shell {
        padding: 0;
        min-height: auto;
    }

    .ticket-card {
        box-shadow: none;
        border: 0;
    }

    .ticket-card:not(.ticket-card--thermal) {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .ticket-card--thermal table {
        min-width: 0 !important;
    }

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

/* SBV1 UI Refresh */
.launchpad-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.launchpad-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.launchpad-head p {
    margin: 0;
    max-width: 42rem;
    color: var(--color-muted);
}

.launchpad-modal-card {
    width: min(96vw, 980px);
}

#launchpadDialog.variant-dialog {
    width: min(96vw, 980px);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-chip--paid {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.status-chip--partial {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.status-chip--cancelled {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.danger-outline {
    border-color: rgba(239, 68, 68, 0.28) !important;
    color: #b91c1c !important;
}

.sales-history-card,
.sale-detail-card {
    width: min(96vw, 980px);
}

#salesHistoryDialog.variant-dialog,
#saleDetailDialog.variant-dialog {
    width: min(96vw, 980px);
}

#paymentDialog.variant-dialog {
    width: min(96vw, 840px);
}

.sales-table-wrapper {
    max-height: 430px;
    overflow: auto;
}

.sales-history-table {
    min-width: 860px;
}

.sales-history-actions,
.sale-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sale-detail-empty {
    min-height: 200px;
    display: grid;
    place-items: center;
}

.sale-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.sale-detail-head h3,
.sale-detail-section h4 {
    margin: 0;
}

.sale-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.sale-detail-stat {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.95);
}

.sale-detail-stat span,
.sale-detail-meta {
    color: var(--color-muted);
}

.sale-detail-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sale-detail-section {
    display: grid;
    gap: 0.75rem;
}

.inventory-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.inventory-tab {
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    background: #fff;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.inventory-tab.is-active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    box-shadow: 0 12px 22px rgba(124, 58, 237, 0.22);
}

.inventory-panel {
    display: none;
    gap: 1rem;
}

.inventory-panel.is-active {
    display: grid;
}

.inventory-panel-head {
    align-items: flex-start;
}

.inventory-panel-head h2,
.inventory-panel-head h3 {
    margin-bottom: 0.35rem;
}

.inventory-table-scroll {
    max-height: 470px;
    overflow: auto;
}

.inventory-panel .table-wrapper table {
    min-width: 760px;
}

.inventory-adjust-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.inventory-form-card,
.inventory-mini-form {
    padding: 1rem;
    border-radius: 24px;
    background: rgba(248, 250, 252, 0.92);
    border: 1px solid rgba(229, 231, 235, 0.95);
}

.inventory-form-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.inventory-product-dialog {
    width: min(96vw, 1120px);
}

#inventoryProductDialog.variant-dialog {
    width: min(96vw, 1120px);
}

.inventory-variant-scroll {
    max-height: 280px;
    overflow: auto;
}

.inventory-variant-scroll table {
    min-width: 720px;
}

@media (max-width: 980px) {
    .sale-detail-grid,
    .inventory-adjust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .launchpad-toolbar,
    .sales-history-actions,
    .sale-detail-head,
    .sale-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sale-detail-grid,
    .inventory-adjust-grid,
    .inventory-form-actions {
        grid-template-columns: 1fr;
    }

    .inventory-tab {
        flex: 1 1 calc(50% - 0.75rem);
        justify-content: center;
    }
}





/* SBV1 responsive stabilization */
.pos-shell {
    min-height: calc(100vh - 92px);
}

.pos-products,
.pos-cart {
    min-height: 0;
}

.pos-products {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
}

.pos-cart {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    overflow: hidden;
}

.product-grid,
.cart-items {
    min-height: 0;
}

.product-grid {
    overflow: auto;
    padding-right: 0.25rem;
}

.cart-items {
    max-height: none;
    overflow: auto;
}

.cart-footer-actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
    gap: 0.75rem;
    padding-top: 0.65rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0), rgba(248, 250, 252, 0.96) 28%, rgba(248, 250, 252, 0.98));
}

.payment-method-summary,
.payment-method-list {
    display: grid;
    gap: 0.65rem;
}

.payment-method-item small,
.payment-mix-hint {
    display: block;
    margin-top: 0.18rem;
    color: var(--color-muted);
}

.variant-dialog {
    overflow: visible;
}

.variant-card,
.sales-history-card,
.sale-detail-card,
.launchpad-modal-card,
.payment-dialog-card {
    width: 100%;
    max-width: 100%;
}

.sales-table-wrapper,
.inventory-table-scroll,
.table-wrapper {
    max-width: 100%;
}

.sales-history-table {
    min-width: 740px;
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .pos-layout {
        grid-template-columns: minmax(0, 1.58fr) minmax(320px, 0.92fr);
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(142px, 142px));
    }
}

@media (min-width: 1025px) and (max-height: 820px) {
    html {
        font-size: 12px;
    }

    .sidebar {
        padding: 0.9rem 0.82rem;
    }

    .app-content {
        padding: 0.8rem 0.9rem 0.9rem;
    }

    .page-header {
        margin-bottom: 0.8rem;
    }

    .page-header h1 {
        font-size: clamp(1.55rem, 1.8vw, 2.2rem);
    }

    .pos-shell {
        gap: 0.75rem;
        min-height: calc(100vh - 84px);
    }

    .pos-header {
        gap: 0.7rem;
    }

    .pos-layout {
        grid-template-columns: minmax(0, 1.6fr) minmax(330px, 0.88fr);
        gap: 0.75rem;
    }

    .pos-products,
    .pos-cart {
        max-height: calc(100vh - 96px);
        padding: 0.82rem;
    }

    .pos-toolbar {
        gap: 0.75rem;
    }

    .chip-row {
        gap: 0.55rem;
        margin: 0.65rem 0;
    }

    .chip {
        padding: 0.5rem 0.8rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(136px, 136px));
        gap: 0.72rem;
    }

    .product-card {
        gap: 0.38rem;
        padding: 0.78rem;
        border-radius: 18px;
    }

    .product-thumb {
        border-radius: 16px;
        font-size: 1.8rem;
    }

    .product-card strong {
        font-size: 0.9rem;
    }

    .cart-items {
        gap: 0.65rem;
        margin: 0.65rem 0;
    }

    .cart-item {
        padding: 0.7rem;
        border-radius: 15px;
    }

    .totals-box,
    .payment-box {
        gap: 0.65rem;
        margin-bottom: 0.72rem;
        padding: 0.82rem;
        border-radius: 16px;
    }

    .grand-total strong {
        font-size: 1.35rem;
    }

    .cart-footer-actions {
        gap: 0.65rem;
    }

    .variant-card {
        max-height: min(90vh, 720px);
        padding: 1rem;
        border-radius: 24px;
    }

    #launchpadDialog.variant-dialog,
    #salesHistoryDialog.variant-dialog,
    #saleDetailDialog.variant-dialog,
    #paymentDialog.variant-dialog {
        width: min(98vw, 920px);
    }
}

@media (max-width: 900px) {
    .sales-history-table,
    .inventory-panel .table-wrapper table {
        min-width: 680px;
    }

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

@media (max-width: 720px) {
    .cart-footer-actions {
        grid-template-columns: 1fr;
    }

    .variant-card {
        padding: 0.95rem;
        border-radius: 22px;
    }

    .sales-history-table,
    .inventory-panel .table-wrapper table {
        min-width: 620px;
    }

    .sale-detail-grid {
        grid-template-columns: 1fr;
    }
}
