:root {
    --pos-ink: #0f172a;
    --pos-slate: #475569;
    --pos-line: #dbe4f0;
    --pos-accent: #1c00ff;
    --pos-accent-soft: #e7e3ff;
    --pos-alert: #ff1900;
    --pos-alert-soft: #ffe4df;
    --pos-surface: #f5f7fb;
    --pos-surface-2: #ffffff;
}

html {
    font-size: clamp(14px, 0.18vw + 13.5px, 16px);
}

body {
    font-size: 1rem;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 26%, #f8fafc 100%);
}

.hero-card {
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(255, 25, 0, 0.16), transparent 36%),
        linear-gradient(135deg, #1c00ff 0%, #1736b9 55%, #102546 100%);
    border-radius: 1rem;
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.5rem;
}

.eyebrow {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-title {
    color: #fff;
    font-size: clamp(1.5rem, 2vw, 2.25rem);
    line-height: 1.1;
}

.hero-copy {
    color: rgba(255, 255, 255, 0.82);
    max-width: 58ch;
}

.hero-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    text-align: center;
}

.hero-badge-accent {
    background: rgba(255, 25, 0, 0.18);
}

.metric-card {
    background: var(--pos-surface-2);
    border: 1px solid var(--pos-line);
    border-radius: 0.9rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 100%;
    padding: 1.15rem;
}

.metric-card.compact {
    min-height: 0;
}

.metric-label {
    color: var(--pos-slate);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    color: var(--pos-ink);
    font-size: 1.8rem;
    line-height: 1.1;
}

.metric-foot {
    color: #64748b;
    font-size: 0.85rem;
}

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

.activity-item {
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 0.8rem;
    padding: 0.85rem 0.95rem;
}

.activity-item strong {
    color: var(--pos-ink);
    display: block;
}

.branch-scope-control {
    min-width: 220px;
}

.pos-browser-card .card-body {
    display: grid;
    gap: 1rem;
}

.pos-live-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.pos-touch-control,
.pos-touch-action {
    min-height: 3.25rem;
}

#view-pos .form-control,
#view-pos .form-select {
    font-size: 1rem;
}

.pos-category-scroller {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.pos-category-chip {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 999px;
    color: var(--pos-ink);
    display: inline-flex;
    font-weight: 600;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.pos-category-chip.active {
    background: var(--pos-accent);
    border-color: var(--pos-accent);
    color: #fff;
}

.pos-products-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.pos-product-card {
    appearance: none;
    background: var(--pos-surface-2);
    border: 1px solid var(--pos-line);
    border-radius: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    color: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font: inherit;
    gap: 0.9rem;
    min-height: 240px;
    overflow: hidden;
    padding: 0.9rem;
    position: relative;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    width: 100%;
}

.pos-product-card:hover,
.pos-product-card:focus {
    box-shadow: 0 14px 30px rgba(28, 0, 255, 0.14);
    transform: translateY(-2px);
}

.pos-product-card:disabled {
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.pos-grid-empty {
    grid-column: 1 / -1;
}

.pos-product-thumb {
    align-items: center;
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
    border-radius: 0.85rem;
    display: flex;
    height: 120px;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.pos-product-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.pos-product-meta {
    display: grid;
    gap: 0.25rem;
}

.pos-product-name {
    color: var(--pos-ink);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.pos-product-sku,
.pos-product-category,
.pos-product-stock {
    color: #64748b;
    font-size: 0.82rem;
}

.pos-product-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.pos-product-price {
    color: var(--pos-accent);
    font-size: 1.05rem;
    font-weight: 700;
}

.cart-list {
    display: grid;
    gap: 0.8rem;
    max-height: 360px;
    overflow-y: auto;
}

.cart-empty {
    background: #f8fafc;
    border: 1px dashed var(--pos-line);
    border-radius: 0.9rem;
    color: #64748b;
    padding: 1rem;
    text-align: center;
}

.cart-item-card {
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 0.9rem;
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
}

.cart-item-head {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.cart-item-title {
    color: var(--pos-ink);
    font-weight: 700;
}

.cart-item-meta {
    color: #64748b;
    font-size: 0.82rem;
}

.cart-item-stepper {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.cart-item-stepper button {
    min-height: 2.85rem;
    min-width: 2.85rem;
}

.cart-item-qty {
    align-items: center;
    background: #fff;
    border: 1px solid var(--pos-line);
    border-radius: 0.75rem;
    color: var(--pos-ink);
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 2.85rem;
    min-width: 4.25rem;
}

.cart-item-actions {
    display: flex;
    gap: 0.6rem;
}

.totals-line-foreign {
    font-weight: 700;
}

.pos-currency-panel {
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 0.85rem;
    padding: 1rem;
}

.pos-tender-summary {
    color: var(--pos-accent);
    font-size: 1.15rem;
    font-weight: 700;
}

.cart-card {
    position: sticky;
    top: 1rem;
}

.totals-panel {
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 0.85rem;
    margin-top: 1rem;
    padding: 1rem;
}

.totals-line {
    color: var(--pos-slate);
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.totals-line:last-child {
    margin-bottom: 0;
}

.totals-line-grand {
    color: var(--pos-ink);
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 0.65rem;
    border-top: 1px solid var(--pos-line);
}

.ticket-preview {
    display: grid;
    gap: 0.75rem;
}

.ticket-summary {
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 0.85rem;
    padding: 1rem;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.65rem;
    text-transform: uppercase;
}

.status-pill.completed,
.status-pill.active,
.status-pill.ok {
    background: var(--pos-accent-soft);
    color: var(--pos-accent);
}

.status-pill.voided,
.status-pill.low,
.status-pill.inactive {
    background: var(--pos-alert-soft);
    color: var(--pos-alert);
}

.status-pill.in_store,
.status-pill.in_use {
    background: #dcfce7;
    color: #166534;
}

.status-pill.under_repair {
    background: #fef3c7;
    color: #92400e;
}

.status-pill.retired {
    background: #e2e8f0;
    color: #334155;
}

.brand-stack {
    align-items: center;
    display: inline-flex;
    gap: 0.9rem;
}

.brand-mark {
    background:
        linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
    border-radius: 1rem;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.25);
    display: inline-block;
    height: 2.75rem;
    position: relative;
    width: 2.75rem;
}

.brand-mark::before,
.brand-mark::after {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    content: "";
    position: absolute;
}

.brand-mark::before {
    height: 0.45rem;
    left: 0.7rem;
    top: 0.75rem;
    width: 1.35rem;
}

.brand-mark::after {
    height: 0.45rem;
    left: 1.05rem;
    top: 1.5rem;
    width: 0.95rem;
}

.product-admin-preview {
    align-items: center;
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
    border: 1px dashed var(--pos-line);
    border-radius: 0.9rem;
    color: #64748b;
    display: flex;
    height: 150px;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.product-admin-preview img {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.product-list-thumb {
    border-radius: 0.75rem;
    display: block;
    height: 48px;
    object-fit: cover;
    object-position: center;
    width: 48px;
}

.flag-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 0.35rem;
    padding: 0.18rem 0.6rem;
}

.flag-pill.base {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.flag-pill.inactive {
    background: var(--pos-alert-soft);
    color: var(--pos-alert);
}

.form-edit-focus {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18), 0 18px 42px rgba(15, 23, 42, 0.12) !important;
    transition: box-shadow 0.24s ease;
}

.report-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.report-export-note {
    color: #64748b;
    font-size: 0.86rem;
}

.pos-quick-add-modal {
    align-items: center;
    background: rgba(15, 23, 42, 0.56);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 1100;
}

.pos-quick-add-dialog {
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    max-width: 760px;
    padding: 1.25rem;
    position: relative;
    width: 100%;
}

.pos-quick-add-close {
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 2rem;
    line-height: 1;
    position: absolute;
    right: 1rem;
    top: 0.55rem;
}

.pos-quick-add-layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(220px, 260px) 1fr;
}

.pos-quick-add-media {
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
    border-radius: 1rem;
    min-height: 260px;
    overflow: hidden;
}

.pos-quick-add-media img {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.pos-quick-add-stats {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.pos-stat-card {
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 0.9rem;
    display: grid;
    gap: 0.15rem;
    padding: 0.9rem;
}

.pos-stat-card span {
    color: #64748b;
    font-size: 0.82rem;
}

.pos-stat-card strong {
    color: var(--pos-ink);
    font-size: 1.1rem;
}

.pos-qty-pad {
    align-items: center;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: 1fr minmax(130px, 1.1fr) 1fr;
}

.pos-qty-btn {
    font-size: 1.25rem;
    min-height: 4rem;
}

.pos-qty-display {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 1rem;
    color: var(--pos-ink);
    display: flex;
    font-size: 2rem;
    font-weight: 700;
    justify-content: center;
    min-height: 4rem;
}

.pos-qty-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.login-shell {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.16), transparent 28%),
        #eef2ff;
}

.brand-stack--demo {
    align-items: center;
    display: inline-flex;
    gap: 0.9rem;
}

.brand-logo-badge {
    background: linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
    border-radius: 1rem;
    height: 3.4rem;
    object-fit: contain;
    padding: 0.45rem;
    width: 3.4rem;
}

.demo-login-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--pos-line);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    padding: 1rem;
}

.demo-login-panel__header {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.demo-login-panel__header img {
    background: linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
    border-radius: 0.9rem;
    height: 3rem;
    object-fit: contain;
    padding: 0.35rem;
    width: 3rem;
}

.demo-login-panel__header strong {
    color: var(--pos-ink);
    display: block;
}

.demo-login-panel__header span {
    color: #64748b;
    font-size: 0.84rem;
}

.demo-login-credentials {
    display: grid;
    gap: 0.7rem;
}

.demo-credential-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--pos-line);
    border-radius: 0.85rem;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
}

.demo-credential-row strong {
    color: var(--pos-ink);
}

.demo-credential-row span {
    color: #475569;
    font-size: 0.88rem;
    text-align: right;
}

.table td,
.table th {
    vertical-align: middle;
}

.btn[data-view-sale],
.btn[data-void-sale],
.btn[data-edit-product],
.btn[data-edit-branch],
.btn[data-edit-terminal],
.btn[data-edit-user],
.btn[data-add-product] {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .hero-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-badges {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cart-card {
        position: static;
    }

    .pos-quick-add-layout {
        grid-template-columns: 1fr;
    }

    .report-action-bar {
        width: 100%;
    }

    .demo-credential-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .demo-credential-row span {
        text-align: left;
    }
}
