/* Cash Register System Styles */

/* High-quality receipt image capture styles */
.receipt-paper.image-capture {
    font-family: 'Courier New', monospace !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 30px !important;
    width: 400px !important;
    border: 3px solid #000000 !important;
    box-shadow: none !important;
    margin: 0 !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.receipt-paper.image-capture * {
    color: #000000 !important;
    font-family: 'Courier New', monospace !important;
    text-rendering: optimizeLegibility !important;
}

.receipt-paper.image-capture .receipt-header h4 {
    font-size: 20px !important;
    font-weight: bold !important;
    margin-bottom: 10px !important;
}

.receipt-paper.image-capture .receipt-item {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 8px !important;
}

.receipt-paper.image-capture .total-line {
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1.6 !important;
}

:root {
    --primary-color: #1e293b;
    --secondary-color: #64748b;
    --success-color: #059669;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #0284c7;
    
    /* Japanese Convenience Store Colors */
    --jp-blue: #0066cc;
    --jp-green: #00aa44;
    --jp-orange: #ff6600;
    --jp-red: #dd0000;
    --jp-yellow: #ffcc00;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --professional-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-color: #6366f1;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Professional POS Enhancements */
.professional-header {
    background: var(--professional-gradient) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.professional-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.professional-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.professional-btn {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.professional-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Fix dropdown z-index issues */
.navbar .dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
}

.navbar .dropdown {
    z-index: 1040 !important;
    position: relative !important;
}

.dropdown-toggle {
    z-index: 1041 !important;
}

/* Ensure professional header has proper z-index */
.professional-header {
    z-index: 1030 !important;
    position: relative !important;
}

/* Custom Language Dropdown - No Bootstrap Dependencies */
.custom-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1050;
}

.custom-dropdown-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: space-between;
}

.custom-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.custom-dropdown-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    padding: 8px 0;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1060;
}

.custom-dropdown.active .custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.custom-dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b;
}

.custom-dropdown-item:focus {
    outline: none;
    background: #e2e8f0;
    color: #1e293b;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
    font-size: 12px;
}

.custom-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.professional-card {
    z-index: 1 !important;
    position: relative !important;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Product Grid */
.product-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
}

.product-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-price {
    font-weight: 700;
    color: var(--success-color);
    font-size: 1.1rem;
}

.product-stock {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.stock-low {
    color: var(--warning-color);
}

.stock-out {
    color: var(--danger-color);
}

/* Cart */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-details {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 0.25rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Receipt */
.receipt-content {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    background: #fff;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.receipt-total {
    border-top: 1px dashed #000;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Category List */
.category-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    border-radius: 0;
    text-align: left;
}

.category-item:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.category-item.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .col-md-3,
    .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .product-card {
        margin-bottom: 0.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #212529;
        --dark-color: #f8f9fa;
    }
    
    body {
        background-color: var(--light-color);
        color: var(--dark-color);
    }
    
    .card {
        background-color: #343a40;
        color: var(--dark-color);
    }
    
    .card-header {
        background-color: #495057;
        border-bottom-color: #6c757d;
    }
    
    .product-card {
        background-color: #343a40;
        border-color: #6c757d;
    }
    
    .form-control {
        background-color: #495057;
        border-color: #6c757d;
        color: var(--dark-color);
    }
    
    .modal-content {
        background-color: #343a40;
        color: var(--dark-color);
    }
    
    .modal-header,
    .modal-footer {
        background-color: #495057;
        border-color: #6c757d;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .receipt-content {
        border: none;
        box-shadow: none;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Cart animations */
.cart-item {
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

/* Product card animations */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* Button animations */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Loading animations */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success/Error animations */
.alert-success {
    animation: slideIn 0.5s ease-in-out;
}

.alert-danger {
    animation: shake 0.5s ease-in-out;
}

/* Cart count badge animation */
#cartCount {
    transition: all 0.3s ease;
}

#cartCount.updated {
    animation: pulse 0.5s ease-in-out;
}

/* View toggle buttons */
.btn-group .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Keyboard shortcuts styling */
kbd {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: inset 0 -1px 0 #dee2e6;
    color: #495057;
    font-size: 0.75em;
    font-weight: 700;
    padding: 0.125rem 0.25rem;
}

/* Enhanced responsive design */
@media (max-width: 1200px) {
    .col-md-3 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding: 0.25rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-text {
        font-size: 0.8rem;
    }
    
    .card {
        margin-bottom: 0.5rem;
    }
    
    .product-card {
        margin-bottom: 0.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .h5 {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .card-header h5 {
        font-size: 0.9rem;
    }
    
    .product-name {
        font-size: 0.8rem;
    }
    
    .product-price {
        font-size: 1rem;
    }
}

/* Print optimizations */
@media print {
    .no-print {
        display: none !important;
    }
    
    .navbar,
    .card-header,
    .btn,
    .modal {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .container-fluid {
        padding: 0 !important;
    }
    
    .col-md-3,
    .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Custom Scrollbar */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Receipt Styling */
.receipt-container {
    background: #f8f9fa;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.receipt-paper {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    animation: receiptSlideIn 0.5s ease-out;
}

.receipt-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997, #17a2b8, #6f42c1);
    border-radius: 8px 8px 0 0;
}

/* Receipt Header - Minimized Line Height */
.receipt-header {
    line-height: 1.0;
}

.receipt-header h4 {
    line-height: 1.0;
    margin-bottom: 0.1rem;
}

.receipt-header p {
    line-height: 1.0;
    margin-bottom: 0.05rem;
}

.receipt-header div {
    line-height: 1.0;
    margin-bottom: 0.05rem;
}

.receipt-header .text-center {
    line-height: 1.0;
}

.receipt-header .text-center p {
    line-height: 1.0;
    margin-bottom: 0.05rem;
}

/* Enhanced Receipt Items */
.receipt-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 4px 0;
    border-bottom: 1px dotted #ddd;
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-item-name {
    font-weight: 500;
    flex: 1;
    margin-right: 10px;
    word-wrap: break-word;
}

.receipt-item-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 80px;
}

.receipt-item-details span:first-child {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 2px;
}

.receipt-item-total {
    font-weight: 600;
    color: #333;
}

.receipt-total .receipt-item {
    border-bottom: 1px solid #333;
    padding: 6px 0;
    font-weight: 500;
}

.receipt-total .receipt-item:last-child {
    border-bottom: 2px solid #333;
    font-weight: 700;
    font-size: 1.1em;
}

/* Receipt header styles are defined above */

.receipt-header h4 {
    margin: 0;
    font-weight: bold;
    color: #212529;
}

/* Small Screen Optimizations */
@media (max-width: 1200px) {
    /* Compact layout for tablets and small laptops */
    .container-fluid {
        padding: 0.5rem;
    }
    
    .row {
        margin: 0;
    }
    
    .col-md-8, .col-md-4 {
        padding: 0.25rem;
    }
    
    /* Compact header */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Compact product grid */
    .product-grid {
        gap: 0.5rem;
    }
    
    .product-card {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .product-card .card-body {
        padding: 0.5rem;
    }
    
    .product-card h6 {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .product-card .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Compact cart */
    .cart-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .cart-item-name {
        font-size: 0.9rem;
    }
    
    .cart-item-details {
        font-size: 0.8rem;
    }
    
    .quantity-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .quantity-input {
        width: 50px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    /* Compact buttons */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Touch Device Optimizations */
@media (max-width: 768px) {
    /* Mobile and tablet portrait */
    .container-fluid {
        padding: 0.25rem;
    }
    
    /* Stack layout vertically */
    .col-md-8, .col-md-4 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        touch-action: manipulation;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Larger touch targets */
    .product-card .btn {
        min-height: 40px;
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .quantity-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .quantity-input {
        width: 60px;
        height: 40px;
        font-size: 1rem;
        text-align: center;
    }
    
    /* Compact search */
    .input-group {
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        height: 44px;
        font-size: 1rem;
    }
    
    /* Compact modals */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Compact cart summary */
    .cart-summary {
        font-size: 0.9rem;
    }
    
    .cart-summary .d-flex {
        margin-bottom: 0.5rem;
    }
    
    /* Compact totals */
    .totals-section {
        padding: 0.5rem;
    }
    
    .totals-section .row {
        margin-bottom: 0.25rem;
    }
    
    .totals-section .h5 {
        font-size: 1.1rem;
    }
    
    /* Compact dashboard */
    .card-body {
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .h5 {
        font-size: 1.1rem;
    }
    
    .h6 {
        font-size: 1rem;
    }
}

/* Ultra-compact for very small screens */
@media (max-width: 576px) {
    /* Extra small devices */
    .container-fluid {
        padding: 0.125rem;
    }
    
    /* Single column layout */
    .row {
        flex-direction: column;
    }
    
    .col-md-8, .col-md-4 {
        width: 100%;
        padding: 0.125rem;
    }
    
    /* Ultra-compact product cards */
    .product-card {
        padding: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .product-card .card-body {
        padding: 0.25rem;
    }
    
    .product-card h6 {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
    }
    
    .product-card .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        min-height: 32px;
    }
    
    /* Ultra-compact cart */
    .cart-item {
        padding: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .cart-item-name {
        font-size: 0.8rem;
    }
    
    .cart-item-details {
        font-size: 0.7rem;
    }
    
    /* Ultra-compact buttons */
    .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
        min-height: 36px;
    }
    
    .btn-lg {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    /* Ultra-compact forms */
    .form-control {
        height: 36px;
        font-size: 0.9rem;
    }
    
    .input-group-text {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Ultra-compact modals */
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-header {
        padding: 0.5rem 0.75rem;
    }
    
    .modal-footer {
        padding: 0.5rem 0.75rem;
    }
    
    /* Ultra-compact navigation */
    .navbar {
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.25rem 0.375rem;
        font-size: 0.8rem;
    }
}

/* Touch-specific optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .product-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }
    
    .btn:hover {
        background-color: var(--bs-btn-bg);
        border-color: var(--bs-btn-border-color);
    }
}

/* Landscape orientation optimizations */
@media (max-width: 1024px) and (orientation: landscape) {
    /* Tablet landscape */
    .container-fluid {
        padding: 0.25rem;
    }
    
    .row {
        margin: 0;
    }
    
    .col-md-8 {
        width: 60%;
    }
    
    .col-md-4 {
        width: 40%;
    }
    
    /* Compact vertical spacing */
    .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    .mt-3 {
        margin-top: 0.5rem !important;
    }
    
    .mt-4 {
        margin-top: 0.75rem !important;
    }
    
    /* Compact cards */
    .card {
        margin-bottom: 0.5rem;
    }
    
    .card-body {
        padding: 0.5rem;
    }
    
    /* Compact product grid */
    .product-grid {
        gap: 0.25rem;
    }
    
    .product-card {
        padding: 0.25rem;
    }
    
    .product-card .card-body {
        padding: 0.25rem;
    }
    
    .product-card h6 {
        font-size: 0.8rem;
        margin-bottom: 0.125rem;
    }
    
    .product-card .btn {
        padding: 0.125rem 0.25rem;
        font-size: 0.7rem;
        min-height: 28px;
    }
}

/* Additional Small Screen Optimizations */
@media (max-width: 1200px) {
    /* Compact spacing */
    .card {
        margin-bottom: 0.5rem;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    /* Compact form elements */
    .form-control {
        font-size: 0.9rem;
    }
    
    .input-group-text {
        font-size: 0.9rem;
        padding: 0.375rem 0.5rem;
    }
    
    /* Compact badges */
    .badge {
        font-size: 0.7rem;
    }
    
    /* Compact alerts */
    .alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Compact dropdowns */
    .dropdown-menu {
        font-size: 0.9rem;
    }
    
    /* Compact modals */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.375rem;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for interactive elements */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-toggle {
        min-height: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .input-group-text {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    }
    
    /* Active states for touch feedback */
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Crisp borders and shadows */
    .card {
        border-width: 0.5px;
    }
    
    .btn {
        border-width: 0.5px;
    }
    
    .form-control {
        border-width: 0.5px;
    }
}

/* Print optimizations for receipts */
@media print {
    .navbar,
    .btn,
    .modal,
    .dropdown {
        display: none !important;
    }
    
    .container-fluid {
        padding: 0 !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .card-body {
        padding: 0 !important;
    }
}
    font-size: 1.5rem;
}

.receipt-header .store-name-jp {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.receipt-contact {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0.5rem 0;
    border-top: 1px dashed #dee2e6;
    border-bottom: 1px dashed #dee2e6;
    padding: 0.5rem 0;
}

.receipt-website {
    font-size: 0.8rem;
    color: #0d6efd;
    margin: 0.5rem 0;
}

.receipt-message {
    font-size: 0.9rem;
    color: #495057;
    margin: 0.5rem 0;
    border-top: 1px dashed #dee2e6;
    border-bottom: 1px dashed #dee2e6;
    padding: 0.5rem 0;
    text-align: center;
}

.receipt-info {
    margin: 1rem 0;
    font-size: 0.9rem;
}

.receipt-info p {
    margin: 0.25rem 0;
    display: flex;
    justify-content: space-between;
}

.receipt-items {
    margin: 1rem 0;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px dotted #dee2e6;
}

.receipt-item:last-child {
    border-bottom: none;
}

.receipt-total {
    margin-top: 1rem;
    border-top: 2px solid #dee2e6;
    padding-top: 1rem;
}

.receipt-total .receipt-item {
    font-weight: bold;
    border-bottom: none;
    margin-bottom: 0.25rem;
}

.receipt-total .receipt-item:last-child {
    font-size: 1.1rem;
    color: #28a745;
    border-top: 1px solid #dee2e6;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.receipt-footer {
    text-align: center;
    margin-top: 1.5rem;
    border-top: 2px dashed #dee2e6;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.receipt-logo {
    max-height: 60px;
    margin-bottom: 1rem;
    filter: grayscale(0.2);
}

/* Receipt Animations */
@keyframes receiptSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.receipt-paper.print-mode {
    box-shadow: none;
    border: 1px solid #000;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 1rem;
}

/* Simplified Receipt Modal Styling */
.receipt-actions-simple {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.receipt-actions-simple h6 {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.receipt-actions-simple .btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.receipt-actions-simple .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.transaction-info-simple {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #dee2e6;
    margin-top: 1rem;
}

.transaction-info-simple h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item small {
    font-weight: 500;
}

.info-item span {
    font-weight: 600;
    color: #495057;
}

/* Enhanced Cash Register Styling */
.cart-empty {
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem;
}

.cart-summary {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Quick Amount Buttons */
.btn-outline-success.btn-sm {
    border-color: #198754;
    color: #198754;
    transition: all 0.2s ease;
}

.btn-outline-success.btn-sm:hover {
    background-color: #198754;
    color: white;
    transform: translateY(-1px);
}

/* Enhanced Product Cards */
.product-card {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #198754, #ffc107, #dc3545);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #0d6efd;
}

/* Enhanced Cart Items */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.cart-item:hover {
    background-color: #f8f9fa;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.25rem;
}

/* Enhanced Buttons */
.btn-action {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-action:hover::before {
    left: 100%;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-online {
    background-color: #198754;
    animation: pulse 2s infinite;
}

.status-offline {
    background-color: #dc3545;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Enhanced Modals */
.modal-header.bg-warning {
    background: linear-gradient(135deg, #ffc107, #ffb300) !important;
}

.modal-header.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

/* Floating Scanner Button */
.floating-scanner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

/* Floating Notifications */
.floating-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.floating-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.floating-notification.alert-success {
    background: linear-gradient(135deg, #198754, #20c997);
    color: white;
    border: none;
}

.floating-notification.alert-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
    border: none;
}

.floating-notification i {
    font-size: 1.2rem;
}

/* Recent Transactions Modal Styling */
.modal-header.bg-info {
    background: linear-gradient(135deg, #0dcaf0, #0aa2c0) !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.badge {
    font-size: 0.75rem;
}

/* Transaction Status Badges */
.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Table Responsive Enhancements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.7rem;
    }
}

/* Smart Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestions-list {
    padding: 0;
    margin: 0;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item .product-info {
    flex: 1;
}

.suggestion-item .product-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

.suggestion-item .product-details {
    font-size: 0.875rem;
    color: #6c757d;
}

.suggestion-item .product-price {
    font-weight: 600;
    color: #198754;
    font-size: 0.9rem;
}

.suggestion-item .product-barcode {
    font-size: 0.75rem;
    color: #6c757d;
    font-family: monospace;
}

/* Smart Dashboard Enhancements */
.card-tools {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
}

.stat-item {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.stat-item:hover {
    background-color: #f8f9fa;
}

/* Enhanced Animations */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.3s ease;
}

.fade-in-scale {
    animation: fadeInScale 0.2s ease;
}

/* Enhanced Button Hover Effects */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

.btn-enhanced:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Enhanced Card Styles */
.card-enhanced {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card-enhanced:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Smart Notifications */
.smart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
}

.smart-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.smart-notification.success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.9), rgba(32, 201, 151, 0.9));
    color: white;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.smart-notification.error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9), rgba(231, 76, 60, 0.9));
    color: white;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.smart-notification.info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.9), rgba(10, 162, 192, 0.9));
    color: white;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

.floating-scanner .btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.floating-scanner .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.floating-scanner .btn i {
    font-size: 1.5rem;
}

.scanner-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 2px solid #0d6efd;
    border-radius: 50%;
    animation: scannerPulse 2s infinite;
    pointer-events: none;
}

@keyframes scannerPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Enhanced Barcode Scanner Modal */
.modal-header.bg-primary {
    background: linear-gradient(135deg, #0d6efd, #0056b3) !important;
}

.form-control-lg {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Scanner Status Indicator */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
    animation: statusPulse 2s infinite;
}

.status-online {
    background-color: #198754;
}

.status-offline {
    background-color: #dc3545;
}

@keyframes statusPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Recent Scans Styling */
.list-group-item {
    border-left: none;
    border-right: none;
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Scan Feedback Animations */
.alert {
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced Form Controls */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 0.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .btn-group-sm {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group-sm .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
    
    .floating-scanner {
        bottom: 15px;
        right: 15px;
    }
    
    .floating-scanner .btn {
        width: 50px;
        height: 50px;
    }
    
    .floating-scanner .btn i {
        font-size: 1.25rem;
    }
    
    .scanner-pulse {
        width: 50px;
        height: 50px;
    }
}

/* Receipt Zoom Functionality */
.receipt-paper {
    transition: transform 0.3s ease;
    transform-origin: center;
}

.receipt-paper.zoom-50 { transform: scale(0.5); }
.receipt-paper.zoom-75 { transform: scale(0.75); }
.receipt-paper.zoom-100 { transform: scale(1); }
.receipt-paper.zoom-125 { transform: scale(1.25); }
.receipt-paper.zoom-150 { transform: scale(1.5); }

/* Responsive Design for Receipt Modal */
@media (max-width: 1200px) {
    .receipt-actions-panel {
        position: static;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .receipt-modal-header {
        padding: 1rem;
    }
    
    .receipt-preview-container,
    .receipt-actions-panel {
        margin: 1rem;
    }
    
    .receipt-preview-content {
        padding: 1rem;
        min-height: 300px;
    }
    
    .receipt-actions {
        flex-wrap: wrap;
    }
    
    .receipt-footer-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .receipt-footer-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Enhanced Print Styles for Receipts */
@media print {
    .receipt-paper {
        box-shadow: none;
        border: 1px solid #000;
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 1rem;
        page-break-inside: avoid;
        transform: scale(1) !important;
    }
    
    .receipt-container {
        background: white;
        padding: 0;
    }
    
    .modal-header,
    .modal-footer {
        display: none !important;
    }
}

/* Thermal Receipt Styles - Enhanced for Clarity */
@media print {
    .receipt-paper.thermal {
        font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        width: 80mm !important;
        max-width: 80mm !important;
        margin: 0 auto !important;
        padding: 5mm !important;
        background: white !important;
        color: black !important;
        font-weight: normal !important;
    }
    
    .receipt-paper.thermal .receipt-header {
        text-align: center !important;
        margin-bottom: 10px !important;
        border-bottom: 2px solid #000 !important;
        padding-bottom: 8px !important;
        line-height: 1.0 !important;
    }
    
    .receipt-paper.thermal .receipt-header h1 {
        font-size: 18px !important;
        font-weight: bold !important;
        margin: 0 0 2px 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
        line-height: 1.0 !important;
    }
    
    .receipt-paper.thermal .receipt-header h2 {
        font-size: 16px !important;
        font-weight: bold !important;
        margin: 0 0 2px 0 !important;
        line-height: 1.0 !important;
    }
    
    .receipt-paper.thermal .receipt-header p {
        font-size: 12px !important;
        margin: 1px 0 !important;
        line-height: 1.0 !important;
        font-weight: normal !important;
    }
    
    .receipt-paper.thermal .receipt-info {
        font-size: 11px !important;
        margin: 2px 0 !important;
        text-align: center !important;
        line-height: 1.0 !important;
    }
    
    .receipt-paper.thermal .receipt-items {
        margin: 10px 0 !important;
    }
    
    .receipt-paper.thermal .receipt-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        margin: 3px 0 !important;
        padding: 2px 0 !important;
        border-bottom: none !important;
        line-height: 1.3 !important;
    }
    
    .receipt-paper.thermal .receipt-item .item-name {
        font-size: 12px !important;
        font-weight: normal !important;
        flex: 1 !important;
        margin-right: 6px !important;
        line-height: 1.3 !important;
    }
    
    .receipt-paper.thermal .receipt-item .item-details {
        font-size: 10px !important;
        color: #333 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
    
    .receipt-paper.thermal .receipt-item .item-price {
        font-size: 12px !important;
        font-weight: bold !important;
        text-align: right !important;
        min-width: 60px !important;
        line-height: 1.3 !important;
    }
    
    .receipt-paper.thermal .receipt-total {
        margin: 10px 0 !important;
        border-top: 2px solid #000 !important;
        padding-top: 8px !important;
    }
    
    .receipt-paper.thermal .total-line {
        display: flex !important;
        justify-content: space-between !important;
        margin: 3px 0 !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    
    .receipt-paper.thermal .total-line.grand-total {
        font-size: 14px !important;
        font-weight: bold !important;
        border-top: 1px solid #000 !important;
        padding-top: 6px !important;
        margin-top: 8px !important;
        text-transform: uppercase !important;
    }
    
    .receipt-paper.thermal .receipt-footer {
        margin-top: 15px !important;
        text-align: center !important;
        border-top: 2px solid #000 !important;
        padding-top: 10px !important;
    }
    
    .receipt-paper.thermal .receipt-footer p {
        font-size: 11px !important;
        margin: 3px 0 !important;
        line-height: 1.3 !important;
    }
    
    .receipt-paper.thermal .receipt-footer .thank-you {
        font-size: 14px !important;
        font-weight: bold !important;
        margin: 8px 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }
    
    /* Hide elements not needed for thermal printing */
    .receipt-paper.thermal .receipt-logo,
    .receipt-paper.thermal .receipt-actions,
    .receipt-paper.thermal .btn,
    .receipt-paper.thermal .modal,
    .receipt-paper.thermal .floating-scanner {
        display: none !important;
    }
    
    /* Ensure proper spacing and clarity */
    .receipt-paper.thermal * {
        box-sizing: border-box !important;
    }
    
    /* Make sure text is dark and clear */
    .receipt-paper.thermal,
    .receipt-paper.thermal * {
        color: black !important;
        background: white !important;
        text-shadow: none !important;
    }
    
    /* Improve contrast for thermal printers */
    .receipt-paper.thermal .receipt-header,
    .receipt-paper.thermal .receipt-total,
    .receipt-paper.thermal .receipt-footer {
        border-color: #000 !important;
    }
    
    /* Ensure proper font rendering */
    .receipt-paper.thermal {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        font-smooth: always !important;
    }
    
    .receipt-paper::before {
        display: none;
    }
    
    .receipt-actions-panel {
        display: none !important;
    }
}

/* Compact Sidebar Styles */
.col-md-2 .card {
    margin-bottom: 0;
}

.col-md-2 .card-header {
    padding: 0.75rem;
    font-size: 0.9rem;
}

.col-md-2 .card-header h5 {
    font-size: 0.9rem;
    margin: 0;
}

.col-md-2 .list-group-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border: none;
    border-bottom: 1px solid #f8f9fa;
}

.col-md-2 .list-group-item:last-child {
    border-bottom: none;
}

.col-md-2 .list-group-item i {
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

.col-md-2 .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive adjustments for compact sidebar */
@media (max-width: 768px) {
    .col-md-2 {
        margin-bottom: 1rem;
    }
    
    .col-md-10 {
        margin-top: 0;
    }
}

/* Enhanced Category Page Styles */
.page-header-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 0;
    border: 1px solid #dee2e6;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
}

.page-title i {
    color: var(--primary-color);
    font-size: 2.2rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0.5rem 0 0 0;
    font-weight: 400;
}

.page-actions .btn-modern {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.page-actions .btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Search and Filters Modern */
.search-filters-modern {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.search-filters-modern .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.search-filters-modern .card-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

.form-control-modern,
.form-select-modern {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control-modern:focus,
.form-select-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.btn-modern {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Categories Grid Modern */
.categories-grid-container {
    margin-top: 1rem;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.empty-state-content {
    text-align: center;
    max-width: 400px;
}

.empty-state-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.empty-state-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Category Card Modern */
.category-card-modern {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.category-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--category-color);
}

.category-card-header {
    background: linear-gradient(135deg, var(--category-color) 0%, var(--category-color)dd 100%);
    padding: 1.5rem 1rem 1rem 1rem;
    position: relative;
    color: white;
}

.category-icon-modern {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.category-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: scale(1.05);
}

.category-card-body {
    padding: 1.5rem 1rem 1rem 1rem;
    text-align: center;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.category-name-jp {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.category-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 0;
}

.category-card-footer {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge-modern {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.product-count-modern {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Category Page */
@media (max-width: 1200px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-header-modern {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header-modern {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.75rem;
        flex-direction: column;
        text-align: center;
    }
    
    .page-actions {
        margin-top: 1rem;
        width: 100%;
    }
    
    .page-actions .btn-modern {
        width: 100%;
    }
    
    .category-card-modern {
        margin-bottom: 1rem;
    }
    
    .search-filters-modern .row {
        margin: 0;
    }
    
    .search-filters-modern .col-lg-2,
    .search-filters-modern .col-lg-4 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .category-icon-modern {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .category-card-body {
        padding: 1rem 0.75rem 0.75rem 0.75rem;
    }
    
    .category-card-footer {
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Bulk Actions Styles */
.bulk-actions-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-actions-bar .btn {
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.bulk-actions-bar .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Category Checkbox Styles */
.category-checkbox {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
}

.category-checkbox .form-check-input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.category-checkbox .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(13, 110, 253, 0.4);
}

.category-checkbox .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.category-checkbox .form-check-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    z-index: 1;
}

/* Category Card Hover Effects with Checkbox */
.category-card-modern:hover .category-checkbox .form-check-input {
    border-color: rgba(255, 255, 255, 1);
    background-color: rgba(255, 255, 255, 1);
}

/* Bulk Edit Modal Styles */
.modal-modern .form-control,
.modal-modern .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.modal-modern .form-control:focus,
.modal-modern .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Responsive Bulk Actions */
@media (max-width: 768px) {
    .bulk-actions-bar {
        padding: 0.75rem;
    }
    
    .bulk-actions-bar .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .bulk-actions-bar .d-flex > div {
        width: 100%;
        justify-content: center;
    }
    
    .bulk-actions-bar .btn {
        flex: 1;
        margin: 0 0.25rem;
    }
    
    .category-checkbox {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .category-checkbox .form-check-input {
        width: 16px;
        height: 16px;
    }
    
    .category-checkbox .form-check-label {
        width: 16px;
        height: 16px;
    }
}

/* Japanese Convenience Store Styles */
.jp-convenience-header {
    background: linear-gradient(135deg, var(--jp-blue), var(--jp-green));
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.jp-category-btn {
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.jp-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.jp-category-btn i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.jp-payment-btn {
    border-radius: 8px;
    min-height: 80px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.jp-payment-btn:hover {
    transform: scale(1.05);
    border-color: var(--jp-blue);
}

.jp-quick-action {
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.jp-quick-action:hover {
    transform: translateY(-1px);
}

/* Japanese-style alerts and notifications */
.jp-alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.jp-alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.jp-alert-success {
    background: linear-gradient(135deg, #d1edff, #74b9ff);
    color: #0c5460;
}

/* IC Card and QR Code specific styles */
.ic-card-display {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
}

.qr-code-display {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-radius: 12px;
    padding: 20px;
    margin: 10px 0;
}

.placeholder-qr {
    border: 2px dashed #ccc;
    border-radius: 8px;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Age verification styles */
.age-verification-btn {
    border-radius: 12px;
    min-height: 120px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.age-verification-btn:hover {
    transform: scale(1.05);
}

/* Japanese convenience store layout */
.jp-pos-layout {
    max-width: 1400px;
    margin: 0 auto;
}

.jp-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.jp-product-card {
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 100px;
}

.jp-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Enhanced receipt styles for Japanese convenience stores */
.jp-receipt {
    font-family: 'MS Gothic', 'Courier New', monospace;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    max-width: 300px;
    margin: 0 auto;
}

.jp-receipt-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.jp-receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
}

.jp-receipt-total {
    border-top: 1px solid #000;
    padding-top: 10px;
    margin-top: 10px;
    font-weight: bold;
}

/* Responsive adjustments for Japanese convenience store */
@media (max-width: 768px) {
    .jp-category-btn {
        min-height: 50px;
        font-size: 0.8rem;
    }
    
    .jp-category-btn i {
        font-size: 1.2rem;
    }
    
    .jp-payment-btn {
        min-height: 60px;
        font-size: 0.85rem;
    }
    
    .jp-quick-action {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}
