main > .container {
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.form-group {
    margin-bottom: 1rem;
}

/* =========================================================
   POS DESIGN SYSTEM
   ========================================================= */
:root {
    /* Colors */
    --pos-primary: #2563eb;
    --pos-primary-dark: #1d4ed8;
    --pos-primary-soft: #eff6ff;
    --pos-secondary: #0f172a;
    --pos-accent: #f59e0b;
    --pos-bg: #f4f6f9;
    --pos-surface: #ffffff;
    --pos-border: #e5e9f0;
    --pos-text: #1e293b;
    --pos-text-muted: #64748b;
    --pos-success: #16a34a;
    --pos-warning: #d97706;
    --pos-danger: #dc2626;
    --pos-info: #0891b2;

    /* Shape & depth */
    --pos-radius: 14px;
    --pos-radius-sm: 9px;
    --pos-shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --pos-shadow-md: 0 6px 18px rgba(15, 23, 42, .08);
    --pos-shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);

    /* Type */
    --pos-font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

.pos-body {
    background: var(--pos-bg);
    color: var(--pos-text);
    font-family: var(--pos-font);
    -webkit-font-smoothing: antialiased;
}

.pos-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 1rem 5rem;
}
@media (min-width: 768px) { .pos-main { padding: 1.75rem 1.5rem 4rem; } }

/* ---------- Navbar ---------- */
.pos-navbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pos-border);
    padding-block: .65rem;
}
.pos-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--pos-secondary);
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.pos-brand:hover { color: var(--pos-secondary); }
.pos-brand-mark {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--pos-primary);
    color: #fff;
    border-radius: 10px;
    font-size: 1rem;
}
.pos-icon-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--pos-border) !important;
    border-radius: 12px;
    background: var(--pos-surface);
    color: var(--pos-text) !important;
    transition: background .15s ease, border-color .15s ease;
}
.pos-icon-btn:hover { background: var(--pos-primary-soft); border-color: var(--pos-primary) !important; }

.pos-badge {
    position: absolute;
    top: -6px; right: -6px;
    min-width: 20px; height: 20px;
    padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--pos-danger);
    color: #fff;
    font-size: .68rem; font-weight: 700;
    border-radius: 999px;
    border: 2px solid #fff;
    opacity: 0; transform: scale(.5);
    transition: opacity .18s ease, transform .18s ease;
}
.pos-badge--active { opacity: 1; transform: scale(1); }

/* ---------- Product cards ---------- */
.pos-product-card {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.pos-product-card:hover {
    box-shadow: var(--pos-shadow-md);
    transform: translateY(-3px);
    border-color: #cbd5e1;
}
.pos-product-img-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #eef1f4;
    overflow: hidden;
}
.pos-product-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.pos-product-card:hover .pos-product-img-wrap img { transform: scale(1.04); }
.pos-stock-pill {
    position: absolute;
    top: 10px; left: 10px;
    font-size: .68rem; font-weight: 700;
    padding: .28rem .6rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}
.pos-stock-pill--in  { background: rgba(22, 163, 74, .12); color: var(--pos-success); }
.pos-stock-pill--out { background: rgba(220, 38, 38, .12); color: var(--pos-danger); }

.pos-product-body {
    padding: .9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1;
}
.pos-product-name {
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.35;
    color: var(--pos-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
a.pos-product-name { text-decoration: none; }
a.pos-product-name:hover { color: var(--pos-primary); }
.pos-product-price {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--pos-primary);
    letter-spacing: -.01em;
}
.pos-product-actions {
    display: flex;
    gap: .5rem;
    margin-top: auto;
    padding-top: .35rem;
}

/* ---------- Buttons ---------- */
.btn-primary {
    --bs-btn-bg: var(--pos-primary);
    --bs-btn-border-color: var(--pos-primary);
    --bs-btn-hover-bg: var(--pos-primary-dark);
    --bs-btn-hover-border-color: var(--pos-primary-dark);
    --bs-btn-active-bg: var(--pos-primary-dark);
    --bs-btn-active-border-color: var(--pos-primary-dark);
    font-weight: 600;
    border-radius: var(--pos-radius-sm);
}
.btn { border-radius: var(--pos-radius-sm); }
.pos-btn-add {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    min-height: 40px;
    font-weight: 600;
    font-size: .85rem;
}
.pos-btn-view {
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius-sm);
    color: var(--pos-text-muted);
    background: var(--pos-surface);
    transition: all .15s ease;
}
.pos-btn-view:hover { border-color: var(--pos-primary); color: var(--pos-primary); background: var(--pos-primary-soft); }

/* ---------- Skeleton loaders ---------- */
.pos-skeleton-card {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    overflow: hidden;
}
.pos-skeleton {
    position: relative;
    overflow: hidden;
    background: #e8ecf1;
}
.pos-skeleton::after {
    content: '';
    position: absolute; inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
    animation: pos-shimmer 1.4s infinite;
}
@keyframes pos-shimmer { 100% { transform: translateX(100%); } }

/* ---------- Filters panel ---------- */
.pos-filters {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow-sm);
    padding: 1.25rem;
    position: sticky;
    top: 84px;
}
.pos-filters h6 { font-weight: 700; }
.pos-filters .form-label { font-size: .8rem; font-weight: 600; color: var(--pos-text-muted); }
.pos-filters .form-control, .pos-filters .form-select {
    border-radius: var(--pos-radius-sm);
    border-color: var(--pos-border);
    font-size: .9rem;
}
.pos-filters .form-control:focus, .pos-filters .form-select:focus {
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}

/* ---------- Search bar ---------- */
.pos-search .form-control {
    border-radius: var(--pos-radius-sm) 0 0 var(--pos-radius-sm);
    border-color: var(--pos-border);
    padding-block: .6rem;
}
.pos-search .form-control:focus { border-color: var(--pos-primary); box-shadow: none; }
.pos-search .btn { border-radius: 0 var(--pos-radius-sm) var(--pos-radius-sm) 0; }

/* ---------- Pagination ---------- */
.pagination { --bs-pagination-border-radius: var(--pos-radius-sm); }
.pagination .page-link { color: var(--pos-text); border-color: var(--pos-border); font-weight: 500; }
.pagination .page-item.active .page-link {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
}

/* ---------- Cart sidebar ---------- */
.pos-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 1040;
}
.pos-overlay.active { display: block; }
.pos-cart-sidebar {
    position: fixed;
    top: 0; right: -420px;
    width: 400px; max-width: 100vw;
    height: 100dvh;
    background: var(--pos-surface);
    box-shadow: var(--pos-shadow-lg);
    transition: right .28s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}
.pos-cart-sidebar.open { right: 0; }
.pos-cart-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--pos-border);
}
.pos-cart-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.pos-cart-footer {
    padding: 1.1rem 1.25rem;
    border-top: 1px solid var(--pos-border);
    background: #fbfcfe;
}
.pos-btn-checkout { border-radius: var(--pos-radius-sm); }

.pos-cart-item {
    display: flex; gap: .75rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--pos-border);
}
.pos-cart-item:last-child { border-bottom: 0; }
.pos-cart-item-img {
    width: 58px; height: 58px;
    object-fit: cover;
    border-radius: var(--pos-radius-sm);
    background: #eef1f4;
    flex-shrink: 0;
}
.pos-cart-item-info { flex: 1; min-width: 0; }
.pos-cart-item-name {
    font-size: .86rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pos-cart-item-price { font-size: .78rem; color: var(--pos-text-muted); }
.pos-cart-total { font-size: 1.15rem; }

.pos-qty-stepper {
    display: inline-flex; align-items: center;
    border: 1px solid var(--pos-border);
    border-radius: 999px;
    overflow: hidden;
}
.pos-qty-btn {
    width: 30px; height: 30px;
    border: 0; background: transparent;
    font-weight: 700; font-size: .95rem;
    color: var(--pos-text);
    display: inline-flex; align-items: center; justify-content: center;
}
.pos-qty-btn:hover { background: var(--pos-primary-soft); color: var(--pos-primary); }
.pos-qty-value {
    min-width: 30px; text-align: center;
    font-weight: 700; font-size: .85rem;
}
.pos-remove-btn {
    color: var(--pos-danger);
    padding: .15rem .4rem;
}
.pos-remove-btn:hover { background: rgba(220, 38, 38, .1); color: var(--pos-danger); }

/* ---------- Mobile sticky cart bar ---------- */
.pos-mobile-cartbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1030;
    padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--pos-border);
}
.pos-mobile-cartbar-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--pos-primary);
    color: #fff;
    border: 0;
    border-radius: var(--pos-radius-sm);
    padding: .85rem 1.1rem;
    font-size: .95rem;
}
.pos-mobile-cartbar-btn:active { background: var(--pos-primary-dark); }
.pos-has-mobile-bar .pos-main { padding-bottom: 6.5rem; }
@media (min-width: 768px) { .pos-mobile-cartbar { display: none; } }

/* ---------- Toasts ---------- */
.pos-toast { border-radius: var(--pos-radius-sm); color: #fff; box-shadow: var(--pos-shadow-md); }
.pos-toast--success { background: var(--pos-success); }
.pos-toast--error   { background: var(--pos-danger); }
.pos-toast--info    { background: var(--pos-info); }
.pos-toast .btn-close { filter: brightness(0) invert(1); }

/* ---------- Hero (store header) ---------- */
.pos-hero {
    background: linear-gradient(135deg, var(--pos-secondary) 0%, #1e3a8a 100%);
    color: #fff;
    border-radius: var(--pos-radius);
    padding: 2.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.pos-hero h1 { font-weight: 800; letter-spacing: -.02em; font-size: 1.6rem; }
.pos-hero p { color: rgba(255,255,255,.75); margin-bottom: 0; max-width: 560px; }
@media (min-width: 768px) { .pos-hero { padding: 3rem 2.5rem; } .pos-hero h1 { font-size: 2.1rem; } }

/* ---------- Product detail page ---------- */
.pos-detail-card {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow-sm);
    overflow: hidden;
}
.pos-detail-img-main {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: #eef1f4;
}
.pos-thumb {
    width: 68px; height: 68px;
    object-fit: cover;
    border-radius: var(--pos-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .75;
    transition: all .15s ease;
}
.pos-thumb:hover, .pos-thumb.active { border-color: var(--pos-primary); opacity: 1; }
.pos-meta-chip {
    display: inline-block;
    font-size: .74rem; font-weight: 600;
    padding: .3rem .7rem;
    border-radius: 999px;
    background: var(--pos-primary-soft);
    color: var(--pos-primary);
}

/* ---------- Checkout ---------- */
.pos-checkout-card {
    background: var(--pos-surface);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow-sm);
}
.pos-checkout-card .form-control {
    border-radius: var(--pos-radius-sm);
    border-color: var(--pos-border);
    padding-block: .65rem;
}
.pos-checkout-card .form-control:focus { border-color: var(--pos-primary); box-shadow: 0 0 0 .2rem rgba(37,99,235,.12); }
.pos-checkout-summary-item {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .55rem 0;
    border-bottom: 1px dashed var(--pos-border);
    font-size: .9rem;
}
.pos-checkout-summary-item:last-child { border-bottom: 0; }
.pos-step-dot {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--pos-primary-soft); color: var(--pos-primary);
    border-radius: 50%; font-size: .78rem; font-weight: 700;
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--pos-primary);
    outline-offset: 2px;
}

/* ---------- Responsive grid tuning ---------- */
@media (max-width: 575px) {
    .pos-product-name { font-size: .88rem; }
    .pos-cart-sidebar { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Footer */
.pos-footer {
    background: #fff;
    border-top: 1px solid var(--pos-border);
    padding: 2.5rem 0 1.5rem;
    margin-top: 2.5rem;
}
.pos-footer h5 {
    font-weight: 700;
    font-size: 1rem;
}
.pos-footer a {
    text-decoration: none;
    color: var(--pos-text-muted);
}
.pos-footer a:hover { color: var(--pos-primary); }
.pos-footer address { margin-bottom: 0; }

