/* Additional styles for settings page */
        .settings-container {
            display: grid;
            grid-template-columns: 1fr; /* single column to support top tabs */
            gap: 0;
            background: white;
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e2e8f0;
            overflow: hidden;
            min-height: calc(100vh - 128px);
        }

        .settings-nav {
            display: flex;
            gap: 8px;
            background: #ffffff;
            border-bottom: 1px solid #e2e8f0;
            padding: 12px 16px;
            position: sticky;
            top: 0;
            z-index: 2;
            overflow-x: auto;
        }

        .settings-nav-item {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            color: #475569;
            text-decoration: none;
            font-weight: 600;
            border-radius: 8px;
            border: 1px solid transparent;
            transition: background-color 0.2s, color 0.2s, border-color 0.2s;
            white-space: nowrap;
        }

        .settings-nav-item:hover {
            background: #f8fafc;
            color: #1e293b;
        }

        .settings-nav-item.active {
            background: #eef2ff;
            color: #1d4ed8;
            border-color: #c7d2fe;
        }

        .settings-nav-item i {
            margin-right: 8px;
        }

        .settings-content {
            padding: 24px;
            overflow-y: auto;
        }

        .settings-section {
            display: none;
        }

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

        .section-header {
            margin-bottom: 32px;
        }

        .section-title {
            font-size: 24px;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 8px;
        }

        .section-subtitle {
            color: #64748b;
            font-size: 16px;
        }

        .settings-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 24px;
        }

        .card-title {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 6px;
        }

        .card-subtitle {
            color: #64748b;
            font-size: 14px;
            margin-bottom: 20px;
        }

        .form-group {
            margin-bottom: 14px;
        }

        .form-group:last-child {
            margin-bottom: 0;
        }

        .form-label {
            display: block;
            font-weight: 500;
            color: #374151;
            margin-bottom: 6px;
        }

        .form-input, .form-select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.2s;
        }

        .form-input:focus, .form-select:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 28px;
        }

        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .toggle-slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #cbd5e1;
            transition: .3s;
            border-radius: 28px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }

        input:checked + .toggle-slider {
            background-color: #2563eb;
        }

        input:checked + .toggle-slider:before {
            transform: translateX(22px);
        }

        .setting-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 0;
            border-bottom: 1px solid #f1f5f9;
        }

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

        .setting-info h4 {
            font-weight: 500;
            color: #1e293b;
            margin-bottom: 4px;
        }

        .setting-info p {
            color: #64748b;
            font-size: 14px;
        }

        .avatar-upload {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-bottom: 24px;
        }

        .avatar-preview {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, #2563eb, #3b82f6);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            color: white;
        }

        .avatar-actions {
            flex: 1;
        }

        .btn-secondary {
            background: #f8fafc;
            color: #374151;
            border: 1px solid #d1d5db;
            margin-right: 12px;
        }

        .btn-secondary:hover {
            background: #f1f5f9;
        }

        .danger-zone {
            border: 1px solid #fecaca;
            background: #fef2f2;
            border-radius: 12px;
            padding: 20px;
            margin-top: 32px;
        }

        .danger-zone h3 {
            color: #dc2626;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .danger-zone p {
            color: #7f1d1d;
            font-size: 14px;
            margin-bottom: 16px;
        }

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

        .btn-danger:hover {
            background: #b91c1c;
        }

        .integration-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            margin-bottom: 16px;
        }

        .integration-info {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .integration-icon {
            width: 48px;
            height: 48px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }

        .integration-google {
            background: #fef3c7;
            color: #d97706;
        }

        .integration-slack {
            background: #ecfccb;
            color: #65a30d;
        }

        .integration-dropbox {
            background: #dbeafe;
            color: #2563eb;
        }

        .integration-details h4 {
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 4px;
        }

        .integration-details p {
            color: #64748b;
            font-size: 14px;
        }

        .connected-badge {
            padding: 4px 12px;
            background: #dcfce7;
            color: #166534;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }

        .storage-usage {
            margin-bottom: 24px;
        }

        .usage-bar {
            width: 100%;
            height: 12px;
            background: #f1f5f9;
            border-radius: 6px;
            overflow: hidden;
            margin-bottom: 12px;
        }

        .usage-fill {
            height: 100%;
            background: linear-gradient(90deg, #2563eb, #3b82f6);
            border-radius: 6px;
            width: 45%;
            transition: width 0.3s ease;
        }

        .usage-stats {
            display: flex;
            justify-content: space-between;
            font-size: 14px;
            color: #64748b;
        }

        @media (max-width: 768px) {
            .settings-content {
                padding: 16px;
            }

            .avatar-upload {
                flex-direction: column;
                text-align: center;
                gap: 16px;
            }
        }

/* ==================== CONTRACTOR PROFILE FORM STYLES ==================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.text-link {
    color: #2563eb;
    text-decoration: underline;
}

.text-link:hover {
    color: #1d4ed8;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Photo Preview Styling */
#photoPreview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    margin-top: 0.5rem;
}

#photoPreview.hidden {
    display: none;
}

.space-y-6 > * + * {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .button-group {
        width: 100%;
        flex-direction: column;
    }

    .button-group button {
        width: 100%;
    }
}

/* ==================== BILLING & USAGE STYLES ==================== */
.current-plan-card {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 2px solid #2563eb;
}

.current-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #cbd5e1;
}

.plan-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.free-badge {
    background: #dcfce7;
    color: #166534;
}

.usage-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.usage-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usage-item {
    margin-bottom: 20px;
}

.usage-item:last-child {
    margin-bottom: 0;
}

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

.usage-label {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.usage-label i {
    margin-right: 6px;
    color: #2563eb;
}

.usage-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* ==================== ACCORDION (to reduce scroll) ==================== */
.accordion {
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.accordion-toggle .fa-chevron-down {
    transition: transform 0.2s ease;
}

.accordion-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.accordion-content {
    margin-top: 8px;
}

.accordion-content.collapsed {
    display: none;
}

/* ==================== STICKY FORM ACTIONS ==================== */
.form-actions.sticky {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 10px 0 0;
    border-top: 1px solid #e2e8f0;
    z-index: 5;
}

/* ==================== DENSER GRID ON LARGE SCREENS ==================== */
@media (min-width: 1200px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}