/* ============================================================
   POS System Styles
   ============================================================ */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 64px;
    --topbar-height: 56px;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-sidebar-hover: #334155;
    --bg-sidebar-active: #4f46e5;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #ffffff;
    --border-color: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: #334155;
    overflow: hidden;
    height: 100vh;
}

/* ---- Login Page ---- */
.login-page {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: auto;
    padding: 20px;
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 950px;
    min-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.login-left {
    flex: 1;
    background: linear-gradient(160deg, #1e293b 0%, #334155 50%, #475569 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    text-align: center;
}

.login-left .login-brand-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.login-left .login-store-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-left .login-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 36px;
}

.login-left .login-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    width: 100%;
    max-width: 240px;
}

.login-left .login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.login-left .login-features li:last-child {
    border-bottom: none;
}

.login-left .login-features li i {
    font-size: 18px;
    color: #60a5fa;
    width: 24px;
    text-align: center;
}

.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 48px;
}

.login-right .login-welcome {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.login-right .login-tagline {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 32px;
}

.login-right .login-form .form-label {
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.login-right .login-form .input-group {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s;
}

.login-right .login-form .input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.login-right .login-form .input-group-text {
    background: #f8fafc;
    border: none;
    color: #94a3b8;
    font-size: 16px;
}

.login-right .login-form .form-control {
    border: none;
    font-size: 15px;
    padding: 12px 14px;
    background: transparent;
}

.login-right .login-form .form-control:focus {
    box-shadow: none;
}

.password-toggle {
    background: #f8fafc;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 0 14px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #475569;
}

.login-right .btn-login {
    background: var(--primary);
    border: none;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    margin-top: 8px;
    transition: background 0.2s, transform 0.1s;
}

.login-right .btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-right .btn-login:active {
    transform: translateY(0);
}

.login-footer-text {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
    }
    .login-left {
        padding: 32px 24px;
    }
    .login-left .login-brand-icon {
        font-size: 48px;
    }
    .login-left .login-store-name {
        font-size: 22px;
    }
    .login-left .login-features {
        display: none;
    }
    .login-right {
        padding: 32px 28px;
    }
}

/* ---- App Layout ---- */
.app-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
    white-space: nowrap;
}

.sidebar-brand i { font-size: 24px; }

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.sidebar-menu::-webkit-scrollbar { width: 0; }
.sidebar-menu.scrolling { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.35) transparent; }
.sidebar-menu.scrolling::-webkit-scrollbar { width: 5px; }
.sidebar-menu.scrolling::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu.scrolling::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.35);
    border-radius: 10px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.sidebar-section-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.35);
    padding: 16px 16px 4px;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.sidebar-nav .nav-item { margin: 2px 8px; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-sidebar);
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
    font-size: 14px;
}

.sidebar-nav .nav-link i { font-size: 18px; width: 20px; text-align: center; }

.sidebar-nav .nav-link:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-sidebar-active);
    font-weight: 600;
}

.sidebar-footer {
    padding: 14px;
    margin-top: auto;
    background: rgba(0, 0, 0, .15);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    margin-bottom: 10px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sidebar-user-role {
    font-size: 11px;
    color: #94a3b8;
    text-transform: capitalize;
}

.sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: rgba(239, 68, 68, .1);
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, .25);
    color: #fff;
}

/* ---- Sidebar Collapsed State ---- */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-nav .nav-link span,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-logout-btn span {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 16px 0;
}

.sidebar.collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 10px;
    gap: 0;
}

.sidebar.collapsed .sidebar-nav .nav-item {
    margin: 2px 6px;
}

.sidebar.collapsed .sidebar-footer {
    padding: 10px 8px;
}

.sidebar.collapsed .sidebar-profile {
    justify-content: center;
    padding: 10px 0;
    margin-bottom: 8px;
}

.sidebar.collapsed .sidebar-logout-btn {
    padding: 8px;
}

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ---- Topbar ---- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    z-index: 50;
}

.sidebar-toggle {
    font-size: 24px;
    color: #475569;
    text-decoration: none;
    border: none;
    padding: 4px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.topbar-user i { font-size: 20px; color: #94a3b8; }

.role-badge { font-size: 11px; vertical-align: middle; }

/* ---- Notification Bell ---- */
.notification-wrapper { position: relative; }
.notification-bell {
    background: none; border: none; position: relative;
    font-size: 20px; color: #64748b; cursor: pointer;
    padding: 6px 8px; border-radius: 8px; transition: all 0.2s;
    line-height: 1;
}
.notification-bell:hover { background: #f1f5f9; color: #334155; }
.notification-badge {
    position: absolute; top: 0; right: 0;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: #ef4444; color: #fff; font-size: 11px; font-weight: 700;
    border-radius: 9px; display: flex; align-items: center; justify-content: center;
    line-height: 1; border: 2px solid #fff;
}
@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-12deg); }
    45% { transform: rotate(10deg); }
    60% { transform: rotate(-8deg); }
    75% { transform: rotate(4deg); }
    90% { transform: rotate(-2deg); }
}
.notification-bell.has-unread { animation: shake 0.6s ease-in-out 3; color: #ef4444; }

/* ---- Notification Dropdown ---- */
.notification-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    width: 370px; max-height: 440px; background: #fff;
    border: 1px solid var(--border-color); border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.06);
    z-index: 1050; overflow: hidden;
}
.notification-dropdown.show { display: block; }
.notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid var(--border-color);
}
.notif-header h6 { font-weight: 700; font-size: 14px; color: #1e293b; }
.notif-body { max-height: 380px; overflow-y: auto; }
.notif-empty { padding: 32px 16px; text-align: center; color: #94a3b8; font-size: 13px; }
.notif-section-title {
    padding: 10px 16px 6px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px; color: #94a3b8;
    display: flex; align-items: center; gap: 6px;
}
.notif-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 16px; cursor: pointer; transition: background 0.15s;
    border-bottom: 1px solid #f1f5f9;
}
.notif-item:hover { background: #f8fafc; }
.notif-item:last-child { border-bottom: none; }
.notif-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 14px;
}
.notif-icon.restock { background: #fef3c7; color: #d97706; }
.notif-icon.expiry { background: #fee2e2; color: #dc2626; }
.notif-icon.expired { background: #dc2626; color: #fff; }
.notif-text { flex: 1; min-width: 0; }
.notif-text .notif-title { font-size: 13px; font-weight: 600; color: #1e293b; display: block; }
.notif-text .notif-detail { font-size: 12px; color: #64748b; display: block; margin-top: 1px; }
.notif-text .notif-detail strong { color: #334155; }

/* ---- Content Area ---- */
.content-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.mirror-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 10px 20px;
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
}

.mirror-banner-text {
    flex: 1;
}

.mirror-banner-close {
    border: 0;
    background: transparent;
    color: inherit;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    opacity: .8;
    flex-shrink: 0;
}

.mirror-banner-close:hover {
    background: rgba(29, 78, 216, .12);
    opacity: 1;
}

.mirror-banner.is-hiding {
    opacity: 0;
    transition: opacity .3s ease;
}

/* ============================================================
   Cloud mirror mode — monitoring only
   Hide every control that would modify data. Read-only
   controls (search, filters, pagination, print) stay visible.
   ============================================================ */
body.mirror-mode #btnAddProduct,
body.mirror-mode #btnAddCategory,
body.mirror-mode #btnAddDiscount,
body.mirror-mode #btnAddEmployee,
body.mirror-mode #btnAddSalaryType,
body.mirror-mode #btnAddUser,
body.mirror-mode #btnAddRetail,
body.mirror-mode #btnCheckout,
body.mirror-mode #btnClearCart,
body.mirror-mode #btnSaveProduct,
body.mirror-mode #btnSaveCategory,
body.mirror-mode #btnSaveStock,
body.mirror-mode #btnSaveUser,
body.mirror-mode #btnSaveDiscount,
body.mirror-mode #btnSaveEmployee,
body.mirror-mode #btnSaveSalaryType,
body.mirror-mode #btnConfirmWriteOff,
body.mirror-mode #btnConfirmReturn,
body.mirror-mode #btnSaveDailyTarget,
body.mirror-mode #btnSaveMonthlyTarget,
body.mirror-mode #btnEditDailyTarget,
body.mirror-mode #btnEditMonthlyTarget,
body.mirror-mode #btnAllPresent,
body.mirror-mode #btnSaveAttendance,
body.mirror-mode #btnCalculatePayroll,
body.mirror-mode #btnGenerateAllPayroll,
body.mirror-mode #btnSyncNow,
body.mirror-mode .btn-edit-product,
body.mirror-mode .btn-delete-product,
body.mirror-mode .btn-edit-category,
body.mirror-mode .btn-delete-category,
body.mirror-mode .btn-adjust-stock,
body.mirror-mode .btn-write-off,
body.mirror-mode .undo-writeoff-btn,
body.mirror-mode .btn-void-sale,
body.mirror-mode .btn-return-exchange,
body.mirror-mode .btn-edit-discount,
body.mirror-mode .btn-delete-discount,
body.mirror-mode .btn-toggle-discount,
body.mirror-mode .btn-edit-employee,
body.mirror-mode .btn-delete-employee,
body.mirror-mode .btn-edit-user,
body.mirror-mode .btn-delete-user,
body.mirror-mode .btn-edit-salary-type,
body.mirror-mode .btn-delete-salary-type,
body.mirror-mode .btn-toggle-st,
body.mirror-mode .btn-gen-single,
body.mirror-mode .att-btn {
    display: none !important;
}

body.mirror-mode #settingsForm {
    display: none !important;
}

/* ---- Cards ---- */
.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform .2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.target-progress { margin-top: 4px; }
.target-progress .progress {
    background: #e2e8f0;
    border-radius: 3px;
}
.target-progress .progress-bar {
    border-radius: 3px;
    transition: width .6s ease;
}

.target-edit .input-group-sm .form-control {
    font-size: 13px;
}
.target-edit .input-group-sm .btn {
    padding: 4px 8px;
}

/* ---- Employee Payroll Cards ---- */
#payrollReport .card h5 { font-size: 18px; }

/* ---- Attendance Toggle Buttons ---- */
.attendance-toggles { display: flex; gap: 4px; justify-content: center; }
.attendance-toggles .att-btn { font-size: 11px; padding: 3px 10px; border-radius: 6px; }
.attendance-toggles .att-btn.btn-outline-secondary { background: #fff; color: #94a3b8; border-color: #e2e8f0; }

/* ---- Tables ---- */
.table-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.table-card .table-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.table-card .table-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    color: #1e293b;
}

.table-responsive {
    overflow-x: auto;
    flex: 1;
    overflow-y: auto;
}

.table { margin: 0; }

.table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover { background: #f8fafc; }

/* ---- POS Screen ---- */
/* ---- POS 3-Column Layout ---- */
.pos-layout-3col {
    display: grid;
    grid-template-columns: 1fr 340px 320px;
    grid-template-rows: 1fr;
    gap: 16px;
    height: calc(100vh - var(--topbar-height) - 48px);
}

.pos-col-products,
.pos-col-cart,
.pos-col-checkout {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 0;
}

.pos-col-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.pos-col-header h6 {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.pos-search {
    padding: 10px 12px;
    flex-shrink: 0;
}

/* Category dropdown matches the search input height */
.pos-search #posCategoryFilter .dropdown-toggle {
    height: 44px;
    padding: 0 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    transition: all .25s ease;
}
.pos-search #posCategoryFilter .dropdown-toggle:hover,
.pos-search #posCategoryFilter .dropdown-toggle:focus,
.pos-search #posCategoryFilter .dropdown-toggle.show {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79,70,229,.1), 0 2px 8px rgba(0,0,0,.06);
}
.pos-search #posCategoryFilter .dropdown-menu {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px rgba(15,23,42,.12);
}

.pos-products-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    grid-auto-rows: min-content;
    gap: 10px;
    padding: 10px 12px;
    min-height: 0;
    align-content: start;
}

/* Product Cards */
.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    align-self: start;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
    transform: translateY(-2px);
}

.product-card .product-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-category {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.product-card .product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.product-card .product-stock {
    font-size: 11px;
    color: #64748b;
}

.product-card .product-stock.out-of-stock {
    color: var(--danger);
    font-weight: 600;
}

/* Cart Column */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    gap: 8px;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-info .item-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-info .item-price {
    font-size: 11px;
    color: #64748b;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-item-qty .btn {
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 6px;
}

.cart-item-qty span {
    font-weight: 600;
    font-size: 13px;
    min-width: 20px;
    text-align: center;
}

.cart-item-subtotal {
    font-weight: 600;
    font-size: 12px;
    color: #1e293b;
    min-width: 60px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
}

.cart-item-remove:hover { color: var(--danger); }

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.cart-empty i { font-size: 40px; margin-bottom: 8px; }
.cart-empty p { margin: 0; font-size: 13px; }

.cart-totals {
    padding: 12px 14px;
    border-top: 2px solid var(--border-color);
    background: #f8fafc;
    flex-shrink: 0;
}

.cart-totals .total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 13px;
    color: #475569;
}

.cart-totals .total-row.grand-total {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    border-top: 1px solid var(--border-color);
    padding-top: 6px;
    margin-top: 6px;
}

/* Checkout Column */
.checkout-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
}

.checkout-amounts {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 12px;
    color: #fff;
}

.checkout-label {
    font-size: 12px;
    opacity: .8;
    margin-bottom: 4px;
}

.checkout-due {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.5px;
}

.checkout-payment-method { }

.payment-check {
    flex: 1;
    padding-left: 0;
    margin: 0;
    min-width: 0;
}

.payment-check .form-check-label {
    width: 100%;
}

.payment-check .form-check-input:checked + .form-check-label {
    background: var(--primary);
    color: #fff;
}

.payment-check .form-check-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
}

.payment-check .form-check-input { display: none; }

.payment-check .form-check-input:not(:checked) + .form-check-label:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.checkout-bills {}

.checkout-bills .d-flex { gap: 6px; }

.bill-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all .2s;
}

.bill-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.bill-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.bill-btn-exact {
    border-color: #22c55e;
    color: #16a34a;
}

.bill-btn-exact:hover,
.bill-btn-exact.active {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

/* ---- Discount Selector ---- */
.discount-selector .form-select {
    font-size: 13px;
    border-radius: 8px;
}
.discount-selector .input-group-sm .form-control {
    font-size: 13px;
}

.checkout-given {}

.checkout-given .input-group {
    border-radius: 10px;
    overflow: hidden;
}

.checkout-given .input-group-text {
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-right: none;
    font-weight: 600;
    color: #475569;
}

.checkout-given .form-control {
    border: 2px solid #e2e8f0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.checkout-given .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.checkout-change {
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.checkout-change .total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #166534;
    font-weight: 500;
}

.checkout-change .total-row span:last-child {
    font-weight: 700;
    font-size: 16px;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    margin-top: auto;
}

.checkout-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Old layout compat */
.pos-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - var(--topbar-height) - 48px);
}

/* ---- Legacy cart styles kept for receipt modal ---- */

.barcode-text {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    color: #475569;
}

/* ---- Chart Containers ---- */
.chart-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.chart-card h6 {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 16px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

/* ---- Best Selling Table ---- */
.bestseller-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
}

.bestseller-item:last-child { border-bottom: none; }

.bestseller-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #64748b;
    flex-shrink: 0;
}

.bestseller-item:nth-child(1) .bestseller-rank { background: #fef3c7; color: #92400e; }
.bestseller-item:nth-child(2) .bestseller-rank { background: #e2e8f0; color: #475569; }
.bestseller-item:nth-child(3) .bestseller-rank { background: #fed7aa; color: #9a3412; }

.bestseller-info { flex: 1; }
.bestseller-info .name { font-weight: 600; font-size: 13px; color: #1e293b; }
.bestseller-info .qty { font-size: 12px; color: #64748b; }
.bestseller-revenue { font-weight: 600; font-size: 13px; color: var(--primary); }

/* ---- Modals ---- */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

.modal-header .modal-title { font-weight: 600; }

.modal-body { padding: 24px; }

.modal-footer { border-top: 1px solid var(--border-color); }

/* Success/Error Modal */
.result-modal {
    text-align: center;
    padding: 30px;
}

.result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 36px;
}

.result-icon.success { background: #dcfce7; color: var(--success); }
.result-icon.error { background: #fee2e2; color: var(--danger); }
.result-icon.info { background: #dbeafe; color: #1d4ed8; }

.result-modal h5 { font-weight: 600; margin-bottom: 8px; }
.result-modal p { color: #64748b; margin-bottom: 20px; }

/* Confirm Modal */
.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 32px;
}

.confirm-icon.warning { background: #fef3c7; color: var(--warning); }

/* ---- Receipt ---- */
.receipt {
    max-width: 48mm;
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    font-size: 11px;
    line-height: 1.5;
    color: #1e293b;
}

.receipt .receipt-header { text-align: center; margin-bottom: 10px; }
.receipt .receipt-header h6 { font-weight: 700; font-size: 14px; margin: 0 0 2px; }
.receipt .receipt-header p { margin: 1px 0; font-size: 10px; color: #475569; }
.receipt .receipt-divider { border-top: 1px dotted #94a3b8; margin: 8px 0; }
.receipt .receipt-item { display: flex; justify-content: space-between; font-size: 10px; gap: 8px; }
.receipt .receipt-item span:last-child { text-align: right; white-space: nowrap; flex-shrink: 0; }
.receipt .receipt-totals .receipt-row { display: flex; justify-content: space-between; font-size: 11px; }
.receipt .receipt-totals .receipt-row.grand { font-weight: 700; font-size: 13px; border-top: 1px dotted #64748b; padding-top: 6px; margin-top: 6px; }
.receipt .receipt-footer { text-align: center; margin-top: 10px; font-size: 10px; color: #475569; }
.receipt .receipt-txn { font-size: 11px; margin: 3px 0; color: #1e293b; font-weight: 600; }
.receipt .receipt-qr { text-align: center; margin: 10px 0 6px; }
.receipt .receipt-qr .receipt-qr-img { width: 90px; height: 90px; display: block; margin: 0 auto; }
.receipt .receipt-qr .receipt-qr-label { font-size: 8px; color: #94a3b8; margin: 3px 0 0; }

@media print {
    body > *:not(#printOnly):not(#printOnlyReport) { display: none !important; }

    /* Hide empty print containers, show non-empty ones */
    #printOnly:empty, #printOnlyReport:empty { display: none !important; }

    /* ---- Receipt (48mm thermal) ---- */
    #printOnly:not(:empty) {
        display: block !important;
        width: 48mm;
        margin: 0;
        padding: 1.5mm;
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        font-weight: 500;
        font-size: 10px;
        line-height: 1.35;
        color: #000;
        background: #fff;
    }
    #printOnly .receipt { max-width: 100%; margin: 0; }
    #printOnly .receipt .receipt-header h6 { font-size: 13px; }
    #printOnly .receipt .receipt-header p { font-size: 9px; color: #000; }
    #printOnly .receipt .receipt-item { font-size: 9px; }
    #printOnly .receipt .receipt-totals .receipt-row { font-size: 10px; }
    #printOnly .receipt .receipt-totals .receipt-row.grand { font-size: 12px; }
    #printOnly .receipt .receipt-footer p { font-size: 8px; }
    #printOnly .receipt .receipt-txn { font-size: 10px; color: #000; }
    #printOnly .receipt .receipt-qr .receipt-qr-img { width: 80px; height: 80px; }
    #printOnly .receipt .receipt-qr .receipt-qr-label { font-size: 7px; color: #000; }

    /* ---- Report ---- */
    #printOnlyReport:not(:empty) {
        display: block !important;
        width: 100%;
        padding: 0;
        font-size: 12px;
        color: #000;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    #printOnlyReport .report-print-header {
        text-align: center; margin-bottom: 20px; padding-bottom: 12px;
        border-bottom: 3px solid #0d6efd;
    }
    #printOnlyReport .report-print-header h4 { margin: 0; font-size: 20px; font-weight: 700; }
    #printOnlyReport .report-print-header p { margin: 4px 0 0; color: #555; font-size: 12px; }

    #printOnlyReport .report-section {
        margin-bottom: 28px;
        page-break-inside: avoid;
    }
    #printOnlyReport .report-section h5 {
        font-size: 14px; font-weight: 700; margin-bottom: 10px;
        padding-bottom: 5px; border-bottom: 2px solid #0d6efd;
        color: #0d6efd;
    }

    #printOnlyReport .report-kpi {
        border: 1px solid #d1d5db; border-radius: 6px; padding: 10px 8px;
        text-align: center; background: #f9fafb !important;
    }
    #printOnlyReport .report-kpi h3 { margin: 2px 0 0; font-size: 18px; font-weight: 700; }
    #printOnlyReport .report-kpi small { color: #555; font-size: 11px; }

    #printOnlyReport .badge {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    #printOnlyReport table {
        width: 100%; border-collapse: collapse; font-size: 11px;
    }
    #printOnlyReport table thead th {
        background: #f1f5f9 !important;
        border-bottom: 2px solid #334155;
        padding: 6px 8px; font-weight: 700; font-size: 11px;
        color: #334155;
    }
    #printOnlyReport table tbody td {
        border-bottom: 1px solid #e2e8f0;
        padding: 5px 8px; vertical-align: middle;
    }
    #printOnlyReport table tbody tr:last-child td { border-bottom: 2px solid #334155; }

    #printOnlyReport .report-bar-track { height: 8px; background: #e2e8f0 !important; border-radius: 4px; }
    #printOnlyReport .report-bar-fill { height: 100%; background: #0d6efd !important; border-radius: 4px; }

    #printOnlyReport .report-chart-container {
        border: 1px solid #d1d5db; border-radius: 6px; padding: 12px;
        height: auto; page-break-inside: avoid;
    }
    #printOnlyReport .report-chart-container canvas { max-height: 220px; }

    #printOnlyReport .report-table-scroll { max-height: none; overflow: visible; }

    #printOnlyReport .text-success { color: #16a34a !important; }
    #printOnlyReport .text-danger { color: #dc2626 !important; }
    #printOnlyReport .text-warning { color: #d97706 !important; }
    #printOnlyReport .text-primary { color: #0d6efd !important; }
    #printOnlyReport .text-muted { color: #6b7280 !important; }

    #printOnlyReport .row { --bs-gutter-x: 0; --bs-gutter-y: 0; margin-left: 0; margin-right: 0; }
    #printOnlyReport .row > * { padding-left: 4px; padding-right: 4px; }

    /* No @page here — set dynamically per print type */
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 1000; width: var(--sidebar-width); transform: translateX(-100%); transition: transform 0.3s ease, width 0.3s ease; }
    .sidebar.show { transform: translateX(0); }
    .sidebar.collapsed { width: var(--sidebar-width); }
    .pos-layout-3col { grid-template-columns: 1fr; height: auto; }
    .pos-col-products { max-height: 50vh; }
    .pos-col-cart { max-height: 40vh; }
}

@media (max-width: 768px) {
    .content-area { padding: 12px; }
    .pos-products-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

    /* Page headers: stack title controls vertically */
    .page-header {
        margin-bottom: 12px;
        gap: 10px;
    }
    .page-header > div {
        width: 100%;
    }
    .page-header .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .page-header .d-flex > * {
        width: 100% !important;
        max-width: none !important;
    }
    .page-header .modern-search { max-width: none; }
    .page-header .per-page-select {
        width: 100% !important;
    }
    .page-header .btn {
        width: 100%;
    }

    /* Inventory tab toolbars */
    #tab-stock-list > .d-flex,
    #tab-stock-history > .d-flex,
    #tab-defective-items > .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    #tab-stock-list > .d-flex > *,
    #tab-stock-history > .d-flex > *,
    #tab-defective-items > .d-flex > * {
        width: 100% !important;
        max-width: none !important;
    }
    #tab-stock-list .modern-search,
    #tab-stock-history .modern-search,
    #tab-defective-items .modern-search {
        max-width: none;
    }

    /* Tables: wrap headers, smaller padding, bigger touch targets */
    .table thead th {
        white-space: normal;
        font-size: 11px;
        padding: 8px 10px;
    }
    .table tbody td {
        padding: 8px 10px;
        font-size: 13px;
    }
    .table .btn-sm {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* Pagination: more compact */
    .modern-pagination {
        gap: 10px;
    }
    .modern-pagination .page-buttons {
        gap: 2px;
    }
    .modern-pagination .page-btn,
    .modern-pagination .page-dots {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
    .modern-pagination .page-info {
        font-size: 12px;
    }
}

/* ---- POS: tighter columns for laptop screens (≤1400px) ---- */
@media (max-width: 1400px) {
    .pos-layout-3col {
        grid-template-columns: 1fr 280px 260px;
        gap: 12px;
    }
}

/* ---- POS: compact checkout on shorter viewports (≤800px height) ---- */
@media (max-height: 800px) {
    .checkout-body {
        gap: 10px;
        padding: 12px;
    }
    .checkout-due {
        font-size: 26px;
    }
    .checkout-amounts {
        padding: 12px;
    }
    .checkout-bills .bill-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    .checkout-given .form-control {
        font-size: 16px;
    }
    .checkout-btn {
        padding: 10px;
        font-size: 15px;
    }
}

/* ---- POS: smaller product cards on compact screens ---- */
@media (max-width: 1400px) and (max-height: 800px) {
    .product-card {
        min-height: 90px;
        padding: 8px 10px;
    }
    .product-card .product-name {
        font-size: 12px;
    }
    .product-card .product-price {
        font-size: 14px;
    }
    .product-card .product-category {
        font-size: 10px;
    }
}

/* ---- Misc ---- */
.badge-stock-low { background: #fee2e2; color: #dc2626; }
.badge-stock-ok { background: #dcfce7; color: #16a34a; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.page-header h4 { font-weight: 700; color: #1e293b; margin: 0; }

/* ---- Modern Search Bar ---- */
.modern-search {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.modern-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.modern-search .form-control {
    padding: 10px 16px 10px 44px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    transition: all .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    height: 44px;
}

.modern-search .form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.modern-search .form-control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79,70,229,.1), 0 2px 8px rgba(0,0,0,.06);
    outline: none;
}

.page-header .modern-search {
    margin-left: auto;
}

.btn-search-suffix {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    border-radius: 8px;
    padding: 6px 12px;
}

.modern-search .form-control {
    padding-right: 16px;
}

.btn-search-suffix ~ .form-control,
.modern-search:has(.btn-search-suffix) .form-control {
    padding-right: 50px;
}

.form-label { font-weight: 500; font-size: 14px; color: #475569; }

.btn { border-radius: 8px; font-weight: 500; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.restock-alert-card {
    border-left: 4px solid #ef4444;
}

.empty-state i { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.filter-btns .btn { font-size: 13px; padding: 6px 14px; }

.recent-sale-row { cursor: pointer; }
.recent-sale-row:hover { background: #f8fafc !important; }
.sale-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}
.sale-actions .btn { white-space: nowrap; }

.stock-adjust-form {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.sale-voided { opacity: 0.55; }
.sale-voided:hover { opacity: 0.85; }
.sale-voided td { text-decoration: line-through; text-decoration-color: #dc2626; }
.sale-voided .badge { text-decoration: none; }

/* ---- Reports ---- */
.report-section { margin-bottom: 28px; }
.report-section h5 {
    font-size: 15px; font-weight: 700; margin-bottom: 12px;
    padding-bottom: 6px; border-bottom: 2px solid var(--primary); color: #1e293b;
}
.report-section h5 i { margin-right: 6px; }

.report-kpi {
    background: #f8fafc; border: 1px solid var(--border-color);
    border-radius: 10px; padding: 14px 10px; text-align: center; height: 100%;
}
.report-kpi h3 { margin: 4px 0 0; font-size: 22px; font-weight: 700; }
.report-kpi small { font-size: 12px; }

.report-table-scroll { max-height: 340px; overflow-y: auto; }

.report-bar-track {
    height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden;
}
.report-bar-fill {
    height: 100%; background: var(--primary); border-radius: 4px;
    transition: width .3s;
}

.report-chart-container {
    position: relative; height: 260px;
    background: #f8fafc; border: 1px solid var(--border-color); border-radius: 10px;
    padding: 16px;
}

.report-print-area {
    max-height: 70vh; overflow-y: auto; padding: 24px;
}
.report-print-area .report-print-header {
    text-align: center; margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid #0d6efd;
}
.report-print-area .report-print-header h4 { margin: 0; font-weight: 700; }
.report-print-area .report-print-header p { margin: 4px 0 0; color: #666; font-size: 13px; }

/* ---- Print-only container ---- */
.print-only-container { display: none; }

/* ---- Unit Choice Modal ---- */
.unit-choice-btn {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border: 2px solid var(--border-color); border-radius: 12px;
    background: #fff; cursor: pointer; transition: all .2s;
}
.unit-choice-btn:hover { border-color: var(--primary); background: #f0f7ff; }
.unit-choice-label { font-weight: 700; font-size: 15px; color: #1e293b; }
.unit-choice-label i { color: var(--primary); margin-right: 6px; }
.unit-choice-detail { font-size: 12px; color: #64748b; margin-top: 2px; }
.unit-choice-price { font-size: 20px; font-weight: 700; color: var(--primary); }

.wholesale-product { border-left: 3px solid #0ea5e9; }

/* ---- Inventory: scrollable tables fill remaining height ---- */
#inventoryTabs ~ .tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#tab-stock-list.active,
#tab-stock-history.active,
#tab-defective-items.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#tab-stock-list .table-card,
#tab-stock-history .table-card,
#tab-defective-items .table-card {
    flex: 1;
    min-height: 0;
}

.table-responsive {
    min-height: 0;
}

/* ---- Kiosk Button ---- */
.btn-kiosk { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border: none; font-weight: 600; font-size: 12px; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.btn-kiosk:hover { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }

/* ---- Per-Page Selector ---- */
.per-page-select {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px 12px 4px 14px;
    height: 44px;
    transition: all .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    flex-shrink: 0;
}

.per-page-select:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79,70,229,.1), 0 2px 8px rgba(0,0,0,.06);
}

.per-page-select .per-page-icon {
    color: #94a3b8;
    font-size: 16px;
    flex-shrink: 0;
}

.per-page-select select {
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    padding: 0;
    min-width: 80px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.per-page-select select:focus {
    outline: none;
    box-shadow: none;
}

.per-page-select .per-page-label {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

/* ---- Modern Pagination ---- */
.modern-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 0;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.modern-pagination .page-info {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.modern-pagination .page-buttons {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    padding: 4px 5px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.modern-pagination .page-btn {
    min-width: 34px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    user-select: none;
}

.modern-pagination .page-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modern-pagination .page-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79,70,229,.25);
}

.modern-pagination .page-btn.disabled,
.modern-pagination .page-btn[disabled] {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.modern-pagination .page-dots {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    user-select: none;
    letter-spacing: 1px;
}
