.appointment-page {
    background: #f8fafc;
}


.appointment-hero {
    padding-top: calc(var(--spacing-unit) * 16);
    padding-bottom: calc(var(--spacing-unit) * 10);
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.35), transparent 60%),
        linear-gradient(155deg, #020617 0%, #0b1220 40%, #111827 100%);
    color: #e2e8f0;
}

.appointment-hero .container {
    max-width: 960px;
    text-align: center;
}

.appointment-hero h1 {
    font-family: var(--font-family-serif);
    font-size: clamp(2.5rem, 3vw, 3.25rem);
    color: #f8fafc;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.appointment-hero p {
    color: rgba(226, 232, 240, 0.7);
    font-size: 1.1rem;
    line-height: 1.7;
}

.appointment-interface {
    padding-top: calc(var(--spacing-unit) * 6);
    padding-bottom: calc(var(--spacing-unit) * 6);
}

.booking-shell {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(280px, 320px);
    align-items: stretch;
    gap: calc(var(--spacing-unit) * 4);
    background: #ffffff;
    border-radius: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 4);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.appointment-profile {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 60%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.78));
    color: #f8fafc;
    border-radius: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 3);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: calc(var(--spacing-unit) * 2.5);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: calc(var(--spacing-unit) * 2);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(96, 165, 250, 0.95);
    font-size: 1.8rem;
}

.profile-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 0.5);
}

.profile-role {
    color: rgba(241, 245, 249, 0.8);
    font-size: 0.95rem;
}

.profile-meta {
    display: grid;
    gap: calc(var(--spacing-unit) * 1.5);
    grid-auto-rows: min-content;
}

.profile-meta li {
    display: flex;
    gap: calc(var(--spacing-unit) * 1.5);
    align-items: center;
    font-size: 0.95rem;
    color: rgba(241, 245, 249, 0.85);
}

.profile-meta i {
    font-size: 1.2rem;
    color: rgba(96, 165, 250, 0.95);
}

.profile-note {
    background: rgba(148, 163, 184, 0.12);
    padding: calc(var(--spacing-unit) * 1.75);
    border-radius: calc(var(--spacing-unit) * 1.5);
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.scheduler-column {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 3);
    min-height: 100%;
}

.calendar-panel {
    background: #f8fafc;
    border-radius: calc(var(--spacing-unit) * 2);
    padding: clamp(calc(var(--spacing-unit) * 2), 4.5vw, calc(var(--spacing-unit) * 3));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 16px 35px rgba(148, 163, 184, 0.18);
    flex: 1 1 auto;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.calendar-month {
    font-weight: 600;
    font-size: 1.1rem;
    color: #0f172a;
}

.calendar-nav {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d4ed8;
    transition: all 0.2s ease;
}

.calendar-nav:hover:not([disabled]) {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
}

.calendar-nav[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(6px, 1.4vw, 12px);
    width: 100%;
    box-sizing: border-box;
}

.calendar-weekday {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

.calendar-days {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(6px, 1.2vw, 10px);
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.calendar-day {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: calc(var(--spacing-unit) * 2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
}

.calendar-day.empty {
    cursor: default;
    border: none;
    background: transparent;
    pointer-events: none;
}

.calendar-day:hover:not(.disabled) {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.calendar-day.selected {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 16px 30px rgba(29, 78, 216, 0.3);
}

.calendar-day.disabled {
    color: rgba(148, 163, 184, 0.6);
    cursor: not-allowed;
    background: #f1f5f9;
    border-style: dashed;
    pointer-events: none;
}

.timezone-select label {
    display: block;
    font-size: 0.85rem;
    color: #0f172a;
    font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 0.75);
}

.timezone-select select {
    width: 100%;
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: calc(var(--spacing-unit) * 1.5);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
}

.slot-column {
    display: flex;
    flex-direction: column;
}

.slot-panel {
    background: #f8fafc;
    border-radius: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 3);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 16px 35px rgba(148, 163, 184, 0.15);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    height: 100%;
}

.slot-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.slot-instructions {
    color: #64748b;
    font-size: 0.9rem;
}

.slot-list {
    display: grid;
    gap: calc(var(--spacing-unit) * 1.5);
    grid-template-columns: 1fr;
    align-content: start;
}

.slot-empty {
    padding: calc(var(--spacing-unit) * 2);
    border-radius: calc(var(--spacing-unit) * 1.5);
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.slot-button {
    width: 100%;
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: calc(var(--spacing-unit) * 1.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #ffffff;
    color: #0f172a;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slot-button:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.slot-button.selected {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 16px 30px rgba(29, 78, 216, 0.3);
}

.slot-button .slot-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slot-button .slot-zone {
    font-size: 0.75rem;
    color: rgba(15, 23, 42, 0.6);
}

.slot-button.selected .slot-zone {
    color: rgba(255, 255, 255, 0.75);
}

.confirm-button {
    padding: calc(var(--spacing-unit) * 1.75);
    border-radius: calc(var(--spacing-unit) * 1.5);
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 600;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.confirm-button:disabled {
    background: rgba(148, 163, 184, 0.4);
    cursor: not-allowed;
    box-shadow: none;
}

.confirm-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(29, 78, 216, 0.25);
}

.appointment-summary {
    background: rgba(59, 130, 246, 0.08);
    border-radius: calc(var(--spacing-unit) * 1.5);
    padding: calc(var(--spacing-unit) * 2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #0f172a;
}

.summary-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #1d4ed8;
}

.summary-date {
    font-weight: 600;
    font-size: 0.95rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    font-size: 0.9rem;
}

.summary-context {
    color: #475569;
    font-weight: 500;
}

.summary-value {
    font-weight: 600;
    color: #0f172a;
    text-align: right;
}

.appointment-form-section {
    background: #ffffff;
    padding-top: calc(var(--spacing-unit) * 10);
    padding-bottom: calc(var(--spacing-unit) * 12);
}

.form-shell {
    background: #f8fafc;
    border-radius: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 5);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}

.form-header {
    max-width: 720px;
    margin: 0 auto calc(var(--spacing-unit) * 4);
    text-align: center;
}

.form-header h2 {
    font-family: var(--font-family-serif);
    font-size: clamp(2rem, 2.5vw, 2.5rem);
    color: #0f172a;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.form-header p {
    color: #475569;
    line-height: 1.6;
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 3);
}

.form-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 2.5);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1);
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: calc(var(--spacing-unit) * 1.75);
    border-radius: calc(var(--spacing-unit) * 1.5);
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: #ffffff;
    font-size: 0.95rem;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: rgba(59, 130, 246, 0.5);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.form-field textarea {
    resize: vertical;
}

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

.form-footer {
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 1.5);
    align-items: flex-start;
}

.form-disclaimer {
    font-size: 0.85rem;
    color: #64748b;
}

.form-message {
    padding: calc(var(--spacing-unit) * 1.5);
    border-radius: calc(var(--spacing-unit) * 1.5);
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.form-message.error {
    background: rgba(248, 113, 113, 0.12);
    color: #7f1d1d;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

@media (max-width: 1100px) {
    .booking-shell {
        grid-template-columns: 1fr;
    }

    .appointment-profile {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .profile-meta,
    .profile-note {
        max-width: 50%;
    }

    .slot-column,
    .scheduler-column {
        order: unset;
    }
}

@media (max-width: 960px) {
    .appointment-profile {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-meta,
    .profile-note {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .booking-shell {
        padding: calc(var(--spacing-unit) * 3);
        gap: calc(var(--spacing-unit) * 3);
    }

    .calendar-grid,
    .calendar-days {
        gap: 6px;
    }

    .calendar-day {
        border-radius: calc(var(--spacing-unit) * 1.5);
        font-size: clamp(0.8rem, 3.3vw, 0.95rem);
    }

    .form-shell {
        padding: calc(var(--spacing-unit) * 3);
    }

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

    .form-footer {
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .booking-shell {
        padding: calc(var(--spacing-unit) * 2);
    }

    .calendar-panel,
    .slot-panel {
        padding: calc(var(--spacing-unit) * 2);
    }

    .calendar-nav {
        width: 36px;
        height: 36px;
    }

    .confirm-button {
        padding: calc(var(--spacing-unit) * 1.5);
    }

    .form-shell {
        padding: calc(var(--spacing-unit) * 2.5);
    }

    /* Tighter grid on very small devices to avoid right-edge clipping */
    .calendar-grid,
    .calendar-days {
        gap: 4px;
    }

    .calendar-day {
        font-size: clamp(0.78rem, 3.2vw, 0.9rem);
    }
}
