:root {
    --primary: #607D8B;
    --primary-dark: #455a64;
    --accent: #4db6ac;
    --accent-dark: #3a9087;
    --success: #2e7d32;
    --error: #c62828;
    --warning: #f57c00;
    --bg: #f0f4f5;
    --card: #ffffff;
    --text: #333333;
    --text-muted: #666666;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(96, 125, 139, 0.12);
    --radius: 12px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.quote-page {
    font-family: 'Roboto', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.quote-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.quote-header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.quote-header a.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.quote-header img {
    height: 45px;
    width: auto;
}

.quote-header h1 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.quote-header .back-home {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.9;
    transition: opacity var(--transition);
    white-space: nowrap;
}

.quote-header .back-home:hover {
    opacity: 1;
    color: var(--accent);
}

.quote-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.quote-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.quote-intro h2 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.quote-intro p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Progress Indicator */
.progress-wrapper {
    margin-bottom: 2.5rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 0.75rem;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.progress-bar-fill {
    position: absolute;
    top: 18px;
    left: 10%;
    height: 3px;
    background: var(--accent);
    z-index: 1;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
    transition: transform 0.15s ease;
}

.progress-step:hover .step-circle {
    border-color: var(--accent);
    transform: scale(1.06);
}

.progress-step:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 8px;
}

.progress-step-hidden {
    cursor: default;
    pointer-events: none;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all var(--transition);
}

.progress-step.active .step-circle {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.progress-step.completed .step-circle {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.step-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
    max-width: 80px;
}

.progress-step.active .step-label {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Form Card */
.form-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-step h3 {
    font-size: 1.35rem;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
}

.form-step .step-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.form-group label .required {
    color: var(--error);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 182, 172, 0.15);
}

.booking-services-select {
    min-height: 11rem;
    padding: 0.5rem;
}

.booking-services-picker {
    margin-top: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    max-height: 320px;
    overflow-y: auto;
}

#booking-step-2 .booking-services-picker {
    max-height: none;
    overflow: visible;
}

.booking-services-picker .service-category {
    margin-bottom: 0.65rem;
}

.booking-services-picker .service-category:last-child {
    margin-bottom: 0;
}

.booking-services-picker .service-category h4 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 0.4rem;
    padding-bottom: 0;
    border-bottom: none;
    opacity: 0.85;
}

.booking-services-picker .service-category h4 i {
    font-size: 0.7rem;
    opacity: 0.75;
}

.booking-service-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.booking-service-card {
    flex: 0 1 auto;
}

.booking-service-card label {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.55rem;
    min-height: 0;
    border-radius: 999px;
    border-width: 1px;
    height: auto;
}

.booking-service-card label:hover {
    border-color: var(--accent);
    background: rgba(77, 182, 172, 0.04);
}

.booking-service-card input:checked + label {
    background: rgba(77, 182, 172, 0.12);
    box-shadow: none;
}

.booking-check {
    flex-shrink: 0;
    width: 0.9rem;
    height: 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
    color: transparent;
    transition: all var(--transition);
}

.booking-service-card input:checked + label .booking-check {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.booking-service-card .service-name {
    margin-bottom: 0;
    flex: 0 1 auto;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .booking-services-picker {
        max-height: 280px;
        padding: 0.6rem;
    }

    .booking-service-card .service-name {
        white-space: normal;
    }

    .booking-service-card label {
        border-radius: 8px;
        padding: 0.35rem 0.5rem;
    }
}

.booking-review-summary {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.booking-review-summary .client-summary {
    margin: 0;
}

.booking-review-summary .client-summary dt {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.booking-review-summary .client-summary dt:first-child {
    margin-top: 0;
}

.booking-review-summary .client-summary dd {
    margin: 0.15rem 0 0;
    color: var(--primary-dark);
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.booking-review-summary .client-summary dd.notes-value {
    white-space: pre-wrap;
}

.booking-page .form-nav {
    justify-content: flex-end;
    gap: 1rem;
}

.booking-page .form-nav #booking-btn-prev {
    margin-right: auto;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 0.25rem;
}

.form-label .required {
    color: var(--error);
}

.field-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.booking-availability-hint {
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.25rem;
}

.booking-availability-hint i {
    margin-right: 0.35rem;
}

.booking-availability-hint.available {
    background: rgba(77, 182, 172, 0.1);
    color: var(--accent-dark);
    border: 1px solid rgba(77, 182, 172, 0.25);
}

.booking-availability-hint.busy {
    background: rgba(96, 125, 139, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(96, 125, 139, 0.2);
}

.booking-availability-hint.unavailable {
    background: rgba(198, 40, 40, 0.08);
    color: var(--error);
    border: 1px solid rgba(198, 40, 40, 0.2);
}

.timezone-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--primary-dark);
    background: rgba(96, 125, 139, 0.08);
    border: 1px solid rgba(96, 125, 139, 0.18);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin: 0 0 1rem;
}

.timezone-notice i {
    color: var(--accent);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error);
}

.form-group .field-error {
    color: var(--error);
    font-size: 0.8rem;
    display: none;
}

.form-group .field-error.visible {
    display: block;
}

/* Radio / Toggle Groups */
.radio-group,
.toggle-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option,
.toggle-option {
    flex: 1;
    min-width: 120px;
}

.radio-option input,
.toggle-option input {
    display: none;
}

.radio-option label,
.toggle-option label {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.radio-option input:checked + label,
.toggle-option input:checked + label {
    border-color: var(--accent);
    background: rgba(77, 182, 172, 0.1);
    color: var(--accent-dark);
}

/* Service Selection */
.service-category {
    margin-bottom: 2rem;
}

.service-category h4 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.service-card {
    position: relative;
}

.service-card input {
    display: none;
}

.service-card label {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    height: 100%;
}

.service-card label:hover {
    border-color: var(--accent);
}

.service-card input:checked + label {
    border-color: var(--accent);
    background: rgba(77, 182, 172, 0.08);
    box-shadow: 0 0 0 1px var(--accent);
}

.service-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 0.35rem;
}

.service-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.service-price {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.service-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.service-badge.monthly {
    background: rgba(77, 182, 172, 0.15);
    color: var(--accent-dark);
}

.service-badge.once {
    background: rgba(96, 125, 139, 0.15);
    color: var(--primary-dark);
}

.services-error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.services-error.visible {
    display: block;
}

/* Quote Summary */
.quote-ref {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.quote-ref span {
    font-size: 0.85rem;
    opacity: 0.85;
}

.quote-ref strong {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.summary-section {
    margin-bottom: 1.75rem;
}

.summary-section h4 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.summary-table th,
.summary-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.summary-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--primary-dark);
}

.summary-table td.amount {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.summary-totals {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.total-row.grand {
    border-top: 2px solid var(--accent);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.disclaimer {
    background: #fff8e1;
    border-left: 4px solid var(--warning);
    padding: 1rem 1.25rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: #5d4037;
    margin-top: 1.5rem;
}

.client-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.client-summary dt {
    font-weight: 600;
    color: var(--text-muted);
}

.client-summary dd {
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.package-note {
    background: rgba(77, 182, 172, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--accent-dark);
    margin-bottom: 1rem;
}

/* Navigation Buttons */
.form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.btn {
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary-dark);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #1b5e20;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Toast / Alert */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-dark);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s ease;
    max-width: 90%;
    text-align: center;
}

.toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

/* Loading */
.success-message {
    text-align: center;
    padding: 1rem 0;
}

.success-message .success-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.success-message h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.success-message p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.visible {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

    .form-card {
        padding: 1.5rem;
    }

    .step-label {
        font-size: 0.6rem;
        max-width: 60px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .client-summary {
        grid-template-columns: 1fr;
    }

    .form-nav {
        flex-direction: column-reverse;
    }

    .form-nav .btn {
        width: 100%;
        justify-content: center;
    }

    .quote-header h1 {
        font-size: 0.85rem;
    }

    .summary-actions {
        flex-direction: column;
    }

    .summary-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .progress-step .step-label {
        display: none;
    }

    .quote-container {
        padding: 1.25rem 1rem 3rem;
    }
}
