/* Main CSS for PANORAMA Admin Panel */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Table Styles - Common for Vehicles and Users */
.vehicles-table, .users-table {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow-x: auto;
}

.vehicles-table table, .users-table table {
    width: 100%;
    border-collapse: collapse;
}

.vehicles-table th, .users-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #eee;
}

.vehicles-table td, .users-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Vehicle Info Styles */
.vehicle-info {
    display: flex;
    align-items: center;
}

.vehicle-thumbnail {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 10px;
}

.vehicle-details {
    display: flex;
    flex-direction: column;
}

.vehicle-name {
    font-weight: 500;
    margin-bottom: 3px;
}

.vehicle-specs {
    font-size: 12px;
    color: #666;
}

/* User Info Styles */
.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #666;
    font-size: 18px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    margin-bottom: 3px;
}

.user-type {
    font-size: 12px;
    color: #666;
}

.user-type.admin-type {
    color: #FF0000;
}

.user-contact {
    display: flex;
    flex-direction: column;
}

.user-email, .user-phone {
    font-size: 13px;
    color: #666;
}

/* Status Styles */
.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status.available, .status.active {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.status.booked {
    background-color: rgba(25, 118, 210, 0.1);
    color: #1976D2;
}

.status.maintenance, .status.blocked {
    background-color: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.status.inactive {
    background-color: rgba(158, 158, 158, 0.1);
    color: #757575;
}

/* Search Container */
.search-container {
    position: relative;
}

.search-input {
    padding: 8px 15px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    width: 250px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Add Button */
.add-btn {
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.add-btn i {
    margin-right: 8px;
}

/* Filters */
.filters-container {
    display: flex;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px;
    margin-bottom: 20px;
    align-items: center;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    margin-right: 10px;
    font-size: 14px;
    color: #666;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.filter-btn {
    margin-left: auto;
    background-color: #FF0000;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.filter-btn i {
    margin-right: 8px;
}

/* User Tabs */
.user-tabs {
    display: flex;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.user-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.user-tab.active {
    background-color: rgba(255, 0, 0, 0.05);
    border-bottom-color: #FF0000;
}

.user-label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.user-count {
    display: inline-block;
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

.user-tab.active .user-count {
    background-color: #FF0000;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.pagination-btn.active {
    background-color: #FF0000;
    color: white;
    border-color: #FF0000;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Admin User in Header */
.admin-user i.fa-user-circle {
    font-size: 30px;
    color: white;
    margin-right: 10px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Enhanced Responsive Styles */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .vehicles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .admin-nav {
        gap: 15px;
    }
    
    .admin-nav-link {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .admin-name {
        display: none;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .admin-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: #000000;
        flex-direction: column;
        padding: 20px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .admin-nav.active {
        left: 0;
    }
    
    .admin-nav-link {
        width: 100%;
        padding: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group {
        width: 100%;
        margin-bottom: 10px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group label {
        margin-bottom: 5px;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .filter-btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
    }
    
    .user-tabs {
        flex-direction: column;
    }
    
    .user-tab {
        border-bottom: 1px solid #eee;
        border-left: 3px solid transparent;
    }
    
    .user-tab.active {
        border-left-color: #FF0000;
        border-bottom-color: #eee;
    }
    
    /* Responsive Tables */
    .vehicles-table, .users-table, .bookings-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Card View for Mobile Tables */
    .vehicles-table tbody tr, .users-table tbody tr, .bookings-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
    }
    
    .vehicles-table thead, .users-table thead, .bookings-table thead {
        display: none;
    }
    
    .vehicles-table td, .users-table td, .bookings-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f5f5f5;
        padding: 8px 0;
    }
    
    .vehicles-table td:before, .users-table td:before, .bookings-table td:before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .pagination-info {
        text-align: center;
    }
    
    .vehicle-thumbnail {
        width: 40px;
        height: 30px;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    /* Modal Adjustments */
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 0;
    }
    
    .logo {
        height: 35px;
    }
    
    .admin-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .dashboard-header h1 {
        font-size: 20px;
    }
    
    .date-filter, .export-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .stats-card {
        padding: 15px;
    }
    
    .stats-card-value {
        font-size: 22px;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .action-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}
