/* Fleet Management Specific Styles */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: var(--font-size-page-title);
    margin-bottom: 0.25rem;
}

.page-header p {
    font-size: var(--font-size-secondary);
    color: #666;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #0070f2;
}

.filter-group {
    display: flex;
    gap: 1rem;
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-group select:focus {
    outline: none;
    border-color: #0070f2;
}

/* Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.vehicle-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.vehicle-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.vehicle-body {
    padding: 1.5rem;
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.vehicle-title {
    flex: 1;
}

.vehicle-title h3 {
    font-size: 1.25rem;
    color: #0F084B;
    margin-bottom: 0.25rem;
}

.vehicle-title .plate {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.vehicle-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.vehicle-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.info-item .icon {
    font-size: 1.1rem;
}

.vehicle-price {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 1rem;
}

.vehicle-price .amount {
    font-size: 1.75rem;
    font-weight: bold;
    color: #0070f2;
}

.vehicle-price .label {
    font-size: 0.85rem;
    color: #666;
}

.vehicle-actions {
    display: flex;
    gap: 0.5rem;
}

.vehicle-actions button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-edit {
    background: #0070f2;
    color: white;
}

.btn-edit:hover {
    background: #0052cc;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Loading & Empty States */
.loading-message, .empty-message {
    text-align: center;
    padding: 3rem;
    color: #666;
    grid-column: 1 / -1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    border-color: #0070f2;
    color: #0070f2;
}

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

.pagination .page-info {
    padding: 0.5rem 1rem;
    color: #666;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-small {
    max-width: 500px;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #0F084B;
    font-size: 1.5rem;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-section.full-width {
    grid-column: 1 / -1;
}

.form-section h3 {
    color: #0F084B;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: var(--font-size-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: var(--font-size-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0070f2;
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.warning {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        flex-direction: column;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-group select {
        width: 100%;
    }
}


/* Photo Gallery Styles */
.upload-section {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.upload-hint {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.photo-btn.primary {
    background: #0070f2;
    color: white;
}

.photo-btn.danger {
    background: #dc3545;
    color: white;
}

.primary-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.vehicle-actions {
    display: flex;
    gap: 0.5rem;
}

.vehicle-actions button {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.2rem;
    transition: background 0.3s;
}

/* Document Management Styles */
.modal-large {
    max-width: 1000px;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.document-card:hover {
    border-color: #0070f2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.document-card.expired {
    border-color: #dc3545;
    background: #fff5f5;
}

.document-card.expiring {
    border-color: #ffc107;
    background: #fffdf5;
}

.document-info {
    flex: 1;
}

.document-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.document-icon {
    font-size: 2rem;
}

.document-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0F084B;
}

.document-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.document-badge.valid {
    background: #d4edda;
    color: #155724;
}

.document-badge.expiring {
    background: #fff3cd;
    color: #856404;
}

.document-badge.expired {
    background: #f8d7da;
    color: #721c24;
}

.document-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.document-detail {
    display: flex;
    flex-direction: column;
}

.document-detail-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.document-detail-value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-view {
    background: #0070f2;
    color: white;
}

.btn-view:hover {
    background: #0052cc;
}

.btn-delete-doc {
    background: #dc3545;
    color: white;
}

.btn-delete-doc:hover {
    background: #c82333;
}

.expiry-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.expiry-warning.critical {
    background: #f8d7da;
    border-color: #dc3545;
}

.form-hint {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Alert Badge for Vehicle Cards */
.alert-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.alert-badge.warning {
    background: #ffc107;
    color: #333;
}

/* Relative positioning for vehicle image container */
.vehicle-image {
    position: relative;
}

.vehicle-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ==========================================
   MAINTENANCE MANAGEMENT - SAP THEME
   ========================================== */

/* Maintenance Actions */
.maintenance-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f7f7f7;
    border-radius: 8px;
}

.maintenance-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

/* Maintenance Tabs - SAP Style */
.maintenance-tabs {
    display: flex;
    gap: 0;
    border-bottom: 3px solid #e5e5e5;
    margin-bottom: 2rem;
    background: white;
}

.tab-btn {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    background: transparent;
    color: #32363a;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    top: 3px;
}

.tab-btn:hover {
    color: #0070f2;
    background: #f7f7f7;
}

.tab-btn.active {
    color: #0070f2;
    background: white;
    border-bottom-color: #0070f2;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Work Order Card - SAP Fiori Style */
.work-order-card {
    background: white;
    border: 1px solid #d9d9d9;
    border-left: 4px solid #0070f2;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.work-order-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.work-order-card.urgent {
    border-left-color: #bb0000;
    background: #fff5f5;
}

.work-order-card.high {
    border-left-color: #e9730c;
    background: #fffaf5;
}

.work-order-card.medium {
    border-left-color: #0070f2;
}

.work-order-card.low {
    border-left-color: #107e3e;
}

.work-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.work-order-title {
    flex: 1;
}

.work-order-number {
    font-size: 1.15rem;
    font-weight: 700;
    color: #32363a;
    margin-bottom: 0.25rem;
    font-family: '72', -apple-system, BlinkMacSystemFont, sans-serif;
}

.work-order-type {
    color: #6a6d70;
    font-size: 0.9rem;
    font-weight: 500;
}

.work-order-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Priority Badges - SAP Status Colors */
.priority-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.priority-badge.urgent {
    background: #bb0000;
    color: white;
}

.priority-badge.high {
    background: #e9730c;
    color: white;
}

.priority-badge.medium {
    background: #0070f2;
    color: white;
}

.priority-badge.low {
    background: #107e3e;
    color: white;
}

/* Status Badges - SAP Object Status */
.status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.pending {
    background: #fff3b8;
    color: #8a6116;
    border: 1px solid #e9d700;
}

.status-badge.in-progress {
    background: #d1efff;
    color: #0070f2;
    border: 1px solid #89caff;
}

.status-badge.completed {
    background: #e5f4e5;
    color: #107e3e;
    border: 1px solid #72bf44;
}

.work-order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: #fafafa;
    border-radius: 4px;
}

.work-order-detail {
    display: flex;
    flex-direction: column;
}

.work-order-detail-label {
    font-size: 0.75rem;
    color: #6a6d70;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.work-order-detail-value {
    font-size: 1rem;
    color: #32363a;
    font-weight: 600;
}

.work-order-description {
    background: white;
    padding: 1rem;
    border-left: 3px solid #0070f2;
    border-radius: 4px;
    margin: 1rem 0;
    color: #32363a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.work-order-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.btn-icon {
    padding: 0.65rem 1.25rem;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    background: white;
}

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

.btn-icon.btn-primary {
    background: #0070f2;
    color: white;
    border-color: #0070f2;
}

.btn-icon.btn-primary:hover {
    background: #0064d9;
}

.btn-delete-doc {
    background: white;
    color: #bb0000;
    border-color: #bb0000;
}

.btn-delete-doc:hover {
    background: #bb0000;
    color: white;
}

/* Service Log Card - SAP Fiori Style */
.service-log-card {
    background: white;
    border: 1px solid #d9d9d9;
    border-left: 4px solid #107e3e;
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.service-log-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.service-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.service-log-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #32363a;
    font-family: '72', -apple-system, BlinkMacSystemFont, sans-serif;
}

.service-log-date {
    color: #6a6d70;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.service-log-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    padding: 1.25rem;
    background: #fafafa;
    border-radius: 4px;
}

/* Cost Summary - SAP Analytical Cards */
.cost-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cost-stat-card {
    background: linear-gradient(135deg, #0070f2 0%, #0052cc 100%);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,112,242,0.2);
    transition: all 0.3s;
}

.cost-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,112,242,0.3);
}

.cost-stat-card:nth-child(2) {
    background: linear-gradient(135deg, #107e3e 0%, #0d6b35 100%);
    box-shadow: 0 4px 12px rgba(16,126,62,0.2);
}

.cost-stat-card:nth-child(2):hover {
    box-shadow: 0 8px 20px rgba(16,126,62,0.3);
}

.cost-stat-card:nth-child(3) {
    background: linear-gradient(135deg, #e9730c 0%, #c96100 100%);
    box-shadow: 0 4px 12px rgba(233,115,12,0.2);
}

.cost-stat-card:nth-child(3):hover {
    box-shadow: 0 8px 20px rgba(233,115,12,0.3);
}

.cost-stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    font-family: '72', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cost-stat-label {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cost-breakdown {
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cost-breakdown h3 {
    margin: 0 0 1.5rem 0;
    color: #32363a;
    font-size: 1.25rem;
    font-weight: 700;
    padding-bottom: 1rem;
    border-bottom: 2px solid #0070f2;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e5e5;
    transition: background 0.2s;
}

.cost-item:hover {
    background: #fafafa;
    margin: 0 -1rem;
    padding: 1rem 1rem;
}

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

.cost-item-label {
    color: #32363a;
    font-weight: 600;
    font-size: 0.95rem;
}

.cost-item-value {
    font-weight: 700;
    color: #0070f2;
    font-size: 1.05rem;
}

/* Empty State */
.empty-message {
    text-align: center;
    padding: 3rem;
    color: #6a6d70;
    font-size: 1rem;
}

/* Loading Message */
.loading-message {
    text-align: center;
    padding: 3rem;
    color: #6a6d70;
    font-size: 1rem;
}

/* Modal Large Size */
.modal-large {
    max-width: 1100px;
}

/* Form Styling Updates for SAP Theme */
.maintenance-tabs ~ .tab-content .form-group label {
    color: #32363a;
    font-weight: 600;
    font-size: 0.9rem;
}

.maintenance-tabs ~ .tab-content input,
.maintenance-tabs ~ .tab-content select,
.maintenance-tabs ~ .tab-content textarea {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

.maintenance-tabs ~ .tab-content input:focus,
.maintenance-tabs ~ .tab-content select:focus,
.maintenance-tabs ~ .tab-content textarea:focus {
    border-color: #0070f2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,112,242,0.1);
}