/* Car Rental Management System Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Sarabun', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar .sidebar-header {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .sidebar-header h4 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.sidebar.collapsed .sidebar-header h4 {
    display: none;
}

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

.sidebar-nav .nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background-color: var(--light-color);
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: 70px;
}

/* Header */
.header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e9ecef;
}

.header .navbar-brand {
    font-weight: bold;
    color: var(--primary-color);
}

/* Content Area */
.content {
    padding: 2rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
}

/* Dashboard Stats Cards */
.stats-card {
    border-radius: 15px;
    padding: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    transition: transform 0.3s ease;
}

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

.stats-card.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
}

.stats-card.info {
    background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
}

.stats-card .icon {
    font-size: 3rem;
    opacity: 0.3;
    float: right;
    margin-top: -10px;
}

.stats-card .number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

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

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Status Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.badge.status-available {
    background-color: var(--success-color);
}

.badge.status-rented {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.badge.status-maintenance {
    background-color: var(--danger-color);
}

.badge.status-inactive {
    background-color: var(--secondary-color);
}

.badge.status-pending {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.badge.status-confirmed {
    background-color: var(--info-color);
}

.badge.status-ongoing {
    background-color: var(--primary-color);
}

.badge.status-completed {
    background-color: var(--success-color);
}

.badge.status-cancelled {
    background-color: var(--danger-color);
}

.badge.status-paid {
    background-color: var(--success-color);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
    border: none;
    color: var(--dark-color);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%);
    border: none;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 0.75rem;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box .form-control {
    padding-left: 3rem;
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    z-index: 10;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Calendar Styles */
.fc {
    font-family: inherit;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 600;
}

.fc-event {
    border-radius: 5px;
    padding: 2px 5px;
    font-size: 0.8rem;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 1px solid #e9ecef;
    color: var(--primary-color);
}

.page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Print Styles */
@media print {
    .sidebar,
    .header,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content {
        padding: 1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

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

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

/* Custom Alert */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem 1rem;
}

/* Login Page */
.min-vh-100 {
    min-height: 100vh;
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
}

/* File Upload */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border: 2px dashed #e9ecef;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

.file-upload input[type="file"] {
    position: absolute;
    left: -9999px;
}

/* Car Image */
.car-image {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}