/* Improved styles for POS System */

/* Global styles */
body {
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login styles */
.login-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-card {
    border-radius: 0.8rem;
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.18);
    border: none;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.8rem 2.5rem 0 rgba(58, 59, 69, 0.22);
}

/* Logo animation */
.navbar-brand .fa-cash-register {
    animation: pulse 2s infinite;
    color: #ffffff;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Navbar customization */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    padding: 0.75rem 1rem;
}

.navbar .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.35rem;
    margin: 0 0.125rem;
    transition: all 0.2s;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    font-weight: 500;
}

/* Card styles */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

.card-header h5, .card-header .h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Stats cards */
.stats-card {
    border-left: 0.25rem solid;
    border-radius: 0.5rem;
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-3px);
}

.stats-card .card-body {
    padding: 1.25rem;
}

.stats-card-primary { border-left-color: #4e73df; }
.stats-card-success { border-left-color: #1cc88a; }
.stats-card-info { border-left-color: #36b9cc; }
.stats-card-warning { border-left-color: #f6c23e; }
.stats-card-danger { border-left-color: #e74a3b; }

/* Form elements */
.form-control, .form-select {
    padding: 0.6rem 0.75rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Button styles */
.btn {
    border-radius: 0.35rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(78, 115, 223, 0.4);
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(28, 200, 138, 0.4);
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #d52a1a;
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(231, 74, 59, 0.4);
}

/* Table styles */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fc;
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fc;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    margin-bottom: 1rem;
    color: #6c757d;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.35rem;
    margin: 0 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4e73df;
    border-color: #4e73df;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #eaecf4;
    border-color: #eaecf4;
    color: #333 !important;
}

/* Transaction dashboard improvements */
.input-group-text {
    background-color: #f8f9fc;
    border-color: #e3e6f0;
}

/* Cart table */
#cartTable {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    overflow: hidden;
}

#cartTable thead th {
    border-top: none;
}

/* Transaction summary card */
.transaction-summary {
    position: sticky;
    top: 1rem;
}

/* Product search modal */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.modal-header {
    background-color: #f8f9fc;
    border-bottom-color: #e3e6f0;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    padding: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
    }
    
    .stats-card .h3 {
        font-size: 1.5rem;
    }
}