/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

:root {
    --primary-color: #4e73df;
    --secondary-color: #1cc88a;
    --accent-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #2e3951;
    --light-color: #f8f9fc;
}

/* Login Page Styles */
.card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: none;
}

.form-floating label {
    color: #6c757d;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #3a5fd9;
    border-color: #3a5fd9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 115, 223, 0.3);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #17a673;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(28, 200, 138, 0.3);
}

/* POS Page Styles */
.sidebar {
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--dark-color) 0%, #1e2a45 100%);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    width: 250px;
}

.sidebar .nav-link span,
.sidebar .dropdown-toggle span,
.sidebar h3 {
    white-space: nowrap;
}



/* Main content styles */
.main-content {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: calc(100% - 250px);
    max-width: none;
    flex-grow: 1;
}

.sidebar-container.collapsed + .main-content {
    width: calc(100% - 70px);
}

/* Responsive adjustments for sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    margin: 5px 0;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover, 
.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.category-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.category-nav .nav-link {
    color: #495057;
    border-radius: 20px;
    padding: 8px 15px;
    margin: 0 5px;
    transition: all 0.2s ease;
}

.category-nav .nav-link:hover,
.category-nav .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
}

.product-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    border: 1px solid #dee2e6;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card .card-img-top {
    height: 150px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 15px;
}

.product-card .product-price {
    font-weight: bold;
    color: var(--primary-color);
}

.cart-item {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

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

.cart-item .item-price {
    color: var(--primary-color);
    font-weight: 500;
}

.cart-total {
    font-size: 1.2rem;
    font-weight: bold;
}

.quantity-control {
    display: flex;
    align-items: center;
}

.quantity-control .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.quantity-control input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
}

/* Customer Info Section */
.customer-info {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

/* Receipt Styles */
.receipt {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', Courier, monospace;
    max-width: 300px;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.receipt-items {
    margin-bottom: 10px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.receipt-total {
    border-top: 1px dashed #000;
    padding-top: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}

/* Payment Modal Styles */
.payment-methods .form-check {
    margin-bottom: 15px;
}

.payment-method-card {
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.payment-method-card:hover {
    background-color: rgba(78, 115, 223, 0.1);
}

.payment-method-card input[type="radio"] {
    position: absolute;
    top: 15px;
    left: 15px;
}

.payment-method-card label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
    padding-left: 25px;
}

.payment-method-card i {
    font-size: 1.2rem;
    margin-right: 10px;
    width: 24px;
    text-align: center;
}

.payment-method-card.selected {
    background-color: rgba(78, 115, 223, 0.2);
    border-color: var(--primary-color);
}

/* Hold Sales Styles */
.hold-sale-item {
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.hold-sale-item:hover {
    background-color: rgba(246, 194, 62, 0.1);
}

.hold-sale-item .hold-time {
    color: #6c757d;
    font-size: 0.8rem;
}

.hold-sale-item .hold-total {
    font-weight: bold;
    color: var(--primary-color);
}

/* Receipt Styles Improvements */
.receipt {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Courier New', Courier, monospace;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}

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

.receipt-header h5 {
    font-weight: bold;
    margin-bottom: 5px;
}

.receipt-items {
    margin-bottom: 15px;
}

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

.receipt-subtotal,
.receipt-tax,
.receipt-discount {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.receipt-total {
    border-top: 1px dashed #000;
    padding-top: 10px;
    margin-top: 5px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
}

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

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    border-top: 1px dashed #000;
    padding-top: 10px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .product-card .card-img-top {
        height: 140px;
    }
    
    .category-nav {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .category-nav::-webkit-scrollbar {
        height: 4px;
    }
    
    .category-nav::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 4px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        height: auto;
        position: relative;
        width: 100%;
    }
    
    .sidebar .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .sidebar .nav-pills {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
    }
    
    .sidebar .nav-item {
        margin-right: 5px;
    }
    
    .product-card .card-img-top {
        height: 120px;
    }
    
    .dropdown {
        display: none;
    }
    
    .cart-items-container {
        max-height: 250px !important;
    }
}

@media (max-width: 768px) {
    .cart-section {
        margin-top: 20px;
    }
    
    .product-card .card-img-top {
        height: 160px;
    }
    
    .modal-dialog.modal-lg {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .payment-methods .col-md-6 {
        margin-bottom: 10px;
    }
    
    .cart-items-container {
        max-height: 200px !important;
    }
    
    .navbar-nav {
        flex-direction: row;
    }
    
    .navbar-nav .nav-item {
        margin-right: 10px;
    }
}

@media (max-width: 576px) {
    .product-card .card-img-top {
        height: 130px;
    }
    
    .category-nav .nav-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .row-cols-2 {
        --bs-gutter-x: 0.5rem;
    }
    
    .card-footer .btn {
        font-size: 0.85rem;
        padding: 0.375rem 0.5rem;
    }
    
    .card-footer .btn i {
        margin-right: 3px;
    }
    
    .cart-items-container {
        max-height: 180px !important;
    }
    
    .receipt {
        max-width: 100%;
        padding: 10px;
    }
}

@media (max-width: 400px) {
    .product-card .card-title {
        font-size: 0.9rem;
    }
    
    .product-card .product-price {
        font-size: 0.85rem;
    }
    
    .card-footer .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }
    
    .card-footer .btn i {
        font-size: 0.8rem;
    }
}