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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Customer Detail View Styles */
.customer-detail-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.customer-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.customer-detail-header h2 {
    margin: 0;
    color: #1f2937;
}

.customer-detail-content {
    padding: 2rem;
}

.customer-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.customer-summary h3 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.customer-summary p,
.customer-contact p {
    margin: 0.25rem 0;
    color: #6b7280;
}

.customer-repairs h4 {
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.customer-actions {
    margin-top: 1.5rem;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.nav-link i {
    margin-right: 1rem;
    width: 20px;
}

.main-content {
    flex: 1;
    margin-left: 280px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.logo-section h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.status-indicator.offline {
    background: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.status-indicator.connecting {
    background: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    animation: pulse 2s infinite;
}

.status-indicator.error {
    background: #6f42c1;
    box-shadow: 0 0 10px rgba(111, 66, 193, 0.5);
}

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

.status-text {
    color: white;
    font-weight: 500;
}

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

.username {
    color: white;
    font-weight: 500;
}

.user-section .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-section .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.search-bar {
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.search-bar input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
}

.content-wrapper {
    padding: 2rem;
}

.content-section {
    display: none;
}

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

/* Enhanced Dashboard Styles */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.dashboard-welcome h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

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

.dashboard-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dashboard-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.dashboard-actions .btn-info {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dashboard-actions .btn-info:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.current-date, .current-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

.current-date i, .current-time i {
    font-size: 1.2rem;
    opacity: 0.8;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

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

.stat-card-content {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.stat-card-warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-card-info .stat-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.stat-card-success .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-card-danger .stat-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-card-purple .stat-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.stat-details h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: #1e293b;
    line-height: 1;
}

.stat-details p {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.stat-change.neutral {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

.stat-card-footer {
    background: rgba(0, 0, 0, 0.02);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
}

.stat-card-footer i {
    color: #64748b;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-card-footer i {
    color: #667eea;
    transform: translateX(4px);
}

/* Warranty select in invoice item */
.invoice-warranty-months {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Clickable card styles */
.clickable-card {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.clickable-card:hover .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.clickable-card:hover .stat-content h3 {
    color: #667eea;
}

.clickable-card:hover .card-hover-indicator {
    opacity: 1;
    transform: translateX(0);
}

/* Hover indicator */
.card-hover-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #667eea;
    font-size: 1.2rem;
}

/* Card click effect */
.clickable-card:active {
    transform: translateY(-2px);
    transition: all 0.1s ease;
}

/* Analytics Section */
.dashboard-analytics {
    margin-bottom: 2rem;
}

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

.analytics-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.analytics-header h2 i {
    color: #667eea;
}

.chart-period-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.chart-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-header h3 i {
    color: #667eea;
}

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

.chart-action-btn {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-action-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.chart-content {
    padding: 1rem;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-content canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Quick Actions Section */
.quick-actions-section {
    margin-bottom: 2rem;
}

.quick-actions-section .section-header {
    margin-bottom: 1.5rem;
}

.quick-actions-section .section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.quick-actions-section .section-header h2 i {
    color: #667eea;
}

.quick-actions-section .section-header p {
    color: #64748b;
    font-size: 1rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-category {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.action-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.action-category h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-category h3 i {
    color: #667eea;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    text-align: left;
}

.action-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.action-btn-secondary:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Recent Activity Section */
.recent-activity-section {
    margin-bottom: 2rem;
}

.recent-activity-section .section-header {
    margin-bottom: 1.5rem;
}

.recent-activity-section .section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.recent-activity-section .section-header h2 i {
    font-size: 1.8rem;
    color: #667eea;
}

.activity-timeline {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    font-weight: 500;
}

.activity-time {
    font-size: 0.85rem;
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .dashboard-welcome h1 {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

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

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

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

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
}

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

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Specific styling for repairs table to fix action column width */
#repairs-table-container {
    overflow-x: auto; /* Allow horizontal scroll if needed */
    max-width: 100%; /* Ensure container doesn't exceed viewport */
}

#repairs-table {
    min-width: 800px; /* Further reduced for better fit on 14" screens */
    max-width: 100%; /* Ensure table doesn't exceed container */
}

#repairs-table th:last-child,
#repairs-table td:last-child {
    min-width: 200px; /* Increased from 180px to ensure buttons fit */
    max-width: 250px; /* Prevent actions column from getting too wide */
}

/* Ensure buttons in Actions column are properly spaced and stacked vertically */
#repairs-table td:last-child {
    white-space: normal; /* Allow text to wrap */
    vertical-align: top; /* Align content to top */
}

#repairs-table td:last-child .btn {
    display: block; /* Make buttons stack vertically */
    width: 100%; /* Full width within the cell */
    margin-bottom: 0.5rem; /* Space between buttons */
    text-align: center; /* Center button text */
    white-space: nowrap; /* Prevent button text from wrapping */
}

#repairs-table td:last-child .btn:last-child {
    margin-bottom: 0; /* No margin for last button */
}

/* Responsive design for smaller screens (14" MacBook Pro, etc.) */
@media (max-width: 1680px) {
    #repairs-table {
        min-width: 850px; /* Better fit for 15" screens */
    }
    
    #repairs-table th:last-child,
    #repairs-table td:last-child {
        min-width: 190px; /* Adequate actions column width */
    }
}

@media (max-width: 1440px) {
    #repairs-table {
        min-width: 750px; /* Optimized for 14" MacBook Pro at 100% zoom */
    }
    
    #repairs-table th:last-child,
    #repairs-table td:last-child {
        min-width: 170px; /* Compact but functional actions column */
    }
    
    /* Reduce padding for better fit */
    #repairs-table th,
    #repairs-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 1200px) {
    #repairs-table {
        min-width: 650px; /* Very compact for smaller screens */
    }
    
    #repairs-table th:last-child,
    #repairs-table td:last-child {
        min-width: 150px; /* Compact actions column */
    }
    
    #repairs-table td:last-child .btn {
        font-size: 0.8rem; /* Smaller button text */
        padding: 0.5rem 0.75rem; /* Compact button padding */
    }
}

@media (max-width: 1000px) {
    #repairs-table {
        min-width: 600px; /* Ultra-compact for very small viewports */
    }
    
    #repairs-table th:last-child,
    #repairs-table td:last-child {
        min-width: 140px; /* Minimal actions column width */
    }
    
    /* Very compact padding */
    #repairs-table th,
    #repairs-table td {
        padding: 0.5rem 0.25rem;
    }
    
    #repairs-table td:last-child .btn {
        font-size: 0.75rem; /* Even smaller button text */
        padding: 0.4rem 0.5rem; /* Minimal button padding */
    }
}

@media (max-width: 768px) {
    #repairs-table-container {
        overflow-x: auto; /* Ensure horizontal scroll on mobile */
    }
    
    #repairs-table {
        min-width: 600px; /* Very compact for mobile */
    }
    
    #repairs-table th:last-child,
    #repairs-table td:last-child {
        min-width: 140px; /* Compact actions column for mobile */
    }
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    font-size: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

tr:hover {
    background-color: #f8fafc;
}

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

.status-in-stock {
    background-color: #dcfce7;
    color: #166534;
}

.status-low-stock {
    background-color: #fef3c7;
    color: #92400e;
}

.status-out-of-stock {
    background-color: #fee2e2;
    color: #991b1b;
}

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

.vendor-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.vendor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.report-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Generic Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0,0,0,0.4); /* Black w/ opacity */
  justify-content: center;
  align-items: center;
}

.modal .modal-content {
  background: #fff;
  margin: auto;
  padding: 30px 20px;
  border-radius: 12px;
  max-width: 400px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  position: relative;
}

.modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal .close {
  font-size: 1.5rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  border: none;
  background: none;
}

/* Customer modal specific styling */
#add-customer-modal .modal-content {
    margin: 1% auto;
    max-height: 95vh;
}

#add-customer-modal form {
    padding: 1.5rem;
}

#add-customer-modal .form-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Customer search suggestions */
.customer-search-container {
    position: relative;
}

.customer-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.customer-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.customer-suggestion-item:hover {
    background-color: #f8fafc;
}

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

.customer-suggestion-name {
    font-weight: 500;
    color: #1e293b;
}

.customer-suggestion-details {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Invoice styling */
.invoice-items {
    margin-bottom: 1.5rem;
}

.invoice-items h4 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.invoice-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.invoice-summary {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.invoice-totals {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.invoice-totals p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.invoice-totals p:last-child {
    font-size: 1.1rem;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.status-draft {
    background-color: #f1f5f9;
    color: #64748b;
}

.status-sent {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-paid {
    background-color: #dcfce7;
    color: #166534;
}

.status-overdue {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-cancelled {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Item search suggestions */
.item-search-container {
    position: relative;
}

.item-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.item-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s;
}

.item-suggestion-item:hover {
    background-color: #f8fafc;
}

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

.item-suggestion-name {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.item-suggestion-details {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.item-suggestion-price {
    font-weight: 600;
    color: #059669;
}

/* Quotation styling */
.quotation-items {
    margin-bottom: 1.5rem;
}

.quotation-items h4 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.quotation-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.quotation-summary {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.quotation-totals {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.quotation-totals p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.quotation-totals p:last-child {
    font-size: 1.1rem;
    color: #1e293b;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.status-approved {
    background-color: #dcfce7;
    color: #166534;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-converted {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-expired {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-scheduled {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-pickup-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-picked-up {
    background-color: #d1fae5;
    color: #065f46;
}

.status-in-repair {
    background-color: #fef3c7;
    color: #92400e;
}

.status-ready-for-delivery {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-out-for-delivery {
    background-color: #fef3c7;
    color: #92400e;
}

.status-delivered {
    background-color: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Invoice Detail View Styles */
.invoice-detail-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.invoice-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-detail-header h2 {
    margin: 0;
    color: #1f2937;
}

.invoice-detail-content {
    padding: 2rem;
}

.invoice-detail-info {
    max-width: 800px;
    margin: 0 auto;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.invoice-company h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.invoice-company p {
    color: #6b7280;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.invoice-details h2 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.invoice-details p {
    color: #6b7280;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.invoice-details select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
    color: #374151;
    cursor: pointer;
}

.invoice-details select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.invoice-status-dropdown {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: white;
    color: #374151;
    cursor: pointer;
    min-width: 100px;
}

.invoice-status-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.invoice-status-dropdown option {
    padding: 0.25rem;
}

/* Inventory Status Dropdown Styles */
.inventory-status-dropdown {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: white;
    color: #374151;
    cursor: pointer;
    min-width: 120px;
}
.inventory-status-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}
.inventory-status-dropdown option {
    padding: 0.25rem;
}

/* Checkbox Container Styles */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #6b7280;
    cursor: pointer;
}

/* OTP Verification Styles */
.otp-verification {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.otp-verification h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1rem;
}

.otp-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.otp-input {
    width: 60px;
    height: 40px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

.otp-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.otp-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.otp-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.otp-status.verified {
    background: #d1fae5;
    color: #065f46;
}

.otp-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.otp-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.otp-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.invoice-customer {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.invoice-customer h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.invoice-customer p {
    color: #6b7280;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.invoice-items-detail {
    margin-bottom: 2rem;
}

.invoice-items-detail table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.invoice-items-detail th {
    background: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-items-detail td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    color: #6b7280;
}

.invoice-summary-detail {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.invoice-totals-detail {
    width: 300px;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

.invoice-totals-detail p {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.invoice-total {
    border-top: 2px solid #e2e8f0;
    padding-top: 0.5rem;
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 600;
}

.invoice-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .invoice-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .invoice-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .invoice-totals-detail {
        width: 100%;
    }
}

/* Disabled button styling */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
}

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

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

.purchase-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.4rem;
    }
    
    .action-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .purchase-item {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1% auto;
        width: 95%;
        max-height: 98vh;
    }
    
    #add-customer-modal .modal-content {
        margin: 0.5% auto;
        max-height: 99vh;
    }
} 

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.user-name {
    font-weight: 500;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.logout-btn:hover {
    background: #c0392b;
}

.logout-btn i {
    font-size: 0.75rem;
}

/* User Management Styles */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8fafc;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #e2e8f0;
}

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

.permission-item label {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.user-role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background-color: #dc2626;
    color: white;
}

.role-manager {
    background-color: #ea580c;
    color: white;
}

.role-technician {
    background-color: #2563eb;
    color: white;
}

.role-sales {
    background-color: #059669;
    color: white;
}

.role-viewer {
    background-color: #6b7280;
    color: white;
}

.user-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 200px;
}

.permission-tag {
    background-color: #f3f4f6;
    color: #374151;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.user-status-active {
    color: #059669;
    font-weight: 600;
}

.user-status-inactive {
    color: #dc2626;
    font-weight: 600;
}

/* Hide sections based on user permissions */
.section-hidden {
    display: none !important;
}

.nav-link-hidden {
    display: none !important;
} 

/* Quotation Detail View Styles */
.quotation-detail-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    overflow: hidden;
}

.quotation-detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.quotation-detail-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.back-to-quotations-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.back-to-quotations-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.quotation-detail-content {
    padding: 30px;
}

.quotation-detail-info {
    max-width: 800px;
    margin: 0 auto;
}

.quotation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.quotation-company h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.quotation-company p {
    color: #64748b;
    margin: 5px 0;
    font-size: 0.9rem;
}

.quotation-details h2 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.quotation-details p {
    margin: 8px 0;
    color: #374151;
}

.quotation-details select {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-left: 10px;
}

.quotation-details select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quotation-customer,
.quotation-device {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.quotation-customer h4,
.quotation-device h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.quotation-customer p,
.quotation-device p {
    margin: 5px 0;
    color: #374151;
}

.quotation-items-detail {
    margin: 25px 0;
}

.quotation-items-detail table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.quotation-items-detail th {
    background: #f1f5f9;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e2e8f0;
}

.quotation-items-detail td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
}

.quotation-summary-detail {
    margin-top: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.quotation-totals-detail {
    text-align: right;
}

.quotation-totals-detail p {
    margin: 8px 0;
    font-size: 1rem;
    color: #374151;
}

.quotation-total {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    border-top: 2px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 15px !important;
}

.quotation-notes {
    margin: 25px 0;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.quotation-notes h4 {
    color: #92400e;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.quotation-notes p {
    color: #78350f;
    margin: 0;
    line-height: 1.5;
}

.quotation-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.quotation-actions .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: #06b6d4;
    color: white;
}

.btn-info:hover {
    background: #0891b2;
}

@media (max-width: 768px) {
    .quotation-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .quotation-actions {
        flex-direction: column;
    }
    
    .quotation-actions .btn {
        width: 100%;
    }
} 

/* Job Card Detail View Styles */
.job-card-detail-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    overflow: hidden;
}

.job-card-detail-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.job-card-detail-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.back-to-repairs-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.back-to-repairs-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.job-card-detail-content {
    padding: 30px;
}

.job-card-detail-info {
    max-width: 900px;
    margin: 0 auto;
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.job-card-company h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.job-card-company p {
    color: #64748b;
    margin: 5px 0;
    font-size: 0.9rem;
}

.job-card-details h2 {
    color: #059669;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.job-card-details p {
    margin: 8px 0;
    color: #374151;
}

.job-card-details select {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-left: 10px;
}

.job-card-details select:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.job-card-customer,
.job-card-device,
.job-card-diagnosis {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #059669;
}

.job-card-customer h4,
.job-card-device h4,
.job-card-diagnosis h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.job-card-customer p,
.job-card-device p,
.job-card-diagnosis p {
    margin: 5px 0;
    color: #374151;
}

.diagnosis-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.diagnosis-content li {
    margin: 5px 0;
    color: #374151;
}

.job-card-progress {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #059669;
}

.job-card-progress h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.progress-timeline {
    position: relative;
}

.progress-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.progress-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    position: relative;
}

.progress-step:last-child {
    margin-bottom: 0;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.progress-step.completed .step-icon {
    background: #059669;
    color: white;
}

.progress-step.active .step-icon {
    background: #f59e0b;
    color: white;
}

.step-content {
    flex: 1;
    padding-top: 5px;
}

.step-content h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.step-content p {
    margin: 0 0 5px 0;
    color: #64748b;
    font-size: 0.9rem;
}

.step-content small {
    color: #9ca3af;
    font-size: 0.8rem;
}

.job-card-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.job-card-actions .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .job-card-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .job-card-actions {
        flex-direction: column;
    }
    
    .job-card-actions .btn {
        width: 100%;
    }
    
    .progress-timeline::before {
        left: 15px;
    }
    
    .step-icon {
        width: 30px;
        height: 30px;
        margin-right: 15px;
    }
} 

/* Image Upload and Display Styles */
.image-upload-section {
    margin-top: 15px;
}

.image-upload-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.image-upload-buttons .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.device-images-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.device-image-item {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    aspect-ratio: 1;
}

.device-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.device-image-item .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.device-image-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay .btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.image-overlay .btn:hover {
    background: #b91c1c;
}

.camera-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.camera-preview video {
    max-width: 90%;
    max-height: 70%;
    border-radius: 8px;
}

.camera-preview .camera-controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.camera-preview .btn {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 8px;
}

.camera-preview .btn-capture {
    background: #059669;
    color: white;
    border: none;
}

.camera-preview .btn-cancel {
    background: #dc2626;
    color: white;
    border: none;
}

.job-card-images {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #059669;
}

.job-card-images h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.image-management-buttons {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.image-management-buttons .btn {
    font-size: 0.8rem;
    padding: 5px 10px;
}

.device-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-image-item {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.gallery-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Customer Autocomplete Styles */
.customer-autocomplete {
    position: relative;
}

.customer-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.customer-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.customer-suggestion-item:hover {
    background-color: #f8f9fa;
}

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

.customer-suggestion-item.selected {
    background-color: #007bff;
    color: white;
}

.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-modal .close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.image-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .image-upload-buttons {
        flex-direction: column;
    }
    
    .device-images-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .device-images-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Pick & Drop Detail View Styles */
.pickdrop-detail-view {
    display: none;
    padding: 20px;
    background: #f8fafc;
    min-height: 100vh;
}

.pickdrop-detail-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.pickdrop-detail-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pickdrop-detail-header h2 {
    color: #1e293b;
    margin: 0;
    font-size: 1.5rem;
}

.back-to-pickdrop-btn {
    background: #64748b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.back-to-pickdrop-btn:hover {
    background: #475569;
}

.pickdrop-detail-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pickdrop-detail-info {
    padding: 30px;
}

.pickdrop-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.pickdrop-company h3 {
    color: #1e293b;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.pickdrop-company p {
    color: #64748b;
    margin: 5px 0;
    font-size: 0.9rem;
}

.pickdrop-details h2 {
    color: #1e293b;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.pickdrop-details p {
    margin: 8px 0;
    color: #475569;
}

.pickdrop-details select {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
}

.pickdrop-customer,
.pickdrop-device,
.pickdrop-service-details,
.pickdrop-otp-section,
.pickdrop-images {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #059669;
}

.pickdrop-customer h4,
.pickdrop-device h4,
.pickdrop-service-details h4,
.pickdrop-otp-section h4,
.pickdrop-images h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.pickdrop-customer p,
.pickdrop-device p,
.pickdrop-service-details p,
.pickdrop-otp-section p {
    margin: 8px 0;
    color: #475569;
}

.pickdrop-actions {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.pickdrop-actions .btn {
    margin: 5px;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .pickdrop-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pickdrop-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .pickdrop-actions .btn {
        margin: 0;
    }
}

/* Delivery Management Styles */
.delivery-detail-view {
    display: none;
    padding: 20px;
    background: #f8fafc;
    min-height: 100vh;
}

.delivery-detail-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.delivery-detail-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delivery-detail-header h2 {
    color: #1e293b;
    margin: 0;
    font-size: 1.5rem;
}

.back-to-delivery-btn {
    background: #64748b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.back-to-delivery-btn:hover {
    background: #475569;
}

.delivery-detail-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.delivery-detail-info {
    padding: 30px;
}

.delivery-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.delivery-company h3 {
    color: #1e293b;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.delivery-company p {
    color: #64748b;
    margin: 5px 0;
    font-size: 0.9rem;
}

.delivery-details h2 {
    color: #1e293b;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.delivery-details p {
    margin: 8px 0;
    color: #475569;
}

.delivery-details select {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
}

.delivery-customer,
.delivery-device,
.delivery-service-details,
.delivery-tracking {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #059669;
}

.delivery-customer h4,
.delivery-device h4,
.delivery-service-details h4,
.delivery-tracking h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.delivery-customer p,
.delivery-device p,
.delivery-service-details p {
    margin: 8px 0;
    color: #475569;
}

.delivery-timeline {
    position: relative;
    padding-left: 30px;
}

.delivery-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.delivery-step {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
}

.delivery-step:last-child {
    margin-bottom: 0;
}

.delivery-step .step-icon {
    position: absolute;
    left: -22px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 1;
}

.delivery-step.completed .step-icon {
    background: #059669;
    color: white;
}

.delivery-step.active .step-icon {
    background: #3b82f6;
    color: white;
}

.delivery-step .step-content {
    margin-left: 15px;
}

.delivery-step .step-content h5 {
    color: #1e293b;
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
}

.delivery-step .step-content p {
    color: #64748b;
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.delivery-step .step-content small {
    color: #94a3b8;
    font-size: 0.8rem;
}

.delivery-actions {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.delivery-actions .btn {
    margin: 5px;
    font-size: 0.9rem;
}

/* Delivery Status Badges */
.status-scheduled {
    background: #fef3c7;
    color: #92400e;
}

.status-out-for-delivery {
    background: #dbeafe;
    color: #1e40af;
}

.status-attempted {
    background: #fef3c7;
    color: #92400e;
}

.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

.status-returned {
    background: #fef3c7;
    color: #92400e;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 768px) {
    .delivery-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .delivery-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .delivery-actions .btn {
        margin: 0;
    }
    
    .delivery-timeline {
        padding-left: 20px;
    }
    
    .delivery-timeline::before {
        left: 10px;
    }
    
    .delivery-step .step-icon {
        left: -15px;
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
} 

/* Payment Management Styles */
.payment-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.payment-summary-cards .summary-card {
    border-left: 4px solid #27ae60;
}

.payment-summary-cards .summary-card p {
    color: #27ae60;
}

/* User Management Edit Mode Styles */
.user-modal-edit-mode .modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.user-modal-edit-mode .modal-header h3::before {
    content: "✏️ ";
    margin-right: 8px;
}

.user-modal-edit-mode .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.user-modal-edit-mode .btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Password field styling for edit mode */
#user-password:placeholder-shown {
    border-color: #fbbf24;
    background-color: #fef3c7;
}

#user-password:placeholder-shown:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* User edit button styling */
.btn-edit-user {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.btn-edit-user:hover {
    background: #d97706;
}

.btn-edit-user i {
    margin-right: 4px;
}

/* User table row hover effect */
#users-table tbody tr:hover {
    background-color: #fef3c7;
    transition: background-color 0.2s ease;
}

/* User status indicators */
.user-status-active {
    color: #059669;
    font-weight: 600;
    background: #d1fae5;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.user-status-inactive {
    color: #dc2626;
    font-weight: 600;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Permission tags styling */
.permission-tag {
    background-color: #e0e7ff;
    color: #3730a3;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin: 1px;
    display: inline-block;
}

/* User management filters styling */
#user-role-filter,
#user-status-filter {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

#user-role-filter:focus,
#user-status-filter:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* User search input styling */
#search-users {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 300px;
}

#search-users:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* User management section header */
#users .section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#users .section-header h2 {
    color: white;
    margin: 0;
}

#users .section-header .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

#users .section-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive design for user management */
@media (max-width: 768px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .user-permissions {
        max-width: 100%;
    }
    
    #users-table {
        font-size: 0.8rem;
    }
    
    #users-table th,
    #users-table td {
        padding: 8px 4px;
    }
    
    .user-role-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .permission-tag {
        font-size: 10px;
        padding: 1px 4px;
    }
}

/* Additional Inventory Management Styles */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.inventory-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

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

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

.inventory-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

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

.inventory-card-content {
    margin-bottom: 1rem;
}

.inventory-card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.inventory-card-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.inventory-card-info strong {
    color: #1f2937;
}

.inventory-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

/* Inventory Table Styles */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.inventory-table th,
.inventory-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.inventory-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #1f2937;
}

.inventory-table tr:hover {
    background-color: #f8fafc;
}

/* Inventory Form Styles */
.inventory-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
}

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

.inventory-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1f2937;
}

.inventory-form input,
.inventory-form select,
.inventory-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.inventory-form input:focus,
.inventory-form select:focus,
.inventory-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive Design for Inventory */
@media (max-width: 1024px) {
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .inventory-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .inventory-card {
        padding: 1rem;
    }
    
    .inventory-card-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .inventory-card-actions {
        flex-direction: column;
    }
    
    .inventory-card-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .inventory-form {
        padding: 1rem;
    }
} 

/* Parts Selection Styles for Edit Job Card */
.parts-selection-section {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    background-color: #f8fafc;
}

.parts-search {
    position: relative;
    margin-bottom: 16px;
}

.parts-search input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.parts-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.parts-suggestion-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parts-suggestion-item:hover {
    background-color: #f1f5f9;
}

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

.parts-suggestion-item .part-info {
    flex: 1;
}

.parts-suggestion-item .part-name {
    font-weight: 600;
    color: #1e293b;
}

.parts-suggestion-item .part-details {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.parts-suggestion-item .part-price {
    font-weight: 600;
    color: #059669;
    font-size: 14px;
}

.selected-parts-list {
    margin-bottom: 16px;
    min-height: 60px;
}

.no-parts-message {
    color: #64748b;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.selected-part-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.selected-part-item .part-info {
    flex: 1;
}

.selected-part-item .part-name {
    font-weight: 600;
    color: #1e293b;
}

.selected-part-item .part-details {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.selected-part-item .part-price {
    font-weight: 600;
    color: #059669;
    margin-right: 12px;
}

.selected-part-item .remove-part {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}

.selected-part-item .remove-part:hover {
    background: #dc2626;
}

.parts-summary {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.parts-summary p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parts-summary .total-cost {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    border-top: 2px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 12px;
}

/* Job Card Parts List Styling */
#job-card-parts-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

#job-card-parts-list li {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

#job-card-parts-list li:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#job-card-parts-list li:last-child {
    margin-bottom: 0;
}

#job-card-parts-list .part-price {
    color: #059669;
    font-weight: 600;
    font-size: 14px;
    background: #ecfdf5;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #a7f3d0;
}

/* Job Card Diagnosis Section Enhancement */
.job-card-diagnosis {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.job-card-diagnosis h4 {
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}

.diagnosis-content p {
    margin: 12px 0;
    line-height: 1.6;
}

.diagnosis-content strong {
    color: #374151;
    font-weight: 600;
}

/* Warranty Detail View Styles */
.warranty-detail-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    padding: 2rem;
}

.warranty-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.warranty-detail-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
}

.back-to-warranties-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.warranty-detail-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.warranty-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.warranty-detail-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.warranty-detail-section h4 {
    margin: 0 0 1rem 0;
    color: #475569;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #64748b;
    min-width: 120px;
}

.detail-value {
    color: #1e293b;
    font-weight: 500;
    text-align: right;
    flex: 1;
}

.warranty-detail-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.login-overlay {
  z-index: 9999;
}

.modal {
  z-index: 99999;
}

.hidden {
  display: none !important;
}

.forgot-link {
  margin-top: 10px;
  color: #3498db;
  text-align: center;
  display: block;
  cursor: pointer;
}

/* Add any other classes as needed for styling previously inline-styled elements */

.small-muted {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}

.forgot-link {
  margin-top: 10px;
  color: #3498db;
  text-align: center;
  display: block;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.chart-container-tall {
  height: 240px;
  overflow: hidden;
}

.canvas-tall {
  height: 180px !important;
}

/* Hide elements */
.hidden {
  display: none !important;
}

/* Success message styling */
.login-success {
  color: #27ae60;
  background: #eafaf1;
  border: 1px solid #27ae60;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 15px;
  display: none;
}

/* Error message styling */
.login-error {
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #c0392b;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 15px;
  display: none;
}

/* Show messages when not hidden */
.login-success:not(.hidden), .login-error:not(.hidden) {
  display: block;
}

/* Add any other classes as needed for layout/visibility */

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10000;
    max-width: 300px;
    word-wrap: break-word;
    animation: slideInRight 0.3s ease-out;
}

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