:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
}

.login-card .fa-gas-pump {
    color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - 56px);
    background-color: #2c3e50;
    color: white;
    position: fixed;
    top: 56px;
    left: 0;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 999;
}

.sidebar-header {
    padding: 20px;
    background-color: #1a252f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-section {
    padding: 15px 20px 10px;
    font-size: 12px;
    text-transform: uppercase;
    color: #95a5a6;
    font-weight: 600;
    letter-spacing: 1px;
}

.menu-link {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
}

.menu-link:hover {
    background-color: #34495e;
    color: white;
    padding-left: 25px;
}

.menu-link.active {
    background-color: var(--primary-color);
    color: white;
    border-left: 4px solid white;
}

.menu-link i {
    width: 20px;
    margin-right: 10px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    width: calc(100% - var(--sidebar-width));
    min-height: calc(100vh - 56px);
}

/* Dashboard Cards */
.stat-card {
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-card .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

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

.bg-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* Cards */
.content-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-card .card-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.content-card .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* Tables */
.table-responsive {
    margin-top: 20px;
}

.table {
    background: white;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #495057;
}

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

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.875rem;
}

.btn-action {
    margin-right: 5px;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Sales Entry Specific */
.pump-reading-row {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.payment-section {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.payment-section-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.dynamic-row {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
}

.summary-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.summary-item.total {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.status-balanced {
    background: var(--success-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
    font-weight: bold;
}

.status-difference {
    background: var(--warning-color);
    color: #000;
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-block;
    font-weight: bold;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Modal Customization */
.modal-header {
    background-color: var(--primary-color);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* Charts */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Status Indicators */
.status-active {
    color: var(--success-color);
}

.status-inactive {
    color: var(--danger-color);
}

.status-blocked {
    color: var(--warning-color);
}
