/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-top: 40px; /* Space for status bar */
    padding-bottom: 100px; /* Space for cart footer */
}

/* Status Bar */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 8px 0;
    background: linear-gradient(135deg, #35141B 0%, #1F0B11 100%);
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-bar.offline {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.status-text i {
    margin-right: 5px;
}

.sync-status {
    font-size: 12px;
}

/* Printer Button Styling */
#testPrinterBtn {
    position: relative;
    overflow: hidden;
}

#testPrinterBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#testPrinterBtn i {
    animation: printer-pulse 2s ease-in-out infinite;
}

@keyframes printer-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Login Page - Enhanced Modern Design */
:root {
    --primary-red: #35141B;
    --primary-dark-red: #1F0B11;
    --primary-light-red: #4A1B24;
    --dark-gray: #2D2D2D;
    --light-gray: #666;
    --off-white: #FAFAFA;
    --cream: #F8F6F0;
}

/* Hide status bar on login page */
body:has(.login-container) {
    padding-top: 0;
}

body:has(.login-container) .status-bar {
    display: none;
}

.login-container {
    background: linear-gradient(135deg, var(--off-white) 0%, var(--cream) 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Creative background elements */
.login-container::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(53, 20, 27, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.login-container::after {
    content: '';
    position: fixed;
    bottom: -40%;
    left: -20%;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle, rgba(53, 20, 27, 0.03) 0%, transparent 60%);
    border-radius: 50%;
    z-index: 0;
}

.login-container .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.login-container .card-body {
    padding: 0 !important;
}

/* Brand Header */
.brand-header {
    text-align: center;
    padding: 40px 30px 20px;
    position: relative;
}

.brand-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-light-red));
    border-radius: 2px;
}

.brand-header img {
    width: 140px;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(0) saturate(100%) invert(10%) sepia(25%) saturate(3500%) hue-rotate(310deg) brightness(90%) contrast(95%);
}

.brand-header h1 {
    color: var(--dark-gray);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.brand-header p {
    color: var(--light-gray);
    font-size: 16px;
    font-weight: 400;
    margin: 0;
}

/* Login Form */
.login-form-container {
    padding: 20px 40px 40px;
}

.login-form-container .form-label {
    display: block;
    margin-bottom: 10px;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
}

.login-form-container .input-group {
    position: relative;
    margin-bottom: 28px;
}

.login-form-container .form-control {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid #E8E8E8;
    border-radius: 16px !important;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: var(--dark-gray);
    font-weight: 500;
}

.login-form-container .form-control#password {
    padding-right: 55px;
}

.login-form-container .form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 
        0 0 0 4px rgba(53, 20, 27, 0.1),
        0 4px 20px rgba(53, 20, 27, 0.15);
    transform: translateY(-2px);
}

.login-form-container .input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-gray);
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.login-form-container .form-control:focus ~ .input-icon {
    color: var(--primary-red);
    transform: translateY(-50%) scale(1.1);
}

.login-form-container .toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--light-gray);
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 10;
}

.login-form-container .toggle-password:hover {
    color: var(--primary-red);
    transform: translateY(-50%) scale(1.1);
}

/* Error Alert */
.login-form-container .alert {
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.login-form-container .alert-danger {
    background-color: #fee;
    color: #dc3545;
}

/* Login Button */
.login-form-container .btn-login {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-dark-red) 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: 12px;
}

.login-form-container .btn-login::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;
}

.login-form-container .btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 35px rgba(53, 20, 27, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-form-container .btn-login:hover::before {
    left: 100%;
}

.login-form-container .btn-login:active {
    transform: translateY(-1px);
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 30px 0;
    color: var(--light-gray);
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E8E8E8, transparent);
}

.login-divider span {
    padding: 0 20px;
    font-weight: 500;
}

/* Footer Text */
.login-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--light-gray);
    font-size: 13px;
    font-weight: 500;
}

.login-footer p {
    margin: 0;
    line-height: 1.6;
}

/* Floating decorative elements */
.decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(53, 20, 27, 0.05);
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

.decoration:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.decoration:nth-child(2) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
}

.decoration:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.5;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

/* Loading animation for submit button */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.9;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Login */
@media (max-width: 576px) {
    .login-container .card {
        border-radius: 20px;
        max-width: 100%;
    }
    
    .brand-header {
        padding: 30px 20px 15px;
    }
    
    .login-form-container {
        padding: 15px 25px 30px;
    }
    
    .brand-header img {
        width: 120px;
    }
    
    .brand-header h1 {
        font-size: 28px;
    }

    .login-form-container .form-control {
        padding: 16px 18px 16px 50px;
    }
}

@media (max-width: 768px) {
    .login-container .card {
        max-width: 90%;
    }
}

/* Touch-Friendly Buttons */
.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
    min-height: 60px;
}

.form-control-lg {
    padding: 15px;
    font-size: 1.1rem;
    min-height: 60px;
}

/* Download Section */
.download-section {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.download-btn {
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(25, 135, 84, 0.3);
}

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

/* Navbar Improvements */
.navbar {
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-btn {
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border: none;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

/* Product Cards */
.product-card {
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 100%;
    overflow: hidden;
    background: white;
}

.product-card:hover {
    border-color: #35141B;
    box-shadow: 0 8px 24px rgba(53, 20, 27, 0.15);
    transform: translateY(-6px);
}

.product-card.in-cart {
    border-color: #198754;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.1);
}

.product-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #212529;
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}

.product-price {
    font-size: 1.75rem;
    color: #35141B;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.quantity-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-display {
    font-size: 1.5rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Cart Footer */
.cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #ffffff 0%, #f8f9fa 100%);
    border-top: 3px solid #35141B;
    padding: 15px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1040;
}

.cart-footer .btn {
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cart-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Cart Items in Modal */
.cart-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
}

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

.cart-item-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-item-price {
    color: #6c757d;
}

.cart-item-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: #35141B;
}

/* Empty State */
#emptyState {
    padding: 60px 20px;
}

#emptyState i {
    font-size: 6rem;
    color: #dee2e6;
}

#emptyState h4 {
    color: #6c757d;
    font-weight: 700;
    margin-top: 20px;
}

#emptyState p {
    color: #adb5bd;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .product-card .card-body {
        padding: 15px;
    }
    
    .product-name {
        font-size: 1.1rem;
    }
    
    .product-price {
        font-size: 1.3rem;
    }
    
    .cart-footer {
        padding: 10px 0;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
        min-height: 50px;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Navbar adjustments - REMOVED margin-top to eliminate white space */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bg-primary {
    background-color: #35141B !important;
}

.btn-primary {
    background-color: #35141B;
    border-color: #35141B;
}

.btn-primary:hover {
    background-color: #1F0B11;
    border-color: #1F0B11;
}

.text-primary {
    color: #35141B !important;
}

/* Logo styling */
.navbar-logo {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

/* Sync Button Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.syncing .bi-arrow-repeat {
    animation: spin 1s linear infinite;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 1060;
}

/* Offline Badge */
.offline-badge {
    display: inline-block;
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Search Box */
.search-box {
    position: sticky;
    top: 40px;
    z-index: 1030;
    background: white;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.search-input {
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #35141B;
    box-shadow: 0 0 0 0.2rem rgba(53, 20, 27, 0.15);
}

/* Customer Card */
.customer-card {
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.customer-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.customer-card .card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #212529;
}

/* Select2 Customization */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 50px;
    padding: 8px 12px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}

.select2-container--bootstrap-5 .select2-selection:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: #35141B;
    box-shadow: 0 0 0 0.2rem rgba(53, 20, 27, 0.15);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 2px solid #35141B;
    border-radius: 10px;
}

/* Credit Info Boxes */
.credit-info-box {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.credit-info-box strong {
    font-size: 1.2rem;
    display: block;
    margin-top: 4px;
}

/* Product Info Section */
.product-info-section {
    margin-bottom: 12px;
}

.product-uom {
    margin: 8px 0 0 0;
    text-align: left;
}

.product-uom .badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    font-weight: 600;
    border-radius: 6px;
}

/* Product Actions Section */
.product-actions-section {
    margin-top: 12px;
}

.add-to-cart-btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(53, 20, 27, 0.2);
}

/* UOM Section - Compact Design */
.uom-section {
    margin-top: 0;
    background: rgba(248, 249, 250, 0.5);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.uom-group {
    margin-bottom: 8px;
}

.uom-group:last-of-type {
    margin-bottom: 8px;
}

.uom-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uom-input {
    width: 60px;
    margin: 0 6px;
    font-weight: 700;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.95rem;
}

.uom-input:focus {
    border-color: #35141B;
    box-shadow: 0 0 0 0.2rem rgba(53, 20, 27, 0.15);
    outline: none;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.quantity-controls .btn {
    padding: 6px 10px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    border-width: 2px;
}

.quantity-controls .btn:hover {
    transform: scale(1.05);
}

.quantity-controls .btn:active {
    transform: scale(0.95);
}

.uom-section .btn-danger {
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
}

/* Product Grid */
.product-card {
    min-height: auto !important;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info-section {
    flex: 0 0 auto;
}

.product-actions-section {
    flex: 0 0 auto;
    margin-top: auto;
}

/* Cart Item Quantity Display */
.cart-item-qty {
    margin-top: 4px;
}

.cart-item-qty small {
    line-height: 1.4;
}

/* Accessibility */
button:focus,
input:focus {
    outline: 2px solid #35141B;
    outline-offset: 2px;
}

/* Bill Adjustments Section */
#billAdjustmentsContainer .card {
    transition: all 0.3s ease;
}

#billAdjustmentsContainer .card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#billAdjustmentsContainer .border-success {
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.15);
}

#billAdjustmentsContainer .border-warning {
    background: linear-gradient(135deg, #fffbf0 0%, #fff3cd 100%);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

#billAdjustmentsContainer .form-check-input {
    width: 1.5em;
    height: 1.5em;
    cursor: pointer;
    margin-top: 0.15em;
}

#billAdjustmentsContainer .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

#billAdjustmentsContainer .form-check-label {
    cursor: pointer;
    user-select: none;
}

#billAdjustmentsContainer .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Checkout Modal */
#checkoutModal .modal-xl {
    max-width: 1200px;
}

#checkoutModal .modal-header {
    padding: 1.5rem;
}

#checkoutModal .modal-body {
    padding: 1.5rem;
}

/* No Customer Warning */
#noCustomerWarning {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

#noCustomerWarning i {
    color: #ffc107;
}

#noCustomerWarning strong {
    color: #856404;
}

#noCustomerWarning p {
    color: #856404;
    font-size: 0.95rem;
}

#checkoutBreakdown {
    font-size: 1.1rem;
}

#checkoutBreakdown .d-flex {
    padding: 8px 0;
}

/* Checkout Items Table */
#checkoutCartItems table {
    margin-bottom: 0;
}

#checkoutCartItems .table thead th {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    padding: 12px;
}

#checkoutCartItems .table tbody td {
    padding: 15px 12px;
    vertical-align: middle;
}

#checkoutCartItems .table tbody tr:hover {
    background-color: #f8f9fa;
}

#checkoutCartItems .badge {
    font-size: 0.85rem;
    padding: 5px 10px;
    font-weight: 600;
}

/* Manual Adjustment Input */
.input-group-text {
    background-color: #e9ecef;
    font-weight: 600;
}

#billAdjustmentsContainer input[type="number"]:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Responsive adjustments for checkout modal */
@media (max-width: 768px) {
    #checkoutModal .modal-xl {
        max-width: 95%;
    }
    
    #billAdjustmentsContainer .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    #billAdjustmentsContainer .text-end {
        text-align: left !important;
        margin-top: 10px;
        margin-left: 0 !important;
    }
}

/* Receipt Styles */
.receipt-content {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Courier New', monospace;
    background: white;
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px dashed #000;
    padding-bottom: 15px;
}

.receipt-header h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 5px 0;
    text-transform: uppercase;
}

.receipt-header .receipt-title {
    font-size: 1rem;
    margin: 5px 0;
    font-weight: 600;
}

.receipt-header .trans-key {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    word-break: break-all;
}

.receipt-info {
    margin-bottom: 15px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.receipt-info div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.receipt-items {
    margin-bottom: 15px;
    border-top: 1px dashed #000;
    padding-top: 10px;
}

.receipt-items h5 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.receipt-item {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dotted #ccc;
    font-size: 0.85rem;
}

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

.receipt-item-name {
    font-weight: bold;
    margin-bottom: 3px;
}

.receipt-item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
}

.receipt-item-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-top: 3px;
}

.receipt-totals {
    border-top: 2px dashed #000;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.receipt-totals div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.receipt-totals .subtotal {
    padding-bottom: 8px;
}

.receipt-totals .discount {
    color: #198754;
    font-weight: 600;
}

.receipt-totals .charges {
    color: #ffc107;
    font-weight: 600;
}

.receipt-totals .grand-total {
    border-top: 2px solid #000;
    padding-top: 10px;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: bold;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed #000;
    font-size: 0.75rem;
    color: #666;
}

/* Print Styles for 57mm Thermal Printer */
@media print {
    body * {
        visibility: hidden;
    }
    
    #receiptContent,
    #receiptContent * {
        visibility: visible;
    }
    
    #receiptContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 45mm;
        margin: 0;
        padding: 0;
    }
    
    .receipt-content {
        width: 45mm;
        max-width: 45mm;
        margin: 0;
        padding: 2mm;
        font-size: 8pt;
    }
    
    .receipt-header h3 {
        font-size: 12pt;
    }
    
    .receipt-header .receipt-title {
        font-size: 10pt;
    }
    
    .receipt-header .trans-key {
        font-size: 7pt;
    }
    
    .receipt-info {
        font-size: 8pt;
    }
    
    .receipt-items h5 {
        font-size: 9pt;
    }
    
    .receipt-item {
        font-size: 8pt;
        margin-bottom: 3mm;
    }
    
    .receipt-item-details {
        font-size: 7pt;
    }
    
    .receipt-totals {
        font-size: 8pt;
    }
    
    .receipt-totals .grand-total {
        font-size: 10pt;
    }
    
    .receipt-footer {
        font-size: 7pt;
    }
    
    .modal-header,
    .modal-footer,
    .btn-close {
        display: none !important;
    }
}

