/* Custom styles for the in-house web application */

/* Inter font family */
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Primary color variables */
:root {
    --primary-color: #00a9ea;
    --primary-dark: #0088cc;
    --primary-light: #33b8ed;
}

/* Navigation styles */
.nav-item {
    @apply block transition-all duration-200;
}

.nav-item:hover .nav-item-content {
    @apply bg-gray-50;
}

.nav-item.active .nav-item-content {
    @apply bg-[#00a9ea]/10;
}

.nav-item.active .nav-item-content .nav-icon {
    @apply bg-[#00a9ea]/10 text-[#00a9ea];
}

.nav-item.active .nav-item-content .nav-text {
    @apply text-[#00a9ea] font-semibold;
}

/* Page content */
.page-content {
    min-height: calc(100vh - 200px);
}

/* Table styles */
.table-row:hover {
    @apply bg-gray-50;
}

/* Status badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-quoted {
    background-color: #ede9fe;
    color: #6b21a8;
    border: 1px solid #c4b5fd;
}

.status-invoiced {
    background-color: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #c084fc;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-ready {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* Ensure status badges in job queue have proper styling */
#job-queue .status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

#job-queue .status-pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

#job-queue .status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

#job-queue .status-completed {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

#job-queue .status-quoted {
    background-color: #ede9fe;
    color: #6b21a8;
    border: 1px solid #c4b5fd;
}

#job-queue .status-invoiced {
    background-color: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #c084fc;
}

#job-queue .status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

#job-queue .status-ready {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* UK Car Registration Plate Styling */
.reg-plate {
    background-color: #ffd700;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: 'Arial Black', Arial, sans-serif;
    font-weight: 900;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reg-plate-small {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    min-width: 60px;
}

/* Ensure reg plates are visible in tables and lists */
#jobs-table-body .reg-plate,
#job-queue .reg-plate {
    display: inline-block !important;
    visibility: visible !important;
}

/* Job Details Tabs */
.job-tabs {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.job-tab {
    padding: 0.75rem 1.5rem;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.job-tab:hover {
    color: #374151;
    background-color: #f9fafb;
}

.job-tab.active {
    color: #00a9ea;
    border-bottom-color: #00a9ea;
    background-color: #f0f9ff;
}

.job-tab-content {
    display: none;
}

.job-tab-content.active {
    display: block;
}

/* Notes styling */
.note-item {
    border-left: 3px solid #e5e7eb;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
    border-radius: 0 0.5rem 0.5rem 0;
}

.note-item.note-urgent {
    border-left-color: #ef4444;
    background-color: #fef2f2;
}

.note-item.note-damage {
    border-left-color: #f59e0b;
    background-color: #fffbeb;
}

.note-item.note-quote {
    border-left-color: #3b82f6;
    background-color: #eff6ff;
}

.note-item.note-completion {
    border-left-color: #10b981;
    background-color: #ecfdf5;
}

.note-item.note-requirement {
    border-left-color: #8b5cf6;
    background-color: #faf5ff;
}

.note-text {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.note-author {
    font-weight: 500;
}

.note-timestamp {
    font-size: 0.75rem;
}

/* Note badge in table */
.note-badge {
    background-color: #00a9ea;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.note-icon {
    font-size: 0.625rem;
}

/* Invoice styling */
.invoices-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.invoice-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.invoice-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.invoice-number {
    font-weight: 600;
    color: #111827;
    font-size: 1.125rem;
}

.invoice-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.invoice-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    text-align: right;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
}

.invoice-action-btn {
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.invoice-action-btn.download {
    background-color: #dbeafe;
    color: #1e40af;
}

.invoice-action-btn.download:hover {
    background-color: #bfdbfe;
}

.invoice-action-btn.view {
    background-color: #dcfce7;
    color: #166534;
}

.invoice-action-btn.view:hover {
    background-color: #bbf7d0;
}

.invoice-action-btn.paid {
    background-color: #dcfce7;
    color: #166534;
}

.invoice-action-btn.paid:hover {
    background-color: #bbf7d0;
}

.reg-plate-large {
    font-size: 1rem;
    padding: 0.375rem 0.625rem;
    min-width: 100px;
}

/* Priority indicators */
.priority-high {
    @apply bg-red-100 text-red-800 border border-red-200;
}

.priority-medium {
    @apply bg-amber-100 text-amber-800 border border-amber-200;
}

.priority-low {
    @apply bg-emerald-100 text-emerald-800 border border-emerald-200;
}

/* Loading states */
.loading {
    @apply opacity-50 pointer-events-none;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form styles */
.form-group {
    @apply mb-4;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

.form-input {
    @apply w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500;
}

.form-select {
    @apply w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500;
}

.form-textarea {
    @apply w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500;
}

/* Button styles */
.btn {
    @apply px-4 py-2 rounded-xl font-medium transition-all duration-200;
}

.btn-primary {
    @apply bg-gradient-to-r from-[#00a9ea] to-[#0088cc] text-white hover:shadow-lg transform hover:-translate-y-0.5;
}

.btn-secondary {
    @apply bg-gray-100 text-gray-700 hover:bg-gray-200;
}

.btn-success {
    @apply bg-gradient-to-r from-emerald-500 to-emerald-600 text-white hover:shadow-lg transform hover:-translate-y-0.5;
}

.btn-danger {
    @apply bg-gradient-to-r from-red-500 to-red-600 text-white hover:shadow-lg transform hover:-translate-y-0.5;
}

.btn-sm {
    @apply px-3 py-1.5 text-sm rounded-lg;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 56rem;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
}

/* Job details modal specific styling */
#job-details-modal .modal-content {
    height: 80vh;
    max-height: 80vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

#job-details-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    padding-top: 0rem;
}

#job-details-modal .modal-footer {
    flex-shrink: 0;
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* Fixed navigation tabs */
#job-details-modal .job-tabs {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}

#job-details-modal .job-tabs .flex {
    padding: 0 1.5rem;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    border: 1px solid;
    min-width: 300px;
    max-width: 400px;
}

.notification-success {
    background-color: #10b981;
    color: white;
    border-color: #059669;
    box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.3), 0 10px 10px -5px rgba(16, 185, 129, 0.1);
}

.notification-error {
    background-color: #ef4444;
    color: white;
    border-color: #dc2626;
}

.notification-info {
    background-color: #00a9ea;
    color: white;
    border-color: #0088cc;
}

.notification-warning {
    background-color: #f59e0b;
    color: white;
    border-color: #d97706;
}

/* Action button styles */
.action-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ready-btn {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #059669 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.ready-btn:hover {
    background-color: #059669 !important;
    border-color: #047857 !important;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.ready-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Specific selectors for different contexts */
#job-queue .ready-btn,
#jobs-table-body .ready-btn,
#job-details-modal .ready-btn {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #059669 !important;
}

.invoice-btn {
    background-color: #8b5cf6 !important;
    color: white !important;
    border-color: #7c3aed !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.invoice-btn:hover {
    background-color: #7c3aed !important;
    border-color: #6d28d9 !important;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.invoice-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

/* Specific selectors for different contexts */
#job-queue .invoice-btn,
#jobs-table-body .invoice-btn,
#job-details-modal .invoice-btn {
    background-color: #8b5cf6 !important;
    color: white !important;
    border-color: #7c3aed !important;
}

.view-btn {
    background-color: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.view-btn:hover {
    background-color: #2563eb;
    border-color: #1d4ed8;
}

/* Add Note Form Styles */
#add-note-form {
    transition: all 0.3s ease-in-out;
}

#add-note-form.hidden {
    display: none;
}

#new-note-text {
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#new-note-text:focus {
    outline: none;
    border-color: #00a9ea;
    box-shadow: 0 0 0 3px rgba(0, 169, 234, 0.1);
}

/* Note Item Animations */
.note-item {
    animation: slideInFromTop 0.3s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Photo Gallery Styles */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.photo-item:hover {
    transform: scale(1.02);
}

.photo-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    backdrop-filter: blur(4px);
}

.photo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.photo-btn i {
    font-size: 14px;
}

/* Add-ons Styles */
.addon-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease-in-out;
}

.addon-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.addon-item:last-child {
    margin-bottom: 0;
}

.remove-addon-btn {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

.remove-addon-btn:hover {
    background-color: #fef2f2;
}

#add-addon-form {
    transition: all 0.3s ease-in-out;
}

#add-addon-form.hidden {
    display: none;
}

/* Card styles */
.card {
    @apply bg-white rounded-xl shadow-lg border border-gray-100 p-6;
}

.card-header {
    @apply border-b border-gray-200 pb-4 mb-4;
}

.card-title {
    @apply text-xl font-semibold text-gray-800;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        @apply hidden;
    }
    
    .main-content {
        @apply w-full;
    }
    
    .grid-cols-4 {
        @apply grid-cols-1;
    }
    
    .grid-cols-3 {
        @apply grid-cols-1;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Utility classes */
.text-truncate {
    @apply overflow-hidden whitespace-nowrap text-ellipsis;
}

.cursor-pointer {
    @apply cursor-pointer;
}

.select-none {
    @apply select-none;
}

/* Modern card styles */
.modern-card {
    @apply bg-white rounded-2xl shadow-sm border border-gray-200 p-6 transition-all duration-200 hover:shadow-md;
}

/* Modern button styles */
.btn-modern {
    @apply px-6 py-3 rounded-xl font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2;
}

.btn-modern-primary {
    @apply bg-gradient-to-r from-[#00a9ea] to-[#0088cc] text-white hover:shadow-lg transform hover:-translate-y-0.5 focus:ring-[#00a9ea];
}

.btn-modern-secondary {
    @apply bg-gray-100 text-gray-700 hover:bg-gray-200 focus:ring-gray-500;
}

/* Modern form styles */
.form-modern {
    @apply w-full p-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-[#00a9ea] focus:border-[#00a9ea] transition-colors;
}

/* Modern table styles */
.table-modern {
    @apply min-w-full divide-y divide-gray-200;
}

.table-modern thead {
    @apply bg-gray-50;
}

.table-modern th {
    @apply px-6 py-4 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider;
}

.table-modern td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

.table-modern tbody tr:hover {
    @apply bg-gray-50;
}

/* Photo gallery styles */
.photo-gallery {
    @apply grid grid-cols-2 md:grid-cols-4 gap-4;
}

.photo-item {
    @apply relative aspect-square overflow-hidden rounded-lg border border-gray-300;
}

.photo-item img {
    @apply w-full h-full object-cover;
}

.photo-overlay {
    @apply absolute inset-0 bg-black bg-opacity-0 hover:bg-opacity-30 transition-all duration-200 flex items-center justify-center;
}

.photo-overlay:hover {
    @apply bg-opacity-30;
}

/* Create Job Button Styles */
#create-job-btn, #create-job-btn-dashboard {
    position: relative;
    overflow: hidden;
}

#create-job-btn::before, #create-job-btn-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

#create-job-btn:hover::before, #create-job-btn-dashboard:hover::before {
    left: 100%;
}

#create-job-btn:active, #create-job-btn-dashboard:active {
    transform: scale(0.98) translateY(0);
}

/* Photo Preview Styles */
#photo-preview {
    transition: all 0.3s ease;
}

#photo-preview img {
    transition: all 0.2s ease;
}

#photo-preview img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Global Hidden Class */
.hidden {
    display: none !important;
}

/* Settings Tab Styles */
.settings-tab {
    transition: all 0.2s ease-in-out;
}

.settings-tab:hover {
    color: #374151 !important;
    border-color: #d1d5db !important;
}

.settings-tab.active {
    color: #00a9ea !important;
    border-bottom-color: #00a9ea !important;
}

.settings-content {
    min-height: 400px;
}

/* Priority Badge Styles */
.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.priority-badge i {
    font-size: 0.625rem;
}

/* Customer Selection Styles */
#customer-details {
    transition: all 0.3s ease;
}

/* Activities Page Styles */
.activity-item {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.activity-item:hover {
    border-left-color: #00a9ea;
    transform: translateX(2px);
}

.activity-item .activity-icon {
    transition: all 0.2s ease;
}

.activity-item:hover .activity-icon {
    transform: scale(1.1);
}

/* Activity Type Badges */
.activity-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Activity Time Styling */
.activity-time {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-variant-numeric: tabular-nums;
}

/* Activity Loading Animation */
#activities-loading .animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Activity Filter Styles */
.activity-filter-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.activity-filter-section select:focus {
    box-shadow: 0 0 0 3px rgba(0, 169, 234, 0.1);
    border-color: #00a9ea;
}

/* Activity Details Button */
.activity-details-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.activity-details-btn:hover {
    transform: translateY(-1px);
}

.activity-details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.activity-details-btn:hover::before {
    left: 100%;
}

/* Activity Status Indicator */
.activity-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Activity User Badge */
.activity-user-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Activity User Info */
.activity-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.activity-user-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.activity-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.activity-user-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1;
}

.activity-user-role {
    font-size: 0.625rem;
    color: #6b7280;
    line-height: 1;
}

/* Activity Performed By */
.activity-performed-by {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.activity-performed-by::before {
    content: "Performed by:";
    font-weight: 500;
    color: #374151;
}

/* Activity Type Icons */
.activity-type-icon {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

/* Responsive Activity Layout */
@media (max-width: 768px) {
    .activity-item {
        padding: 1rem;
    }
    
    .activity-item .flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .activity-item .flex.items-center.justify-between {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Job Table Sorting Indicator */
.job-table-header-sort {
    position: relative;
}

.job-table-header-sort i {
    transition: all 0.2s ease;
}

.job-table-header-sort:hover i {
    color: #00a9ea !important;
    transform: scale(1.1);
}

/* Job Status Priority Colors */
.status-pending { background-color: #fef3c7; color: #92400e; }
.status-in-progress { background-color: #dbeafe; color: #1e40af; }
.status-invoiced { background-color: #e0e7ff; color: #3730a3; }
.status-ready { background-color: #ddd6fe; color: #5b21b6; } /* Purple variant of invoiced to show workflow connection */
.status-completed { background-color: #f0fdf4; color: #15803d; }
.status-cancelled { background-color: #fef2f2; color: #dc2626; }

/* Invoice Status Badges */
.invoice-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.invoice-status-paid {
    background-color: #dcfce7;
    color: #166534;
}

.invoice-status-overdue {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Invoice Table Row Overdue Highlighting */
.table-row.bg-red-50 {
    border-left: 4px solid #dc2626;
}

/* Invoice Action Buttons */
.invoice-action-btn {
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.invoice-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

/* Reports Page Styles */
.metric-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.metric-card.revenue {
    border-left-color: #10b981;
}

.metric-card.jobs {
    border-left-color: #3b82f6;
}

.metric-card.customers {
    border-left-color: #8b5cf6;
}

.metric-card.avg-value {
    border-left-color: #f59e0b;
}

/* Chart Container Styles */
.chart-container {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 1rem;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00a9ea, #10b981, #f59e0b, #ef4444, #8b5cf6);
}

/* Chart Header Styles */
.chart-header {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
}

/* Filter Button Styles */
.filter-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.filter-btn:hover::before {
    left: 100%;
}

/* Export Button Styles */
.export-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.export-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.export-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Chart Loading Animation */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Chart Adjustments */
@media (max-width: 768px) {
    .chart-container {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .metric-card {
        margin-bottom: 1rem;
    }
}

/* Chart Tooltip Customization */
.echarts-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border: none !important;
    border-radius: 8px !important;
    color: white !important;
    font-family: 'Inter', sans-serif !important;
}

/* Chart Legend Customization */
.echarts-legend {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
}

/* Global Search Styles */
#search-results {
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.search-suggestion {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background-color: #f9fafb;
    transform: translateX(2px);
}

.search-suggestion .w-8.h-8 {
    transition: all 0.2s ease;
}

.search-suggestion:hover .w-8.h-8 {
    transform: scale(1.1);
    background-color: #f3f4f6;
}

/* Search input focus states */
#global-search:focus {
    box-shadow: 0 0 0 3px rgba(0, 169, 234, 0.1);
}

/* Mobile responsive search */
@media (max-width: 768px) {
    #global-search {
        width: 200px;
    }
    
    #search-results {
        width: 300px;
        left: -50px;
    }
}

/* Modern Job Queue Card Styles */
.job-queue-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.job-queue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00a9ea, #10b981, #f59e0b, #ef4444, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.job-queue-card:hover::before {
    opacity: 1;
}

/* Modern Status Badges */
.status-badge-modern {
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.status-badge-modern.status-pending {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fbbf24;
}

.status-badge-modern.status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.status-badge-modern.status-ready {
    background-color: #ddd6fe;
    color: #5b21b6;
    border-color: #8b5cf6;
}

.status-badge-modern.status-completed {
    background-color: #dcfce7;
    color: #166534;
    border-color: #10b981;
}

.status-badge-modern.status-invoiced {
    background-color: #e0e7ff;
    color: #3730a3;
    border-color: #6366f1;
}

.status-badge-modern.status-cancelled {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #ef4444;
}

/* Modern Priority Badges */
.priority-badge-modern {
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.priority-badge-modern:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Modern Action Buttons */
.action-btn-modern {
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.action-btn-modern:hover::before {
    left: 100%;
}

.action-btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Service Icons */
.service-icon {
    transition: all 0.2s ease;
}

.job-queue-card:hover .service-icon {
    transform: scale(1.1);
}

/* Card Hover Effects */
.job-queue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.job-queue-card:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .job-queue-card {
        padding: 1rem;
    }
    
    .job-queue-card .flex.items-start.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .job-queue-card .flex.items-center.space-x-2 {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .action-btn-modern {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

#customer-select:focus {
    border-color: #00a9ea;
    box-shadow: 0 0 0 3px rgba(0, 169, 234, 0.1);
}

#add-customer-btn {
    transition: all 0.2s ease;
}

#add-customer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 169, 234, 0.3);
}
