:root {
    --bg-color: #ffffff;
    --text-color: #212529;
    --sidebar-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --navbar-bg: #0d6efd; /* Bootstrap blue */
    --table-bg: #ffffff;
    --table-striped-bg: #f8f9fa;
    --table-border: #e9ecef;
    --link-color: #0d6efd; /* primary blue accents */
    --muted-text: #6c757d;
    --shadow-color: rgba(13, 110, 253, 0.08);
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 var(--shadow-color);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: var(--table-striped-bg);
    color: var(--link-color);
}

.sidebar .nav-link.active {
    background-color: var(--table-striped-bg);
    color: var(--link-color);
}

.card {
    margin-bottom: 20px;
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.navbar {
    background-color: var(--navbar-bg) !important;
}

.table {
    background-color: var(--table-bg);
    color: var(--text-color);
    border-color: var(--table-border);
}

.table th,
.table td {
    border-color: var(--table-border);
    color: var(--text-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--table-striped-bg);
}

.table-hover tbody tr:hover {
    background-color: var(--table-striped-bg);
}

.text-muted {
    color: var(--muted-text) !important;
}

a {
    color: var(--link-color);
}

a:hover {
    color: var(--link-color);
    opacity: 0.8;
}

.border-bottom {
    border-color: var(--border-color) !important;
}

/* POS Search Results Styles */
#search-results {
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: var(--card-bg);
    box-shadow: 0 0.5rem 1rem var(--shadow-color);
    z-index: 1000;
}

#search-results .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease;
}

#search-results .list-group-item:hover {
    background-color: var(--table-striped-bg);
}

#search-results .list-group-item mark {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 0.2rem;
}

#search-results .badge {
    font-size: 0.875rem;
}

/* Enhanced Cart Design */
.cart-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

.cart-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.cart-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.cart-card .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.cart-card .card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

.cart-card .card-header .badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.cart-card .card-header .btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-card .card-header .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.cart-items-container {
    max-height: 400px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.cart-items-container::-webkit-scrollbar {
    width: 6px;
}

.cart-items-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.cart-items-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2 0%, #667eea 100%);
}

.empty-cart-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin: 1rem;
}

.empty-cart-icon {
    width: 4rem;
    height: 4rem;
    color: #6c757d;
    stroke-width: 1.2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.empty-cart-state h6 {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.empty-cart-state p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.cart-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    margin: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(102, 126, 234, 0.3);
}

.cart-item:hover::before {
    opacity: 1;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1rem 0.75rem;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.375rem;
    line-height: 1.4;
    flex: 1;
    margin-right: 0.5rem;
}

.cart-item-details {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.3;
}

.cart-item-remove {
    padding: 0.5rem;
    border: none;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.cart-item-remove:hover {
    background: linear-gradient(135deg, #ee5a52 0%, #dc4545 100%);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.remove-icon {
    width: 1rem;
    height: 1rem;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(248, 249, 250, 0.5);
}

.quantity-controls {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 25px;
    padding: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.quantity-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 50%;
    color: #6c757d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quantity-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-display {
    font-weight: 700;
    color: #212529;
    min-width: 3rem;
    text-align: center;
    font-size: 1rem;
    color: #495057;
}

.cart-item-total {
    text-align: right;
}

.item-total-price {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

.cart-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

.summary-label {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.85rem;
}

.summary-value {
    font-weight: 700;
    color: #212529;
    font-size: 0.9rem;
}

.discount-row .summary-value {
    color: #dc3545;
    font-weight: 800;
}

.total-row {
    font-size: 1.1rem;
    margin-bottom: 0;
    padding: 0.5rem 0;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
}

.total-row .summary-label {
    font-size: 1rem;
    font-weight: 800;
    color: #212529;
}

.total-row .summary-value {
    font-size: 1.3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-actions .btn {
    font-weight: 700;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.cart-actions .btn::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;
}

.cart-actions .btn:hover::before {
    left: 100%;
}

.cart-actions .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.cart-actions .btn-success:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.cart-actions .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.cart-actions .btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.cart-actions .btn-outline-secondary {
    background: white;
    border: 2px solid #6c757d;
    color: #6c757d;
}

.cart-actions .btn-outline-secondary:hover {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.cart-actions .btn i {
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-card {
        margin: 0.5rem;
        border-radius: 12px;
    }

    .cart-item-header {
        padding: 0.75rem 0.75rem 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .cart-item-footer {
        padding: 0.5rem 0.75rem 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .cart-item-total {
        text-align: left;
    }

    .quantity-controls {
        justify-content: center;
    }

    .cart-summary {
        padding: 1rem;
    }

    .summary-row {
        font-size: 0.85rem;
    }

    .total-row .summary-value {
        font-size: 1.1rem;
    }

    .cart-actions {
        padding: 1rem;
    }

    .cart-actions .btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
}

.cart-item-remove {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: #dc3545;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background-color: #f8d7da;
    color: #721c24;
}

.remove-icon {
    width: 1rem;
    height: 1rem;
}

.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem 0.75rem;
    border-top: 1px solid #f8f9fa;
}

.quantity-controls {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.25rem;
}

.quantity-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 0.25rem;
    color: #6c757d;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.quantity-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-display {
    font-weight: 600;
    color: #212529;
    min-width: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.cart-item-total {
    text-align: right;
}

.item-total-price {
    font-size: 1rem;
    font-weight: 700;
    color: #28a745;
}

.cart-summary {
    background: white;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.summary-label {
    color: #6c757d;
    font-weight: 500;
}

.summary-value {
    font-weight: 600;
    color: #212529;
}

.discount-row .summary-value {
    color: #dc3545;
}

.total-row {
    font-size: 1rem;
    margin-bottom: 0;
}

.total-row .summary-value {
    font-size: 1.1rem;
}

.cart-actions {
    background: #f8f9fa;
}

.cart-actions .btn {
    font-weight: 600;
    border-radius: 0.375rem;
}

.cart-actions .btn i {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-item-header {
        padding: 0.5rem 0.5rem 0.25rem;
    }

    .cart-item-footer {
        padding: 0.25rem 0.5rem 0.5rem;
    }

    .cart-item-name {
        font-size: 0.85rem;
    }

    .quantity-controls {
        padding: 0.125rem;
    }

    .quantity-btn {
        width: 1.75rem;
        height: 1.75rem;
        padding: 0.125rem 0.25rem;
    }

    .quantity-display {
        font-size: 0.8rem;
        min-width: 1.5rem;
    }
}

/* Cart Animations */
.cart-item.removing {
    animation: slideOutRight 0.3s ease-out forwards;
    opacity: 0;
}

.quantity-btn.btn-clicked {
    animation: buttonPress 0.15s ease-out;
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100px);
        opacity: 0;
    }
}

@keyframes buttonPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Smooth transitions for cart updates */
.cart-items-container {
    transition: all 0.3s ease;
}

.cart-item {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Currency Settings Styles */
.currency-calculator {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.currency-calculator .form-group {
    margin-bottom: 1.5rem;
}

.currency-calculator .input-group-text {
    background-color: #007bff;
    color: white;
    border: none;
}

.currency-calculator #calculated-rate {
    font-weight: bold;
    font-size: 1.1em;
    color: #28a745;
}

#current-rate-display {
    animation: slideInUp 0.5s ease-out;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.1);
}

#current-rate-display .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

#current-rate-display .bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    transition: transform 0.2s ease;
}

#current-rate-display .bg-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#current-rate-display h2 {
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#current-rate-display .alert-info {
    border-left: 4px solid #17a2b8;
}