/* ==========================================================================
   TechMVP Job Management System - Cleaned and Organized Styles
   ========================================================================== */

/* ==========================================================================
   0. VUE.JS CLOAK DIRECTIVE
   ========================================================================== */

[v-cloak] {
    display: none;
}

/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 400;
    color: rgb(75, 85, 99);
    font-size: 14px;
    line-height: 20px;
    background-image: linear-gradient(to bottom right, #f8fafc, #eff6ff);
    min-height: 100vh; /* Ensure body has full viewport height for sticky positioning */
}

/* ==========================================================================
   2. LAYOUT COMPONENTS
   ========================================================================== */

.container {
    max-width: 455px;
    margin: 0 auto;
    min-height: 100vh; /* Ensure container has full height for sticky positioning */
    position: relative; /* Establish positioning context */
}

.header {
    background: white;
    border-radius: 0 0 8px 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Sticky Footer - Mirror of header but positioned at bottom */
.sticky-footer {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    bottom: 0;
    background: white;
    border-radius: 8px 8px 0 0; /* Opposite corners from header */
    margin-top: 20px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1); /* Shadow pointing upward */
    z-index: 100;
    padding: 12px 10px;
    border: 1px solid #e1e5e9;
    border-bottom: none;
}

.footer-info {
    min-height: 44px; /* Consistent height for touch targets */
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-label {
    font-weight: 600;
    color: #64748b;
    font-size: 14px;
}

.footer-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pending-photos-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #dc3545; /* Palette red, not too bright */
    color: white;
    margin-left: 8px;
    border: 1px solid #b91c2c;
}

.footer-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.footer-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.footer-btn-primary {
    background: #3b82f6;
    color: white;
}

.footer-btn-primary:hover {
    background: #2563eb;
}

.footer-btn-success {
    background: #10b981;
    color: white;
}

.footer-btn-success:hover {
    background: #059669;
}

/* Footer uses existing status-badge styles - no need for custom colors */

/* Responsive design for smaller screens */
@media (max-width: 480px) {
    .footer-info {
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
    }
    
    .footer-actions {
        justify-content: center;
    }
    
    .footer-btn {
        flex: 1;
        justify-content: center;
    }
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==========================================================================
   3. HEADER & JOB INFO
   ========================================================================== */

.job-info {
    gap: 5px;
    flex-wrap: wrap;
}

.job-info-status-badge {
        display: inline-block;
        border-radius: 0 0 8px 0;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-type {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 600;
    color: rgb(127, 29, 29);
    font-size: 18px;
    line-height: 28px;
    background: none !important;
    margin-left: 10px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.job-id {
    padding: 20px 25px;
    background: rgb(127, 29, 29) !important;
    color: white !important;
    font-family: monospace;
}

/* ==========================================================================
   4. TYPOGRAPHY & HEADINGS
   ========================================================================== */

.name-text {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 500;
    color: rgb(17, 24, 39);
    font-size: 16px;
    line-height: 24px;
}

.roles {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 400;
    color: rgb(107, 114, 128);
    font-size: 14px;
    line-height: 20px;
}

/* Section Titles - Alternative Style (Client, Service Provider, Address sections) */
.card h2.section-title-alt {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 600;
    color: rgb(75, 85, 99);
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
}

.card h2.section-title-alt i {
    color: rgb(127 29 29);
    font-size: 14px;
}

/* Section Titles - Primary Style (Job Details, Equipment, Documentation sections) */
.card h2.section-title-primary {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 600;
    color: rgb(127, 29, 29);
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 20px;
    border-bottom: 3px solid #e2e8f0;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card h2.section-title-primary i {
    color: rgb(127, 29, 29);
    font-size: 20px;
}

.primary-section-header {
    background-color: #f7fafc;
    margin-top: -24px;
    margin-left: -24px;
    margin-right: -24px;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.primary-section-header:hover {
    background-color: #edf2f7;
}

.primary-section-header.job-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-chevron {
    font-size: 14px;
    color: #718096;
    transition: transform 0.3s ease;
}

.accordion-chevron.rotated {
    transform: rotate(180deg);
}

/* Collapsible Content */
.collapsible-content {
    max-height: none;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.primary-section-header h2.section-title-primary {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.card h3 {
    margin-bottom: 16px;
    margin-top: 24px;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card h3 i {
    color: #718096;
    font-size: 14px;
}

/* ==========================================================================
   5. STATUS BADGES
   ========================================================================== */

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 25px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-badge.scheduled {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.pending {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.status-badge.completed {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.in-progress {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.status-badge.in-transit {
    background: linear-gradient(135deg, #e1f5fe, #b3e5fc);
    color: #0277bd;
    border: 1px solid #b3e5fc;
}

.status-badge.signed-off {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.status-badge.rescheduled {
    background: linear-gradient(135deg, #fce4ec, #f8bbd9);
    color: #c2185b;
    border: 1px solid #f8bbd9;
}

/* ==========================================================================
   6. ADDRESS SECTION
   ========================================================================== */

.address {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #38a169;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    color: #2d3748;
    transition: all 0.3s ease;
    position: relative;
}

.address:hover {
    background: #edf2f7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.address-buttons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 12px;
}

.address-btn {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.address-btn:hover {
    background: #f8fafc;
    color: #475569;
    border-color: #cbd5e1;
}

.address-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   7. EQUIPMENT & TABLES
   ========================================================================== */

.table-wrapper {
    overflow-x: auto;
    padding: 0 16px;
}

.equipment-list table {
    width: 100%;
    border-collapse: collapse;
    min-width: 300px;
}

.equipment-list th,
.equipment-list td {
    padding: 12px;
    padding-left: 0;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.equipment-list th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.equipment-list tr:hover {
    background: #f8f9fa;
}

/* ==========================================================================
   8. INSTALLATION CHECKLIST
   ========================================================================== */

.installation-checklist {
    margin-top: 24px;
    margin-bottom: 12px;
}

.installation-checklist h3 {
    color: #495057;
    margin-bottom: 12px;
    font-size: 16px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checklist-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: #007bff;
    cursor: pointer;
}

.checklist-item label {
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    line-height: 1.4;
}

/* ==========================================================================
   9. ADDITIONAL ITEMS SECTION
   ========================================================================== */

.additional-items-section {
    margin-top: 24px;
}

.additional-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.additional-items-title {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 600;
    color: rgb(127, 29, 29);
    font-size: 18px;
    line-height: 24px;
}

.add-item-btn {
    background: #7f1d1d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.add-item-btn:hover {
    background: #991b1b;
    transform: translateY(-1px);
}

.add-item-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.checkbox-row label {
    margin: 0;
    cursor: pointer;
}

.pricing-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.pricing-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.qty-input, .price-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.total-display {
    background: #f3f4f6;
    padding: 8px 10px;
    border-radius: 6px;
    font-weight: 600;
    color: #374151;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.save-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.save-btn:hover {
    background: #059669;
}

.cancel-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.cancel-btn:hover {
    background: #4b5563;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.delete-btn:hover {
    background: #dc2626;
}

.added-items {
    margin-top: 16px;
}

.added-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.item-content {
    flex: 1;
}

.item-description {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.item-pricing {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 4px;
}

.client-approved {
    color: #10b981;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.remove-btn {
    background: #fff;
    opacity: 0.9;
    color: #7f1d1d;
    border: none;
    padding: 8px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.remove-btn:hover {
    background: #e2e8f0;
}

.subtotal-divider {
    border: none;
    height: 1px;
    background-color: #e2e8f0;
    margin: 16px 0 12px 0;
    opacity: unset;
}

.items-subtotal {
    text-align: right;
    padding: 8px 0;
}

.subtotal-label {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 500;
    color: rgb(75, 85, 99);
    font-size: 14px;
    line-height: 20px;
    display: block;
    margin-bottom: 2px;
}

.subtotal-amount {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 600;
    color: rgb(127, 29, 29);
    font-size: 18px;
    line-height: 28px;
    display: block;
}

/* ==========================================================================
   10. COMMENTS SECTION
   ========================================================================== */

.additional-comments {
    margin-top: 12px;
}

.additional-comments h3 {
    color: #495057;
    margin-bottom: 16px;
    font-size: 16px;
}

.comment-field {
    margin-bottom: 16px;
}

.comment-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.comment-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    min-height: 80px;
}

.comment-field textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.comment-field textarea::placeholder {
    color: #6c757d;
}

/* ==========================================================================
   11. TIMELINE PROGRESS SECTION
   ========================================================================== */

.timeline-progress {
    margin-top: 24px;
}

.timeline-progress-title {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 600;
    color: rgb(139, 69, 19);
    font-size: 18px;
    line-height: 28px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-info {
    margin-bottom: 20px;
}

.progress-text {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 400;
    color: rgb(107, 114, 128);
    font-size: 14px;
    line-height: 20px;
}

.timeline {
    margin: 12px 0;
    position: relative;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
}

/* Timeline connecting lines */
.timeline-item:not(:first-child):before {
    content: '';
    position: absolute;
    left: 12px;
    top: -8px;
    height: 16px;
    width: 2px;
    background: #dee2e6;
    z-index: 1;
}

.timeline-item:not(:last-child):after {
    content: '';
    position: absolute;
    left: 12px;
    bottom: -8px;
    height: 16px;
    width: 2px;
    background: #dee2e6;
    z-index: 1;
}

.timeline-item.completed:before,
.timeline-item.completed:after {
    background: #28a745;
}

.timeline-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 16px;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.timeline-item.completed .timeline-marker {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.timeline-item.active .timeline-marker {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.timeline-content {
    flex: 1;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

.timeline-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-content h4 {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-style: normal;
    font-weight: 500;
    color: rgb(55, 65, 81);
    font-size: 18px;
    line-height: 28px;
    margin: 0;
}

.timeline-item.active .timeline-content h4 {
    color: #3b82f6;
}

.completion-time {
    color: #10b981;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.completion-time i {
    color: #10b981;
}

.timeline-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-btn:hover {
    background: #2563eb;
}

/* ==========================================================================
   12. ACTION BUTTONS
   ========================================================================== */

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-primary {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    background: #059669;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    border-color: #9ca3af;
}

.btn-secondary:disabled,
.btn-secondary.disabled {
    background: #f9fafb;
    color: #d1d5db;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* ==========================================================================
   13. PHOTO UPLOAD SECTION
   ========================================================================== */

.photo-uploads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 16px;
    /* padding: 16px; */
    /* border: 1px solid #dee2e6; */
    border-radius: 8px;
    transition: all 0.3s ease;
}

.upload-item:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.upload-box {
    width: 95px;
    height: 82px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-box:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.upload-box.has-photo {
    border: 1px solid #dee2e6;
}

.upload-box.has-photo:hover {
    border: none;
    background: transparent;
}

.photo-preview {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uploaded-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 10px;
}

.photo-overlay i {
    font-size: 16px;
    margin-bottom: 2px;
}

.photo-overlay p {
    margin: 0;
    font-size: 8px;
    color: white;
}

.upload-box:hover .photo-overlay {
    opacity: 1;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.upload-box p {
    font-size: 10px;
    color: #bcc2c8;
    text-align: center;
}

.upload-label strong {
    display: block;
    color: #2c3e50;
}

.upload-label p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 4px;
    margin-top: 2px;
}

.required {
    color: #dc3545;

}

.photo-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.preview-btn {
    background: #6366f1;
    color: white;
    padding: 4px 8px;
        border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

        

.preview-btn:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.preview-btn i {
    font-size: 10px;
}

.delete-photo-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.delete-photo-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.delete-photo-btn i {
    font-size: 10px;
}

/* ==========================================================================
   14. LOADING & ERROR STATES
   ========================================================================== */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-container {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.error-container h3 {
    margin-bottom: 10px;
    color: #721c24;
}

.error-container p {
    margin-bottom: 15px;
}

/* ==========================================================================
   15. SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ==========================================================================
   17. CALENDAR MODAL STYLES
   ========================================================================== */

.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.calendar-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-header {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-info {
    border-bottom: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.calendar-info i {
    color: #374151;
}

.calendar-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.calendar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.calendar-body {
    padding: 20px;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.nav-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #e2e8f0;
}

.current-month {
    font-weight: 600;
    font-size: 16px;
    color: #374151;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.weekday {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    padding: 8px 4px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    min-height: 40px;
}

.calendar-day:hover {
    background: #f3f4f6;
}

.calendar-day.other-month {
    color: #d1d5db;
}

.calendar-day.today {
    font-weight: 600;
    background: #f9fafb;
}

.calendar-day.selected {
    font-weight: 600;
    border: 1px solid #3b82f6;
    background: #dbeafe;
    color: #111;
}

.calendar-day.past {
    color: #d1d5db;
    cursor: not-allowed;
}

.calendar-day.past:hover {
    background: transparent;
}

.calendar-day.beyond-limit {
    color: #d1d5db;
    cursor: not-allowed;
    background: #f9fafb;
    opacity: 0.5;
}

.calendar-day.beyond-limit:hover {
    background: #f9fafb;
}

.time-selection {
    margin-bottom: 10px;
    padding: 5px;
    background: #f9fafb;
    border-radius: 8px;
}

.time-selection h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

.time-slots {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 5px;
}

.time-slot {
    padding: 10px 5px;
    border: 1px solid #10b981;
    border-radius: 8px;
    background: #f0fdf4;
    cursor: pointer;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.time-slot:hover {
    border-color: #3b82f6;
    background: #dbeafe;
}

.time-slot.selected {
    border-color: #3b82f6;
    background: #dbeafe;
    color: #111;
}

.calendar-actions {
    display: flex;
    gap: 12px;
}

.confirm-btn {
    flex: 1;
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.confirm-btn:hover:not(:disabled) {
    background: #059669;
}

.confirm-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.cancel-calendar-btn {
    flex: 1;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.cancel-calendar-btn:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   17.5. PHOTO PREVIEW MODAL
   ========================================================================== */

.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.photo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.photo-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.close-photo-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

.photo-info {
    margin-top: 15px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.photo-info p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* ==========================================================================
   17.6. RESCHEDULE CONFIRMATION MODAL
   ========================================================================== */

.reschedule-confirmation {
    max-width: 450px;
    width: 90%;
}

.confirmation-body {
    padding: 20px;
}

.warning-message {
    text-align: center;
    margin-bottom: 24px;
}

.warning-message i {
    font-size: 38px;
    color: #dc2626;
    margin-bottom: 5px;
}

.warning-message p {
    margin: 8px 0;
    font-size: 16px;
    color: #374151;
}

.warning-details {
    font-weight: 600;
    color: #dc2626;
    margin-top: 16px !important;
}

.warning-list {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 12px 0;
    background-image: linear-gradient(to bottom right, #f8fafc, #eff6ff);
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #333;
}

.warning-list li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    font-weight: 500;
}

.warning-list li:before {
    content: "\f071";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #dc2626;
    font-size: 12px;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-reschedule-btn {
    flex: 1;
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.confirm-reschedule-btn:hover {
    background: #b91c1c;
}

.cancel-reschedule-btn {
    flex: 1;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.cancel-reschedule-btn:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   17.6. CUSTOM NOTIFICATION SYSTEM
   ========================================================================== */

.custom-notification {
    position: fixed;
    bottom: 90px; /* Position above sticky footer (footer height ~70px + margin) */
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: calc(455px - 40px); /* Match main container width minus container padding */
    max-width: calc(100vw - 40px); /* Ensure proper margins on all screen sizes */
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 200; /* Higher than sticky footer z-index: 100 */
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #28a745;
}

.custom-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.custom-notification.success {
    border-left-color: #28a745;
}

.custom-notification.error {
    border-left-color: #dc3545;
}

.custom-notification.warning {
    border-left-color: #ff9500;
}

.custom-notification.info {
    border-left-color: #007bff;
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.notification-content i {
    font-size: 18px;
    flex-shrink: 0;
}

.custom-notification.success i {
    color: #28a745;
}

.custom-notification.error i {
    color: #dc3545;
}

.custom-notification.warning i {
    color: #ff9500;
}

.custom-notification.info i {
    color: #007bff;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .custom-notification {
       /*  bottom: 120px; Account for potentially taller footer on mobile */
        width: calc(100vw - 30px); /* Full width minus consistent margins on mobile */
        max-width: calc(100vw - 30px);
    }
    
    .notification-content {
        padding: 14px 16px;
    }
    
    .notification-message {
        font-size: 13px;
    }
}

/* ==========================================================================
   18. RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .container {
        padding: 0;
    }
    
    .job-info {
        
        align-items: flex-start;
    }
    
    .photo-uploads {
        grid-template-columns: 1fr;
    }
    
    /* .upload-item {
        flex-direction: column;
        text-align: center;
    } */
    
    .action-buttons {
        flex-direction: column;
    }
    
    /* Calendar mobile optimizations */
    .calendar-modal {
        padding: 10px;
    }
    
    .calendar-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .calendar-header {
        padding: 16px;
        margin-top: 25px;
    }
    
    .calendar-body {
        padding: 16px;
    }
    
    .calendar-day {
        min-height: 35px;
        font-size: 13px;
    }
    
    .time-inputs {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .time-select {
        min-width: 55px;
        padding: 6px 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .loading-container {
        min-height: 200px;
    }
    
    .loading-spinner {
        width: 35px;
        height: 35px;
        border-width: 3px;
    }
    
    /* Full screen calendar on very small screens */
    .calendar-modal {
        padding: 0;
    }
    
    .calendar-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    
    .calendar-header {
        border-radius: 0;
    }
    
    .calendar-day {
        min-height: 32px;
        font-size: 12px;
    }
    
    .weekday {
        font-size: 11px;
        padding: 6px 2px;
    }
}
