:root {
    --primary: #0056b3;
    --secondary: #003366;
    --accent: #ff6600;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f4f6f9;
    color: #333;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.login-box h2 span {
    color: var(--accent);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--secondary);
}

.error-message {
    color: var(--danger);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Dashboard Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--secondary);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    font-size: 1.3rem;
}

.sidebar-header h3 span {
    color: var(--accent);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    gap: 10px;
    cursor: pointer;
}

.sidebar-menu a i {
    width: 20px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid var(--accent);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.top-bar {
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    color: var(--secondary);
}

.btn-logout {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* Cards */
.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: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary);
    opacity: 0.3;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    background: #f8f9fa;
    color: var(--secondary);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

tr:hover {
    background: #f8f9fa;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: var(--secondary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

/* Badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-new {
    background: #cce5ff;
    color: #004085;
}

.status-read {
    background: #d4edda;
    color: #155724;
}

.status-replied {
    background: #fff3cd;
    color: #856404;
}

/* Loading */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-info {
    background: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Filter tab active states */
.filter-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.filter-btn#filter-all.active {
    background: var(--primary) !important;
    color: white !important;
}

.filter-btn#filter-pending.active {
    background: #ffc107 !important;
    color: white !important;
    border-color: #ffc107 !important;
}

.filter-btn#filter-approved.active {
    background: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.filter-btn#filter-completed.active {
    background: #17a2b8 !important;
    color: white !important;
    border-color: #17a2b8 !important;
}

.filter-btn#filter-cancelled.active {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

/* Hover effects */
.filter-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* Add to your admin CSS file */
.contact-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.contact-link:hover {
    background: rgba(10, 37, 64, 0.1);
    text-decoration: underline;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.whatsapp-btn:hover {
    opacity: 0.9;
}

/* ==================== MOBILE RESPONSIVE FIXES FOR ADMIN PANEL ==================== */

/* Tablet styles (768px - 1024px) */
@media (max-width: 1024px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 10px 0;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 10px;
    }
    
    .sidebar-menu a {
        width: auto;
        min-width: 120px;
        justify-content: center;
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Mobile styles (up to 767px) */
@media (max-width: 767px) {
    .admin-container {
        flex-direction: column;
    }
    
    /* Sidebar becomes top bar */
    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        z-index: 1000;
        padding: 5px 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .sidebar-header {
        display: none;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
        padding: 5px;
    }
    
    .sidebar-menu a {
        width: calc(33.33% - 6px);
        min-width: 0;
        padding: 8px 3px;
        font-size: 0.7rem;
        text-align: center;
        flex-direction: column;
        gap: 3px;
        border-radius: 6px;
    }
    
    .sidebar-menu a i {
        width: auto;
        font-size: 1rem;
        margin-right: 0;
    }
    
    .sidebar-menu a span {
        display: block;
        font-size: 0.6rem;
        line-height: 1.2;
        word-break: break-word;
    }
    
    /* Main content area */
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .page-title {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .btn-logout {
        width: 100%;
        justify-content: center;
    }
    
    /* Stats cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-info h3 {
        font-size: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    /* Tables */
    .table-container {
        padding: 10px;
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    th, td {
        padding: 8px 5px;
        font-size: 0.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .btn-sm {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    /* Forms and modals */
    .modal-content {
        width: 95%;
        padding: 15px;
        margin: 10px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 5px;
    }
    
    /* Filter buttons */
    .filter-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    /* Cards and grids */
    .service-card, .product-card {
        padding: 12px;
    }
    
    /* Blog specific */
    .blog-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .post-categories {
        flex-wrap: wrap;
    }
    
    /* Orders and quotes */
    .order-header, .quote-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-card {
        padding: 12px;
    }
    
    /* Dashboard widgets - FIXED */
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Small mobile styles (up to 480px) */
@media (max-width: 480px) {
    .sidebar-menu a {
        width: calc(50% - 6px);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .stat-info {
        flex: 1;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .filter-btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .blog-stats {
        grid-template-columns: 1fr !important;
    }
    
    .modal .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Fix for filter tabs on mobile */
@media (max-width: 767px) {
    #filter-all, #filter-pending, #filter-approved, 
    #filter-completed, #filter-cancelled {
        width: calc(50% - 5px);
        margin-bottom: 5px;
        text-align: center;
    }
    
    .tab-container {
        flex-wrap: wrap;
    }
    
    .tab {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Improve touch targets for mobile */
@media (max-width: 767px) {
    .btn, 
    .sidebar-menu a,
    .filter-btn,
    .action-buttons button,
    .pagination-btn {
        min-height: 44px;
    }
    
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Print styles */
@media print {
    .sidebar, .top-bar, .btn, .action-buttons {
        display: none;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
}

/* ==================== TECHNICIAN MONITORING - MOBILE RESPONSIVE ==================== */

/* Base styles for all devices */
.tech-dashboard {
    padding: 20px;
}

/* Stats Cards - Responsive Grid */
.tech-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.tech-stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tech-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.tech-stat-info h3 {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.tech-stat-icon {
    font-size: 2.5rem;
    opacity: 0.2;
    color: var(--primary);
}

/* Filter Buttons - Responsive */
.tech-filter-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tech-filter-btn {
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tech-filter-btn i {
    font-size: 1rem;
}

.tech-filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,102,0,0.15);
}

.tech-filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Technician Cards Grid - Responsive */
.tech-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Individual Technician Card */
.tech-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.tech-card:hover::before {
    opacity: 1;
}

.tech-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.tech-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(10,37,64,0.2);
    flex-shrink: 0;
}

.tech-info {
    flex: 1;
    min-width: 0; /* Prevents text overflow */
}

.tech-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tech-status-badge i {
    font-size: 0.7rem;
}

.tech-status-badge.busy {
    background: #ffebee;
    color: #c62828;
}

/* Progress Bar */
.tech-progress {
    margin: 15px 0;
}

.tech-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #666;
}

.tech-progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.tech-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Action Buttons */
.tech-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tech-card-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 10px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 30px;
}

/* Job Cards - Responsive */
.tech-job-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 15px;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.tech-job-card:last-child {
    margin-bottom: 0;
}

.tech-job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-job-id {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.tech-job-status {
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    background: white;
    white-space: nowrap;
}

.tech-job-details {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.tech-job-details > div {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-job-details i {
    width: 18px;
    color: var(--accent);
    font-size: 0.9rem;
}

.tech-job-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tech-job-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    border: none;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.tech-job-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tech-job-btn.view { background: var(--primary); color: white; }
.tech-job-btn.chat { background: var(--accent); color: white; }

/* Timeline */
.tech-timeline {
    position: relative;
    padding-left: 25px;
    margin: 20px 0;
}

.tech-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.tech-timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.tech-timeline-icon {
    position: absolute;
    left: -25px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1;
}

.tech-timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-left: 10px;
}

.tech-timeline-content p {
    margin: 0 0 5px 0;
    font-weight: 500;
}

.tech-timeline-time {
    font-size: 0.75rem;
    color: #999;
}

/* Photo Grid */
.tech-photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 15px 0;
}

.tech-photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.tech-photo-item:hover {
    transform: scale(1.05);
}

.tech-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tech-photo-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    background: rgba(0,0,0,0.6);
    z-index: 2;
}

.tech-photo-badge.before { background: #17a2b8; }
.tech-photo-badge.during { background: #ffc107; color: #333; }
.tech-photo-badge.after { background: #28a745; }
.tech-photo-badge.signature { background: #6f42c1; }

/* ==================== TABLET RESPONSIVE (768px - 1024px) ==================== */
@media (max-width: 1024px) {
    .tech-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .tech-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .tech-photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tech-filter-container {
        justify-content: center;
    }
}

/* ==================== MOBILE RESPONSIVE (up to 767px) ==================== */
@media (max-width: 767px) {
    /* Stats Cards */
    .tech-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .tech-stat-card {
        padding: 15px;
    }
    
    .tech-stat-number {
        font-size: 1.5rem;
    }
    
    .tech-stat-icon {
        font-size: 2rem;
    }
    
    .tech-stat-info h3 {
        font-size: 0.75rem;
    }
    
    /* Filter Buttons */
    .tech-filter-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .tech-filter-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 0.85rem;
    }
    
    /* Technician Cards */
    .tech-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tech-card {
        padding: 15px;
    }
    
    .tech-card-header {
        gap: 12px;
    }
    
    .tech-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .tech-info h4 {
        font-size: 1rem;
    }
    
    .tech-card-actions {
        flex-direction: column;
    }
    
    .tech-card-actions .btn {
        width: 100%;
    }
    
    /* Job Cards */
    .tech-job-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tech-job-status {
        align-self: flex-start;
    }
    
    .tech-job-actions {
        flex-direction: column;
    }
    
    .tech-job-btn {
        width: 100%;
    }
    
    /* Photo Grid */
    .tech-photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Timeline */
    .tech-timeline {
        padding-left: 20px;
    }
    
    .tech-timeline-icon {
        width: 28px;
        height: 28px;
        left: -20px;
        font-size: 0.8rem;
    }
    
    .tech-timeline-content {
        padding: 12px;
    }
}

/* ==================== SMALL MOBILE (up to 480px) ==================== */
@media (max-width: 480px) {
    .tech-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tech-stat-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .tech-stat-info {
        flex: 1;
    }
    
    .tech-stat-number {
        font-size: 1.3rem;
    }
    
    .tech-photo-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-photo-item {
        aspect-ratio: 16/9;
    }
    
    .tech-job-details > div {
        flex-wrap: wrap;
    }
}

/* ==================== CHAT MODAL RESPONSIVE ==================== */
@media (max-width: 767px) {
    .tech-chat-container {
        height: 70vh;
    }
    
    .tech-chat-bubble {
        max-width: 85%;
    }
    
    .tech-chat-input-area {
        flex-direction: column;
        gap: 8px;
    }
    
    .tech-chat-input {
        width: 100%;
    }
    
    .tech-chat-send {
        width: 100%;
        border-radius: 25px;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255,102,0,0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255,102,0,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255,102,0,0);
    }
}

.tech-pulse {
    animation: pulse 2s infinite;
}

/* ==================== EMPTY STATES ==================== */
.tech-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 20px;
    color: #999;
    animation: fadeIn 0.5s ease;
}

.tech-empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
    color: var(--primary);
}

.tech-empty-state p {
    font-size: 1rem;
    margin: 0;
    color: #666;
}

/* Category Filter Buttons - Modern Design */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 0.5rem 0;
}

.category-btn {
    padding: 0.7rem 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.category-btn i {
    font-size: 0.9rem;
    color: #adb5bd;
    transition: color 0.3s;
}

.category-btn:hover {
    border-color: var(--accent, #ff6600);
    color: var(--accent, #ff6600);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,102,0,0.15);
}

.category-btn:hover i {
    color: var(--accent, #ff6600);
}

.category-btn.active {
    background: var(--accent, #ff6600);
    border-color: var(--accent, #ff6600);
    color: white;
    box-shadow: 0 4px 12px rgba(255,102,0,0.3);
}

.category-btn.active i {
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .category-filters {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .category-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .category-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Drag and drop styles */
.drag-handle {
    cursor: grab;
    color: #999;
    margin-right: 8px;
    transition: color 0.2s;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle:hover {
    color: var(--secondary);
}

.drag-over {
    border-top: 2px solid var(--secondary);
}

.dragging {
    opacity: 0.4;
    background: #f0f0f0;
}

.sortable-row {
    transition: background 0.2s;
}

.sortable-row:hover {
    background: #fafafa;
}

.reorder-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 8px;
}

.reorder-btn.active {
    background: var(--secondary);
}
