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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent text size adjustment on mobile */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Login Screen */
#loginScreen.active {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    /* Prevent zoom on iOS when focusing inputs */
    font-size: max(1rem, 16px);
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    /* Improve touch target size on mobile */
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    user-select: none;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

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

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

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
}

.login-footer {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

/* Navigation */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 250px;
    background: #34495e;
    color: white;
    padding: 1rem 0;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: #2c3e50;
    color: white;
    border-right: 3px solid #3498db;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Content Sections */
.content-section {
    display: none;
}

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

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

.section-header h2 {
    color: #2c3e50;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card-review {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #f39c12;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-card-review .stat-icon {
    color: #f39c12;
}

.stat-card-review .stat-info h3 {
    color: #d68910;
    font-weight: bold;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: #e74c3c;
}

.stat-card:nth-child(2) .stat-icon {
    background: #f39c12;
}

.stat-card:nth-child(3) .stat-icon {
    background: #27ae60;
}

.stat-card:nth-child(4) .stat-icon {
    background: #3498db;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Recent Activity */
.recent-activity {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recent-activity h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.activity-list {
    max-height: calc(100vh - 450px);
    min-height: 300px;
    overflow-y: auto;
}

/* Services */
.services-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.services-filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.services-list {
    display: grid;
    gap: 1rem;
}

.service-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

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

.service-info h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.service-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

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

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-verified {
    background: #d4edda;
    color: #28a745;
}

.verified-badge {
    background: #d4edda;
    color: #28a745;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Review Notifications System */
.review-notifications {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-header {
    color: #856404;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-header i {
    color: #f39c12;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.review-notification-item {
    background: white;
    border: 1px solid #f1c40f;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.review-notification-item:hover {
    border-color: #f39c12;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2);
    transform: translateY(-1px);
}

.review-notification-item:last-child {
    margin-bottom: 0;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-weight: 500;
}

.notification-details {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.notification-actions {
    flex-shrink: 0;
    margin-left: 1rem;
}

.notification-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-all-reviews {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #f1c40f;
    margin-top: 1rem;
}

.view-all-reviews .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: all 0.2s;
}

.view-all-reviews .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* General Activity Section */
.general-activity {
    margin-top: 1rem;
}

.activity-header {
    color: #495057;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.activity-item:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

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

.activity-item p {
    margin: 0 0 0.25rem 0;
    color: #333;
}

.activity-item small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Activity Type Styling */
.activity-completed {
    border-left: 3px solid #28a745;
    padding-left: 0.75rem;
}

.activity-assigned {
    border-left: 3px solid #007bff;
    padding-left: 0.75rem;
}

.activity-created {
    border-left: 3px solid #6c757d;
    padding-left: 0.75rem;
}

.review-needed {
    background: #d4edda;
    color: #155724;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Review Services List Modal */
.review-services-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #f8f9fa;
}

.review-service-item {
    background: white;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
    transition: background-color 0.2s;
}

.review-service-item:hover {
    background-color: #f8f9fa;
}

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

.review-service-item .service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.review-service-item .service-info {
    flex: 1;
}

.review-service-item .service-info h5 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.review-service-item .service-info p {
    margin: 0.25rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.review-service-item .service-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.review-service-item .service-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.review-service-item .service-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive Design for Notifications */
@media (max-width: 768px) {
    .review-notification-item {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .notification-actions {
        margin-left: 0;
        text-align: center;
    }
    
    .notification-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .review-service-item .service-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .review-service-item .service-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .review-service-item .service-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Enhanced notification animations */
.review-notifications {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-notification-item {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Technician Dashboard */
.technician-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.tech-header h2 {
    color: #2c3e50;
}

.date-filter input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.tech-services-list {
    display: grid;
    gap: 1.5rem;
}

.tech-service-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tech-service-header {
    background: #34495e;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-service-body {
    padding: 1.5rem;
}

.task-list {
    margin-top: 1rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
}

.task-item.completed {
    background: #d4edda;
    border-color: #c3e6cb;
}

.task-checkbox {
    width: 18px;
    height: 18px;
}

.task-description {
    flex: 1;
}

.task-time {
    font-size: 0.8rem;
    color: #666;
}

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

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

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    color: #2c3e50;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

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

.loading-spinner.active {
    display: flex;
}

/* Task checklist styles */
.tasks-checklist {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background: #f9f9f9;
}

.task-checkbox-item {
    margin-bottom: 8px;
    padding: 8px;
    background: white;
    border-radius: 3px;
    border: 1px solid #eee;
}

.task-checkbox-item label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.task-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
}

.task-description {
    flex: 1;
    font-size: 0.95rem;
}

.task-hours {
    color: #666;
    font-size: 0.85rem;
    margin-left: 10px;
    font-style: italic;
}

.no-tasks-available {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.no-tasks-available i {
    color: #ffc107;
    margin-right: 8px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-spinner p {
    color: white;
    font-size: 1.1rem;
}

/* Mobile FAB and Overlay */
.mobile-fab {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #3498db;
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.19);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.mobile-fab:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.mobile-fab:active {
    transform: scale(0.95);
}

.mobile-fab.active {
    background: #e74c3c;
}

.mobile-fab.active i::before {
    content: "\f00d"; /* Font Awesome times/close icon */
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Login screen */
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    /* Navigation */
    .navbar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    .nav-user {
        flex-direction: row;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .nav-user .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* Dashboard layout */
    .dashboard-container {
        flex-direction: column;
    }

    /* Mobile FAB Display */
    .mobile-fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Sidebar - Slide-in from left */
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        padding: 1rem 0;
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    }

    .sidebar.active {
        left: 0;
    }

    .nav-menu li {
        margin-bottom: 0.25rem;
    }

    .nav-link {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .main-content {
        order: 1;
        padding: 1rem;
        width: 100%;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    .stat-info p {
        font-size: 0.85rem;
    }

    /* Section headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .section-header > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .section-header .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Filters */
    .services-filters {
        flex-direction: column;
        gap: 0.75rem;
    }

    .services-filters select {
        width: 100%;
        padding: 0.75rem;
    }

    /* Service cards */
    .service-card {
        padding: 1rem;
    }

    .service-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .service-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .service-actions .btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    /* Technician dashboard */
    .tech-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tech-header h2 {
        font-size: 1.3rem;
    }

    .date-filter {
        width: 100%;
    }

    .date-filter input {
        width: 100%;
        padding: 0.75rem;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 95vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Forms */
    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-control {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Service info grid */
    .service-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Tables and lists */
    .service-type-item,
    .service-task-item {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        padding: 1rem;
    }

    .service-type-actions,
    .service-task-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .service-type-actions .btn,
    .service-task-actions .btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    /* Customer/User cards */
    .customer-card,
    .user-card {
        padding: 1rem;
    }

    .customer-header,
    .user-header {
        flex-direction: column;
        gap: 1rem;
    }

    .customer-actions,
    .user-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .customer-actions .btn,
    .user-actions .btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    /* Further optimizations for very small screens */
    .login-container {
        padding: 1rem;
    }

    .navbar {
        padding: 0.5rem;
    }

    .nav-brand {
        font-size: 1rem;
    }

    .nav-brand img {
        max-height: 30px;
    }

    .nav-user {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.5rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    .stat-info h3 {
        font-size: 1.3rem;
    }

    .service-card,
    .customer-card,
    .user-card {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .task-item {
        padding: 0.5rem;
    }

    .task-description {
        font-size: 0.85rem;
    }
}

/* Landscape mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .login-container {
        max-width: 500px;
    }

    .modal-content {
        max-height: 85vh;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    /* Prevent zoom on iOS when focusing inputs */
    font-size: max(1rem, 16px);
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Improve scrolling on mobile */
.services-list,
.service-types-list,
.service-tasks-list,
.customer-services-list,
.customer-history-list {
    -webkit-overflow-scrolling: touch;
}

/* Better touch scrolling for modal content */
.modal-content {
    -webkit-overflow-scrolling: touch;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Task Management Styles */
.service-info-section {
    margin-bottom: 2rem;
}

.service-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.info-item span {
    color: #333;
}

.tasks-section {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

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

.tasks-header h4 {
    color: #2c3e50;
    margin: 0;
}

.add-task-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
}

.task-detail-item {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 1rem;
    background: white;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.task-description.completed {
    text-decoration: line-through;
    color: #6c757d;
}

.task-details {
    padding: 1rem;
}

.task-details .form-group {
    margin-bottom: 1rem;
}

.task-details .form-group:last-child {
    margin-bottom: 0;
}

.completion-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.completion-info small {
    color: #6c757d;
    font-size: 0.8rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

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

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

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.no-tasks {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

.no-data {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
}

.error-message {
    text-align: center;
    color: #dc3545;
    padding: 2rem;
}

.error-message p {
    margin-bottom: 1rem;
}

/* Activity Item Styles */
.activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

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

.activity-item p {
    margin: 0 0 0.25rem 0;
    color: #333;
}

.activity-item small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Service Actions */
.service-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.service-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Customer cards */
.customer-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.customer-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.customer-info p {
    margin: 5px 0;
    color: #666;
}

.customer-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* User cards */
.user-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #28a745;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.user-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.user-info p {
    margin: 5px 0;
    color: #666;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.user-role {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.role-manager {
    background-color: #e3f2fd;
    color: #1976d2;
}

.role-technician {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Help text styling */
.help-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

.help-text i {
    margin-right: 5px;
    color: #17a2b8;
}

/* Task item layout for technician view */
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
}

.task-item.completed {
    background: #d4edda;
    border-color: #c3e6cb;
}

.task-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.task-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.task-time-input {
    width: 60px;
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

/* Service Types Management */
.service-types-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.search-container {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.service-types-list {
    max-height: 600px;
    overflow-y: auto;
}

.service-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.service-type-item:hover {
    background-color: #f8f9fa;
}

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

.service-type-info {
    flex: 1;
}

.service-type-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.service-type-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.service-type-tasks {
    margin-top: 0.5rem;
}

.task-count {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.service-type-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.service-type-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Service Type Modal */
.tasks-checklist {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f8f9fa;
}

.task-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.task-checkbox-item:hover {
    background-color: #e9ecef;
}

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

.task-checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

.task-checkbox-item label {
    margin: 0;
    cursor: pointer;
    flex: 1;
    font-size: 0.9rem;
    color: #495057;
}

.task-checkbox-item.selected {
    background-color: #d4edda;
}

.no-service-types {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-service-types i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.no-service-types h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.no-service-types p {
    margin: 0;
}

/* Task search in modal */
.task-search-container {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.task-search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.task-search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.selected-tasks-count {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    text-align: center;
}

/* Service type form styling */
#serviceTypeForm .form-group {
    margin-bottom: 1.5rem;
}

#serviceTypeForm .form-group:last-of-type {
    margin-bottom: 0;
}

#serviceTypeForm label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

#serviceTypeForm input[type="text"],
#serviceTypeForm textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#serviceTypeForm input[type="text"]:focus,
#serviceTypeForm textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#serviceTypeForm textarea {
    resize: vertical;
    min-height: 80px;
}

/* Service Tasks Management */
.service-tasks-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.service-tasks-list {
    max-height: 600px;
    overflow-y: auto;
}

.service-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.service-task-item:hover {
    background-color: #f8f9fa;
}

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

.service-task-info {
    flex: 1;
}

.service-task-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
}

.service-task-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.service-task-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.service-task-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.no-service-tasks {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-service-tasks i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.no-service-tasks h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.no-service-tasks p {
    margin: 0;
}

/* Service Task Modal */
.service-task-modal .modal-content {
    max-width: 600px;
}

.service-task-form .form-group {
    margin-bottom: 1.5rem;
}

.service-task-form .form-group:last-of-type {
    margin-bottom: 0;
}

.service-task-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.service-task-form input[type="text"],
.service-task-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.service-task-form input[type="text"]:focus,
.service-task-form textarea:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.service-task-form textarea {
    resize: vertical;
    min-height: 100px;
}

.task-hours-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.task-hours-info h5 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 0.9rem;
}

.task-hours-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Recurring Service Settings */
.service-info-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.service-info-section .form-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.service-info-section .form-group input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.service-info-section .help-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

.service-info-section .help-text i {
    color: #17a2b8;
    margin-right: 0.5rem;
}

#frequencyGroup {
    transition: all 0.3s ease;
}

#frequencyGroup select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
}

#frequencyGroup select:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Task Preview Section */
.task-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
}

.task-preview p {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-weight: 500;
}

.task-preview ul {
    margin: 0;
    padding-left: 1.5rem;
}

.task-preview li {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Recurring Services Badge */
.service-recurring-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.service-recurring-info {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Customer Services and History Styles */
.customer-services-list,
.customer-history-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #f8f9fa;
}

.customer-service-item,
.customer-history-item {
    background: white;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
    transition: background-color 0.2s;
}

.customer-service-item:hover,
.customer-history-item:hover {
    background-color: #f8f9fa;
}

.customer-service-item:last-child,
.customer-history-item:last-child {
    border-bottom: none;
}

.service-header,
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.service-info,
.history-info {
    flex: 1;
}

.service-info h5,
.history-info h5 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.service-info p,
.history-info p {
    margin: 0.25rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.service-status-actions,
.history-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.service-status-actions .service-status,
.history-actions .service-status {
    margin-bottom: 0.5rem;
}

.customer-actions .btn-info,
.customer-actions .btn-success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.customer-actions .btn-info {
    background-color: #17a2b8;
    color: white;
}

.customer-actions .btn-info:hover {
    background-color: #138496;
    transform: translateY(-1px);
}

.customer-actions .btn-success {
    background-color: #28a745;
    color: white;
}

.customer-actions .btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.customer-actions .btn-info i,
.customer-actions .btn-success i {
    font-size: 0.8rem;
}

/* Responsive adjustments for customer actions */
@media (max-width: 768px) {
    .customer-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .customer-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .customer-actions .btn-info,
    .customer-actions .btn-success {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .service-header,
    .history-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .service-status-actions,
    .history-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
}

/* Empty state styling for customer services/history */
.customer-services-list .no-data,
.customer-history-list .no-data {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

.customer-services-list .no-data i,
.customer-history-list .no-data i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #dee2e6;
    display: block;
}

/* Technician Interface Enhancements */
.tech-service-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tech-service-header-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tech-service-header-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.tech-service-header-actions .btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.tech-service-header-actions .btn-primary i {
    font-size: 0.8rem;
}

/* Collapsible Tasks Section */
.task-section {
    margin-top: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: white;
}

.task-header {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.task-header:hover {
    background: #e9ecef;
}

.task-header h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.task-toggle-icon {
    transition: transform 0.2s;
    color: #6c757d;
    font-size: 0.8rem;
}

.task-toggle-icon.fa-chevron-right {
    transform: rotate(0deg);
}

.task-toggle-icon.fa-chevron-down {
    transform: rotate(0deg);
}

.task-progress {
    margin-left: auto;
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.task-list {
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.task-list[style*="display: none"] {
    max-height: 0;
    padding: 0;
}

.task-list[style*="display: block"] {
    max-height: none;
    padding: 1rem;
}

/* Enhanced Task Items */
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    transition: all 0.2s;
}

.task-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.task-item.completed {
    background: #d4edda;
    border-color: #c3e6cb;
}

.task-item.completed:hover {
    background: #c3e6cb;
}

.task-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.task-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-description {
    flex: 1;
    font-size: 0.9rem;
    color: #495057;
}

.task-item.completed .task-description {
    text-decoration: line-through;
    color: #6c757d;
}

.task-time-input {
    width: 60px;
    padding: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-size: 0.85rem;
}

.task-time-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* No tasks message */
.no-tasks {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    margin: 0;
}

/* Responsive adjustments for technician interface */
@media (max-width: 768px) {
    .tech-service-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .tech-service-header-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .tech-service-header-actions .btn {
        flex: 1;
        justify-content: center;
        max-width: 200px;
    }
    
    .task-item {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .task-left,
    .task-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .task-right {
        border-top: 1px solid #dee2e6;
        padding-top: 0.75rem;
    }
    
    .task-header h5 {
        font-size: 0.9rem;
    }
    
    .task-progress {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Service actions improvements */
.service-actions {
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    margin-top: 1rem;
}

.service-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: all 0.2s;
}

.service-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Task completion animations */
.task-item {
    transition: all 0.3s ease;
}

.task-item.completed {
    animation: taskComplete 0.5s ease;
}

@keyframes taskComplete {
    0% {
        background: #f8f9fa;
        transform: scale(1);
    }
    50% {
        background: #d1ecf1;
        transform: scale(1.02);
    }
    100% {
        background: #d4edda;
        transform: scale(1);
    }
}

/* Improved status indicators */
.service-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-verified {
    background: #d4edda;
    color: #28a745;
}

.verified-badge {
    background: #d4edda;
    color: #28a745;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
