/* ShopForge Inspect — Customer-Facing DVI Page (mobile-first) */

#inspection-app {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2d3748;
    background: #f7fafc;
    min-height: 100vh;
}

/* Loading */
.insp-loading {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}
.insp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: insp-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}
@keyframes insp-spin {
    to { transform: rotate(360deg); }
}

/* Error */
.insp-error-box {
    text-align: center;
    padding: 40px 20px;
}
.insp-error-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fed7d7;
    color: #e53e3e;
    font-size: 28px;
    font-weight: 700;
    line-height: 50px;
    margin: 0 auto 15px;
}

/* Header */
.insp-header {
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
    color: #fff;
    padding: 24px 20px 20px;
    text-align: center;
}
.insp-shop-name {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 8px;
}
.insp-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}
.insp-vehicle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}
.insp-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    opacity: 0.9;
    flex-wrap: wrap;
}

/* Legend */
.insp-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}
.insp-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.insp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.insp-dot.insp-good { background: #48bb78; }
.insp-dot.insp-soon { background: #ecc94b; }
.insp-dot.insp-immediate { background: #e53e3e; }

/* Summary cards */
.insp-summary {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    justify-content: center;
}
.insp-summary-card {
    flex: 1;
    max-width: 120px;
    text-align: center;
    padding: 12px 8px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.insp-summary-card.immediate { border-top: 3px solid #e53e3e; }
.insp-summary-card.soon { border-top: 3px solid #ecc94b; }
.insp-summary-card.good { border-top: 3px solid #48bb78; }
.insp-summary-count {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}
.insp-summary-card.immediate .insp-summary-count { color: #e53e3e; }
.insp-summary-card.soon .insp-summary-count { color: #d69e2e; }
.insp-summary-card.good .insp-summary-count { color: #38a169; }
.insp-summary-label {
    font-size: 10px;
    color: #718096;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status banner */
.insp-banner {
    margin: 12px 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
.insp-banner.approved {
    background: #c6f6d5;
    color: #276749;
}
.insp-banner.declined {
    background: #fed7d7;
    color: #9b2c2c;
}

/* Category */
.insp-category {
    margin: 16px 12px;
}
.insp-cat-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4a5568;
    padding: 0 8px 6px;
    border-bottom: 2px solid #e2e8f0;
    margin: 0 0 8px;
}

/* Individual item */
.insp-item {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.insp-item-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    gap: 10px;
}
.insp-condition-bar {
    width: 4px;
    height: 28px;
    border-radius: 2px;
    flex-shrink: 0;
}
.insp-condition-bar.good { background: #48bb78; }
.insp-condition-bar.soon { background: #ecc94b; }
.insp-condition-bar.immediate { background: #e53e3e; }

.insp-item-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}
.insp-condition-text {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}
.insp-condition-text.good { background: #c6f6d5; color: #276749; }
.insp-condition-text.soon { background: #fefcbf; color: #975a16; }
.insp-condition-text.immediate { background: #fed7d7; color: #9b2c2c; }

/* Photo */
.insp-photo-wrap {
    padding: 0 14px;
}
.insp-photo {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: max-height 0.3s ease;
}
.insp-photo.expanded {
    max-height: 600px;
    object-fit: contain;
}

/* Notes */
.insp-notes {
    padding: 6px 14px 10px;
    font-size: 13px;
    color: #718096;
    font-style: italic;
}

/* Item footer (cost + approve) */
.insp-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-top: 1px solid #edf2f7;
    background: #f7fafc;
}
.insp-cost {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
}
.insp-approve-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2b6cb0;
    cursor: pointer;
}
.insp-approve-check {
    width: 20px;
    height: 20px;
    accent-color: #48bb78;
    cursor: pointer;
}
.insp-approved-badge {
    background: #c6f6d5;
    color: #276749;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Approval section */
.insp-approval-section {
    margin: 20px 12px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.insp-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}
.insp-running-total {
    font-size: 22px;
    font-weight: 700;
    color: #2b6cb0;
}
.insp-notes-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    min-height: 60px;
    resize: vertical;
    margin-bottom: 16px;
    font-family: inherit;
    box-sizing: border-box;
}
.insp-notes-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.2);
}
.insp-approve-btn {
    width: 100%;
    padding: 14px;
    background: #48bb78;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.15s;
}
.insp-approve-btn:hover { background: #38a169; }
.insp-approve-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}
.insp-decline-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #a0aec0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.insp-decline-btn:hover {
    color: #e53e3e;
    border-color: #fed7d7;
    background: #fff5f5;
}

/* Call shop */
.insp-call-shop {
    text-align: center;
    padding: 20px;
}
.insp-call-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #2b6cb0;
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.insp-call-btn:hover { background: #2c5282; color: #fff; }

/* Footer */
.insp-footer {
    text-align: center;
    padding: 20px;
    color: #cbd5e0;
    font-size: 11px;
}

/* Responsive */
@media (max-width: 400px) {
    .insp-summary { flex-direction: column; align-items: center; }
    .insp-summary-card { max-width: 100%; width: 100%; }
    .insp-meta { flex-direction: column; gap: 4px; }
    .insp-legend { gap: 8px; font-size: 11px; }
}
