/* Work Orders Custom Styles */

/* Fix for footer overlap */
.work-orders-wrapper {
    min-height: calc(100vh - 200px);
    padding-bottom: 80px;
}

/* Hero Section Enhancements */
.work-order-hero {
    background: linear-gradient(135deg, #1a4b84 0%, #2a5c96 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.work-order-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.work-order-hero .hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.1;
    width: 50%;
    max-width: 600px;
}

/* Stats Cards */
.stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 20px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Featured Section */
.featured-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    position: relative;
    padding: 60px 0;
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(255,215,0,0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Work Order Cards */
.work-order-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.work-order-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.work-order-card .card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.work-order-card .urgency-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.urgency-badge.urgent {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
    color: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.urgency-badge.soon {
    background: linear-gradient(135deg, #ff9f43 0%, #ffc048 100%);
    color: white;
}

.urgency-badge.flexible {
    background: linear-gradient(135deg, #10ac84 0%, #1dd1a1 100%);
    color: white;
}

/* Route Display */
.route-display {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 10px 15px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.route-display .route-icon {
    color: #1a4b84;
    font-size: 1.2rem;
}

.route-display .route-text {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.route-display .distance {
    background: #1a4b84;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Earnings Display */
.earnings-card {
    background: linear-gradient(135deg, #00d2d3 0%, #01a3a4 100%);
    color: white;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.earnings-card .amount {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 5px 0;
}

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

/* Filter Section */
.filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px 0;
    border-bottom: 3px solid #1a4b84;
}

.filter-select, .filter-input {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus, .filter-input:focus {
    border-color: #1a4b84;
    box-shadow: 0 0 0 3px rgba(26,75,132,0.1);
    outline: none;
}

.filter-btn {
    background: linear-gradient(135deg, #1a4b84 0%, #2a5c96 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26,75,132,0.3);
}

/* Apply Modal Enhancements */
.modal-content {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #1a4b84 0%, #2a5c96 100%);
    padding: 25px 30px;
    border: none;
}

.modal-body {
    padding: 30px;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #1a4b84;
    box-shadow: 0 0 0 3px rgba(26,75,132,0.1);
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* Success Alert */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00d2d3 0%, #01a3a4 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,210,211,0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 10px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Detail Page Enhancements */
.detail-hero {
    background-size: cover;
    background-position: center;
    min-height: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

.detail-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26,75,132,0.9) 0%, rgba(42,92,150,0.7) 100%);
}

.detail-hero-content {
    position: relative;
    z-index: 1;
    color: white;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.info-card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a4b84 0%, #2a5c96 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.share-btn.copy-link {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .work-order-hero {
        padding: 60px 0;
    }

    .work-order-card {
        margin-bottom: 20px;
    }

    .filter-section .row > div {
        margin-bottom: 10px;
    }

    .detail-hero {
        min-height: 200px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .share-buttons, .apply-section {
        display: none !important;
    }

    .work-orders-wrapper {
        padding-bottom: 0;
    }
}

/* Pagination */
.pagination {
    margin-top: 40px;
}

.page-link {
    border: none;
    background: white;
    color: #1a4b84;
    padding: 10px 15px;
    margin: 0 5px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: linear-gradient(135deg, #1a4b84 0%, #2a5c96 100%);
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #1a4b84 0%, #2a5c96 100%);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #6c757d;
    margin-bottom: 10px;
}

.empty-state p {
    color: #adb5bd;
}