/**
 * Client Portal Page Style
 * Flat, responsive, interactive design for Existing & New Clients.
 */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

.grdv-portal-wrapper {
    font-family: 'Outfit', sans-serif;
    color: #1e293b;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.grdv-portal-wrapper.grdv-rtl {
    font-family: 'Tajawal', sans-serif;
    text-align: right;
}

/* Card Container */
.grdv-portal-card {
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    border: 1px solid #f1f5f9;
    background-image: radial-gradient(#f8fafc 1.5px, transparent 1.5px);
    /* Even subtler dots */
    background-size: 24px 24px;
}

/* Topbar Restoration */
.grdv-portal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 0 2rem;
    z-index: 10;
    position: relative;
}

.ccf-lang-toggle a {
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.ccf-lang-toggle a.active {
    background: var(--grdv-primary);
    color: #fff;
}

.grdv-portal-wrapper.grdv-rtl .ccf-lang-toggle a:not(:first-child) {
    margin-right: 4px;
}

.grdv-portal-wrapper:not(.grdv-rtl) .ccf-lang-toggle a:not(:first-child) {
    margin-left: 4px;
}

.grdv-portal-help a {
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 12px;
    background: #25D366;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
}

.grdv-portal-help a:hover {
    opacity: 0.9;
}

/* Header Redesign: Capsule / Pill Style (Gray Gradient + Photo Support) */
.grdv-portal-header-pill-wrapper {
    padding: 2rem;
}

.grdv-portal-header-pill {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 120px;
    padding: 1.2rem 2rem 1.2rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #fff;
    position: relative;
    overflow: hidden;
}

.grdv-portal-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    /* Subtle background photo overlay */
    z-index: 0;
    pointer-events: none;
}

.grdv-portal-pill-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.grdv-portal-avatar-pill {
    width: 80px;
    height: 80px;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    flex-shrink: 0;
}

.grdv-portal-avatar-pill.grdv-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #64748b;
}

@media (max-width: 480px) {
    .grdv-portal-avatar-pill {
        width: 60px;
        height: 60px;
    }
}

.grdv-portal-pill-info {
    min-width: 0;
    flex: 1;
}

.grdv-portal-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: #1e293b;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.grdv-portal-bio {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.grdv-portal-pill-checkmark {
    width: 32px;
    height: 32px;
    color: var(--grdv-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.grdv-portal-wrapper.grdv-rtl .grdv-portal-header-pill {
    padding: 1.2rem;
    flex-direction: row;
    /* Ensure row alignment in RTL */
}

@media (max-width: 480px) {
    .grdv-portal-header-pill {
        padding: 1rem;
        gap: 0.5rem;
    }

    .grdv-portal-name {
        font-size: 1.2rem;
    }

    .grdv-portal-bio {
        font-size: 0.9rem;
    }

    .grdv-portal-pill-left {
        gap: 0.8rem;
    }
}

.grdv-portal-body {
    padding: 0 2rem 2.5rem 2rem;
}

@media (max-width: 480px) {
    .grdv-portal-wrapper {
        padding: 1rem 0.5rem;
    }

    .grdv-portal-topbar {
        padding: 1.5rem 1rem 0 1rem;
    }

    .grdv-portal-header-pill-wrapper {
        padding: 1.5rem 1rem 1rem 1rem;
    }

    .grdv-portal-body {
        padding: 0 1rem 1.5rem 1rem;
    }
}

/* Step 1 Landing Split */
.grdv-portal-landing-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.grdv-portal-step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 2.5rem;
}

.grdv-portal-dot {
    width: 12px;
    height: 9px;
    background-color: #e2e8f0;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grdv-portal-dot.active {
    width: 42px;
    background-color: var(--grdv-primary);
    border-radius: 12px;
}

.grdv-portal-split {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.grdv-portal-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.grdv-portal-box:hover {
    border-color: var(--grdv-primary);
    box-shadow: 0 10px 25px rgba(var(--grdv-primary-rgb), 0.08);
}

.grdv-portal-box h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--grdv-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.grdv-clickable-title {
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
    /* Prevent text selection on double click */
}

.grdv-clickable-title:hover {
    color: var(--grdv-primary);
    opacity: 0.8;
}

.grdv-trigger-text {
    color: var(--grdv-primary);
    text-decoration: underline;
    font-weight: 700;
}

.grdv-clickable-title:hover .grdv-trigger-text {
    color: #1e293b;
}

.grdv-clickable-title i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--grdv-primary);
}

.grdv-clickable-title.active i {
    transform: rotate(90deg);
}

.grdv-box-existing-content {
    margin-top: 1.5rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 1.5rem;
}

.grdv-portal-box p {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: #475569;
}

/* Inputs */
.grdv-portal-input-wrapper {
    margin-bottom: 1rem;
    position: relative;
}

.grdv-portal-input-wrapper input[type="text"] {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s;
}

.grdv-portal-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--grdv-primary);
    box-shadow: 0 0 0 4px rgba(var(--grdv-primary-rgb), 0.1);
}

/* Nested Phone Group */
.grdv-portal-phone-group {
    display: flex;
    gap: 0;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s;
}

.grdv-portal-phone-group:focus-within {
    border-color: var(--grdv-primary);
    box-shadow: 0 0 0 4px rgba(var(--grdv-primary-rgb), 0.1);
}

.grdv-portal-phone-group select {
    border: none;
    background: #f1f5f9;
    padding: 1rem 0.5rem 1rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: #334155;
    max-width: 120px;
    outline: none;
    cursor: pointer;
    font-weight: 600;
}

.grdv-portal-wrapper:not(.grdv-rtl) .grdv-portal-phone-group select {
    border-right: 1px solid #e2e8f0;
}

.grdv-portal-wrapper.grdv-rtl .grdv-portal-phone-group select {
    border-left: 1px solid #e2e8f0;
}

.grdv-portal-phone-group input {
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #1e293b;
    flex: 1;
    outline: none;
    background: transparent;
    min-width: 0;
}

.grdv-portal-wrapper.grdv-rtl .grdv-portal-phone-group input {
    direction: ltr;
    text-align: left;
}

/* Status / Errors */
.grdv-portal-error {
    color: #b91c1c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 18px;
}

.grdv-portal-status {
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 18px;
    font-weight: 500;
}

/* CTA Buttons */
.grdv-portal-cta {
    width: 100%;
    background: var(--grdv-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 5px 15px rgba(var(--grdv-primary-rgb), 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.grdv-portal-cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--grdv-primary-rgb), 0.3);
}

.grdv-portal-cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.grdv-portal-cta.grdv-cta-secondary {
    background: #334155;
    box-shadow: 0 5px 15px rgba(51, 65, 85, 0.2);
}

.grdv-portal-cta.grdv-cta-secondary:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(51, 65, 85, 0.3);
}

/* Helper Links */
.grdv-portal-link-help {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
}

.grdv-portal-link-help:hover {
    color: var(--grdv-primary);
}

/* DASHBOARD CARDS (Step 2A) */
.grdv-dash-header {
    text-align: center;
    margin-bottom: 2rem;
}

.grdv-dash-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.2rem 0;
}

.grdv-dash-header p {
    color: #64748b;
    margin: 0;
    font-size: 1.1rem;
}

.grdv-dash-cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 480px) {
    .grdv-dash-cards-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* Persistent Footer Styling */
.grdv-portal-persistent-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.grdv-portal-persistent-footer .grdv-dash-card {
    margin-bottom: 0;
    padding: 1.2rem 1rem;
}

.grdv-portal-persistent-footer .grdv-dash-card i {
    font-size: 1.8rem;
}

.grdv-portal-persistent-footer .grdv-dash-card span {
    font-size: 0.95rem;
}

.grdv-dash-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.grdv-dash-card:hover {
    border-color: var(--grdv-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.grdv-dash-card i {
    font-size: 2.2rem;
    color: var(--grdv-primary);
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(var(--grdv-primary-rgb), 0.1) 0%, rgba(var(--grdv-primary-rgb), 0.02) 100%);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
}

.grdv-dash-card:hover i {
    background: var(--grdv-primary);
    color: #fff;
    transform: rotate(5deg) scale(1.1);
}

.grdv-dash-card span {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
}

.grdv-dash-card.grdv-dash-card-primary {
    background: rgba(var(--grdv-primary-rgb), 0.03);
    border-color: rgba(var(--grdv-primary-rgb), 0.15);
}

.grdv-dash-card.grdv-dash-card-primary i {
    color: #fff;
    background: var(--grdv-primary);
}

.grdv-dash-card.grdv-dash-card-primary:hover {
    background: var(--grdv-primary);
    border-color: var(--grdv-primary);
}

.grdv-dash-card.grdv-dash-card-primary:hover i {
    background: rgba(255, 255, 255, 0.2);
}

.grdv-dash-card.grdv-dash-card-primary:hover span {
    color: #fff;
}

.grdv-dash-card-disabled {
    opacity: 0.55;
    cursor: not-allowed !important;
    background: #f8fafc;
}

.grdv-dash-card-disabled i {
    background: #e2e8f0;
    color: #94a3b8;
}

.grdv-dash-card-disabled:hover {
    transform: none !important;
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
}

.grdv-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #94a3b8;
    color: #fff;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

.grdv-portal-wrapper.grdv-rtl .grdv-card-badge {
    right: auto;
    left: 10px;
}

.grdv-dash-card-whatsapp i {
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

.grdv-dash-card-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.grdv-dash-card-whatsapp:hover i {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.grdv-dash-card-whatsapp:hover span {
    color: #fff;
}

/* Appointment List Content */
.grdv-dash-list {
    margin-top: 1rem;
}

.grdv-dash-list-content {
    background: transparent;
    padding: 0;
}

.grdv-appt-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.grdv-appt-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.grdv-appt-item.grdv-past {
    transform: scale(0.96);
    opacity: 0.75;
    filter: grayscale(80%);
}

.grdv-appt-item.grdv-past:hover {
    transform: scale(0.96) translateY(-2px);
    opacity: 0.9;
}

.grdv-appt-item.grdv-cancelled {
    transform: scale(0.92);
    opacity: 0.55;
    filter: grayscale(100%);
    text-decoration: line-through;
}

.grdv-appt-item.grdv-cancelled:hover {
    transform: scale(0.92);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.grdv-appt-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}

.grdv-appt-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.grdv-appt-text {
    font-weight: 800;
    color: #1e293b;
    font-size: 1.1rem;
}

.grdv-appt-row:last-child .grdv-appt-text {
    color: #64748b;
    font-size: 0.95rem;
}

.grdv-appt-icon {
    color: var(--grdv-primary);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.grdv-appt-row:last-child .grdv-appt-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.grdv-appt-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-pending {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.badge-confirmed {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-completed {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Booking Date/Time Grid (Step 2B) */
.grdv-portal-book-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.grdv-portal-compact-field {
    max-width: 450px;
    margin: 0 auto 2rem auto;
}

.grdv-portal-date-picker {
    width: 100%;
    max-width: 250px;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-align: center;
    margin: 0 auto;
    display: block;
}

/* Reusing slot logic from ads */
.grdv-portal-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding: 5px;
    margin-bottom: 2rem;
}

.grdv-portal-slot {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
    font-size: 1rem;
    color: #334155;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grdv-portal-slot span {
    font-weight: 500;
    font-size: 0.8rem;
    color: #64748b;
}

.grdv-portal-slot:hover:not(.disabled) {
    border-color: var(--grdv-primary);
    background: rgba(var(--grdv-primary-rgb), 0.05);
    color: var(--grdv-primary);
}

.grdv-portal-slot.active {
    background: var(--grdv-primary);
    border-color: var(--grdv-primary);
    color: #fff;
}

.grdv-portal-slot.active span {
    color: rgba(255, 255, 255, 0.8);
}

.grdv-portal-slot.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #f1f5f9;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Payment Reminder Component */
.grdv-portal-payment-box {
    background: #f8fafc;
    border-left: 4px solid var(--grdv-primary);
    padding: 1.2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.grdv-portal-wrapper.grdv-rtl .grdv-portal-payment-box {
    border-left: none;
    border-right: 4px solid var(--grdv-primary);
    text-align: right;
}

.grdv-portal-payment-title {
    font-weight: 800;
    color: var(--grdv-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.grdv-portal-payment-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    white-space: pre-wrap;
}

/* Success Step */
.grdv-cta-secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
}

.grdv-cta-secondary:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.grdv-portal-success {
    text-align: center;
    padding: 2rem 0;
}

/* Global Nav */
.grdv-portal-global-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #e2e8f0;
}

.grdv-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #94a3b8;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.grdv-nav-link i {
    font-size: 14px;
    transition: transform 0.2s;
}

.grdv-nav-link:hover {
    color: var(--grdv-primary);
}

.grdv-nav-link:hover i {
    transform: translateX(-3px);
}

.grdv-portal-wrapper.grdv-rtl .grdv-nav-link:hover i {
    transform: translateX(3px);
}

.grdv-portal-wrapper.grdv-rtl .grdv-nav-link i {
    transform: scaleX(-1);
}

.grdv-nav-logout {
    color: #ef4444;
}

.grdv-nav-logout:hover {
    color: #dc2626;
}

.grdv-nav-logout:hover i {
    transform: none;
}

.grdv-portal-success-icon {
    font-size: 5rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.grdv-portal-success h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
}

/* Utils */
.grdv-hidden {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: .2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: .75s linear infinite spin;
}

.me-2 {
    margin-right: .5rem;
}

.grdv-portal-wrapper.grdv-rtl .me-2 {
    margin-right: 0;
    margin-left: .5rem;
}

/* Success UI Refinements */
.grdv-dash-card-whatsapp i {
    color: #25D366;
}

.grdv-dash-card-whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
}

.grdv-dash-card-whatsapp:hover i,
.grdv-dash-card-whatsapp:hover span {
    color: #fff;
}

.grdv-success-payment-reminder {
    background: #fffbeb !important;
    border: 1px solid #fef3c7 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.grdv-portal-wrapper.grdv-rtl .grdv-success-payment-reminder {
    text-align: right;
}

.grdv-ads-appointments-list {
    margin-bottom: 2rem;
}

/* List Categorization */
.grdv-list-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2rem 0 1rem 0;
    color: #0f172a;
    font-weight: 800;
    font-size: 1.1rem;
}

.grdv-list-section-header i {
    color: var(--grdv-primary);
}

.grdv-list-section-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #f1f5f9;
}

/* Success Reference Box */
.grdv-success-ref-box {
    background: #fdf2f2;
    border: 2px dashed #f87171;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.grdv-success-ref-box::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(248, 113, 113, 0.05) 0%, transparent 70%);
    animation: grdvRotateBg 10s linear infinite;
}

@keyframes grdvRotateBg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.grdv-ref-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1rem;
}

.grdv-ref-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #991b1b;
}

.grdv-ref-value-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #fee2e2;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.grdv-ref-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 2.2rem;
    font-weight: 950;
    color: #1e293b;
    letter-spacing: 3px;
}

.grdv-btn-copy {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.grdv-btn-copy:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.grdv-btn-copy.copied {
    background: #10b981;
    color: #fff;
}

.grdv-ref-instruction {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    font-weight: 700;
    color: #991b1b;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}


.grdv-appt-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge variants */
.badge-pending {
    background: #fef9c3;
    color: #854d0e;
}

.badge-confirmed {
    background: #dcfce7;
    color: #166534;
}

.badge-completed {
    background: #f1f5f9;
    color: #475569;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.grdv-ads-appointment-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 10, 0.05);
    border-left: 6px solid var(--grdv-primary);
}

.grdv-portal-wrapper.grdv-rtl .grdv-ads-appointment-card {
    border-left: none;
    border-right: 6px solid var(--grdv-primary);
}

/* New Modal Structure Styles */
.grdv-portal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grdv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.grdv-modal-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 500px;
    animation: grdvModalFadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes grdvModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.grdv-modal-content {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.grdv-modal-header {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.grdv-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
}

.grdv-modal-close-icon {
    font-size: 1.8rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.grdv-modal-close-icon:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

.grdv-modal-body {
    padding: 2.5rem 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #334155;
}

.grdv-modal-footer {
    padding: 1.2rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.grdv-modal-footer .grdv-portal-cta {
    width: auto;
    min-width: 140px;
    margin: 0;
}

.grdv-rtl .grdv-modal-header {
    flex-direction: row;
}

.grdv-rtl .grdv-modal-footer {
    flex-direction: row;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .grdv-portal-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .grdv-portal-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .grdv-portal-topbar {
        padding: 10px 10px 0 10px;
    }

    .grdv-portal-header-pill-wrapper {
        padding: 10px;
    }

    /* Keep Avatar and Text Horizontal */
    .grdv-portal-header-pill {
        padding: 10px 15px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        border-radius: 80px;
    }

    .grdv-portal-wrapper.grdv-rtl .grdv-portal-header-pill {
        flex-direction: row;
        padding: 10px 15px;
    }

    .grdv-portal-avatar {
        width: 55px;
        height: 55px;
        min-width: 55px;
    }

    .grdv-portal-name {
        font-size: 1.15rem;
        margin-bottom: 2px;
    }

    .grdv-portal-bio {
        font-size: 0.8rem;
    }

    .grdv-portal-landing-title {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    /* Welcome text */
    .grdv-welcome-box {
        font-size: 0.95rem;
        margin: 10px 10px 15px;
        padding: 12px;
    }

    /* Main Boxes */
    .grdv-portal-box {
        padding: 15px 12px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .grdv-portal-box h4 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .grdv-portal-box p {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    /* Phone Input sizing */
    .grdv-portal-phone-group {
        gap: 5px;
        margin-bottom: 10px;
    }

    .grdv-portal-phone-group select {
        flex: 0 0 85px;
        /* Squeeze the select box so input has room */
        padding: 10px 5px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .grdv-portal-phone-group input,
    .grdv-portal-input-wrapper input[type="text"] {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .grdv-input,
    .grdv-select {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .grdv-portal-date-picker {
        width: auto !important;
        min-width: 200px !important;
        max-width: 100% !important;
        /* It shouldn't overflow */
        margin: 0 auto !important;
        padding: 12px 20px !important;
        font-size: 1.1rem !important;
    }

    .grdv-portal-cta {
        padding: 12px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    /* Dashboard Action Cards */
    .grdv-dash-header {
        padding: 15px 12px;
    }

    .grdv-dash-header h2 {
        font-size: 1.25rem;
    }

    .grdv-dash-header p {
        font-size: 0.9rem;
    }

    .grdv-dash-cards-container {
        padding: 0 10px 15px;
        gap: 10px;
    }

    .grdv-dash-card {
        padding: 15px 10px;
        border-radius: 16px;
    }

    .grdv-dash-card i {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .grdv-dash-card span {
        font-size: 0.85rem;
    }

    /* Appointments List */
    .grdv-list-section-header {
        font-size: 1rem;
        padding-bottom: 5px;
    }

    .grdv-appt-item {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        border-radius: 14px;
    }

    .grdv-portal-wrapper.grdv-rtl .grdv-appt-item {
        align-items: stretch;
    }

    .grdv-appt-badge-wrapper {
        min-width: auto;
        min-height: auto;
        padding: 0;
        border: none;
        align-self: flex-start;
        margin-top: 5px;
    }

    .grdv-appt-text {
        font-size: 0.85rem;
    }

    .grdv-appt-icon {
        font-size: 0.95rem;
    }

    .grdv-appt-badge {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    /* Reference Box */
    .grdv-ref-value {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .grdv-btn-copy {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    /* Fix Notification Bell alignment on Mobile */
    .grdv-notification-action {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 1.3rem;
    }

    .grdv-portal-wrapper.grdv-rtl .grdv-notification-action {
        right: auto;
        left: 15px;
    }

    .grdv-notification-badge {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
        top: -2px;
        right: -2px;
    }

    .grdv-portal-wrapper.grdv-rtl .grdv-notification-badge {
        right: auto;
        left: -2px;
    }
}
/* ==========================================================================
   Etat "aucun creneau" : message + actions proposees au client
   ========================================================================== */

.grdv-noslots {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 24px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
}

.grdv-noslots-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    font-size: 1.4rem;
}

.grdv-noslots-msg {
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 320px;
    margin-bottom: 20px;
}

.grdv-noslots-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

.grdv-noslots-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 18px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.grdv-noslots-btn-icon {
    font-size: 0.9em;
    flex-shrink: 0;
}

/* Action principale : aller a la prochaine date disponible */
.grdv-noslots-btn-primary {
    background: var(--grdv-primary);
    border: 2px solid var(--grdv-primary);
    color: #fff;
    box-shadow: 0 8px 20px rgba(var(--grdv-primary-rgb), 0.28);
}

.grdv-noslots-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(var(--grdv-primary-rgb), 0.36);
}

/* Action secondaire : ouvrir le calendrier */
.grdv-noslots-btn-ghost {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #475569;
}

.grdv-noslots-btn-ghost:hover {
    border-color: var(--grdv-primary);
    color: var(--grdv-primary);
    background: rgba(var(--grdv-primary-rgb), 0.04);
}

.grdv-noslots-btn:active {
    transform: translateY(0);
}

.grdv-noslots-btn:focus-visible {
    outline: 3px solid rgba(var(--grdv-primary-rgb), 0.35);
    outline-offset: 2px;
}

/* En arabe, l'icone de direction doit pointer vers la gauche */
.grdv-rtl .grdv-noslots-btn-primary .fa-arrow-right {
    transform: scaleX(-1);
}

@media (prefers-reduced-motion: reduce) {
    .grdv-noslots-btn,
    .grdv-noslots-btn:hover {
        transition: none;
        transform: none;
    }
}
