/* ═══════════════════════════════════════════════
   Portal Doméstico — Main Styles
   ═══════════════════════════════════════════════ */

:root {
    --pd-primary: #2563eb;
    --pd-primary-dark: #1d4ed8;
    --pd-primary-light: #dbeafe;
    --pd-secondary: #059669;
    --pd-secondary-light: #d1fae5;
    --pd-danger: #dc2626;
    --pd-danger-light: #fee2e2;
    --pd-warning: #f59e0b;
    --pd-warning-light: #fef3c7;
    --pd-featured: #7c3aed;
    --pd-featured-light: #ede9fe;
    --pd-text: #1e293b;
    --pd-text-muted: #64748b;
    --pd-bg: #f8fafc;
    --pd-white: #ffffff;
    --pd-border: #e2e8f0;
    --pd-radius: 12px;
    --pd-radius-sm: 8px;
    --pd-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --pd-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --pd-shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --pd-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Reset & Base ─── */
[class*="pd-"] *, [class*="pd-"] *::before, [class*="pd-"] *::after {
    box-sizing: border-box;
}

.pd-login-wrapper, .pd-directory-wrapper, .pd-profile-wrapper,
.pd-dashboard-wrapper, .pd-chat-wrapper {
    font-family: var(--pd-font);
    color: var(--pd-text);
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ─── Cards ─── */
.pd-card {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 24px;
    box-shadow: var(--pd-shadow);
    border: 1px solid var(--pd-border);
    margin-bottom: 20px;
}

.pd-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
}

/* ─── Featured card ─── */
.pd-card-featured {
    border: 2px solid var(--pd-featured);
    position: relative;
}

.pd-profile-card.pd-card-featured {
    box-shadow: 0 0 0 3px var(--pd-featured-light), var(--pd-shadow);
    padding-top: 36px;
    margin-top: 14px;
}

.pd-badge-featured {
    position: absolute;
    top: -12px;
    left: 16px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

/* ─── Buttons ─── */
.pd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--pd-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 0.2s;
    font-family: var(--pd-font);
    box-sizing: border-box;
    max-width: 100%;
}

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

.pd-btn-primary:hover {
    background: var(--pd-primary-dark);
    color: white;
}

.pd-btn-outline {
    background: transparent;
    border-color: var(--pd-border);
    color: var(--pd-text);
}

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

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

.pd-btn-danger-outline {
    background: transparent;
    border-color: var(--pd-danger);
    color: var(--pd-danger);
}

.pd-btn-danger-outline:hover {
    background: var(--pd-danger);
    color: white;
}

.pd-btn-sm { padding: 6px 14px; font-size: 13px; }
.pd-btn-xs { padding: 4px 10px; font-size: 12px; }
.pd-btn-lg { padding: 14px 40px; font-size: 16px; font-weight: 600; }

.pd-btn-google {
    background: var(--pd-white);
    color: var(--pd-text);
    border: 2px solid var(--pd-border);
    padding: 12px 24px;
    font-size: 15px;
    width: 100%;
    justify-content: center;
}

.pd-btn-google:hover {
    border-color: #4285F4;
    box-shadow: var(--pd-shadow-md);
}

.pd-btn-google svg {
    flex-shrink: 0;
}

/* ─── Login ─── */
.pd-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 24px;
}

.pd-login-card {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.pd-login-card-fancy {
    padding: 0 !important;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}

.pd-login-topbar {
    height: 5px;
    background: linear-gradient(90deg, #4285F4, #34A853, #FBBC05, #EA4335);
}

.pd-login-card-fancy .pd-step {
    padding: 40px 36px 36px;
}

.pd-login-hero-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.pd-login-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--pd-text);
    letter-spacing: -0.5px;
}

.pd-login-subtitle {
    color: var(--pd-text-muted);
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.5;
}

.pd-login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.pd-login-divider::before,
.pd-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--pd-border);
}

.pd-login-divider span {
    font-size: 12px;
    color: var(--pd-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ─── Custom Google Button ─── */
.pd-google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: var(--pd-white);
    border: 2px solid var(--pd-border);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--pd-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--pd-text);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.pd-google-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(66,133,244,0.04), rgba(234,67,53,0.04));
    opacity: 0;
    transition: opacity 0.25s;
}

.pd-google-button:hover {
    border-color: #4285F4;
    box-shadow: 0 4px 16px rgba(66,133,244,0.18), 0 0 0 3px rgba(66,133,244,0.08);
    transform: translateY(-1px);
}

.pd-google-button:hover::before {
    opacity: 1;
}

.pd-google-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66,133,244,0.12);
}

.pd-google-icon {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.pd-google-button span {
    position: relative;
    z-index: 1;
}

.pd-login-footer-text {
    margin: 20px 0 0;
    font-size: 12px;
    color: var(--pd-text-muted);
    line-height: 1.4;
}

.pd-login-desc {
    color: var(--pd-text-muted);
    margin-bottom: 20px;
}

.pd-login-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

/* ─── Role selection ─── */
.pd-role-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 8px;
}

.pd-role-card {
    background: var(--pd-bg);
    border: 2px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 28px 18px 22px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    font-family: var(--pd-font);
    position: relative;
    overflow: hidden;
}

.pd-role-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--pd-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.pd-role-card:hover {
    border-color: var(--pd-primary);
    box-shadow: 0 8px 24px rgba(37,99,235,0.12);
    transform: translateY(-3px);
    background: var(--pd-white);
}

.pd-role-card:hover::after {
    transform: scaleX(1);
}

.pd-role-card:active {
    transform: translateY(0);
}

.pd-role-icon {
    font-size: 42px;
    margin-bottom: 14px;
    line-height: 1;
}

.pd-role-card h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--pd-text);
}

.pd-role-card p {
    margin: 0;
    color: var(--pd-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* ─── Spinner ─── */
.pd-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--pd-border);
    border-top-color: var(--pd-primary);
    border-radius: 50%;
    animation: pd-spin 0.8s linear infinite;
    margin: 0 auto;
}

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

.pd-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

/* ─── Badges ─── */
.pd-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pd-badge-provider {
    background: var(--pd-secondary-light);
    color: var(--pd-secondary);
}

.pd-badge-client {
    background: var(--pd-primary-light);
    color: var(--pd-primary);
}

/* ─── Tags ─── */
.pd-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--pd-primary-light);
    color: var(--pd-primary-dark);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 2px 4px 2px 0;
}

.pd-tag-transport {
    background: var(--pd-warning-light);
    color: #92400e;
}

.pd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* ─── Directory ─── */
.pd-directory-header {
    text-align: center;
    margin-bottom: 24px;
}

.pd-directory-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.pd-filters {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 20px;
    box-shadow: var(--pd-shadow);
    border: 1px solid var(--pd-border);
    margin-bottom: 24px;
}

.pd-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.pd-filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--pd-text-muted);
}

.pd-filter-group select,
.pd-filter-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-size: 14px;
    font-family: var(--pd-font);
}

.pd-results-info {
    margin-bottom: 16px;
    color: var(--pd-text-muted);
    font-size: 14px;
}

/* ─── Mini list (recent clients, favorites) ─── */
.pd-mini-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pd-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--pd-border);
    text-decoration: none;
    color: var(--pd-text);
}

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

.pd-mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.pd-mini-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pd-bg);
    color: var(--pd-text-muted);
    font-weight: 700;
    font-size: 14px;
}

.pd-mini-info {
    flex: 1;
    min-width: 0;
}

.pd-mini-info strong {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-mini-info small {
    color: var(--pd-text-muted);
    font-size: 11px;
}

.pd-mini-info a {
    text-decoration: none;
    color: var(--pd-text);
}

.pd-mini-info a:hover strong { color: var(--pd-primary); }

.pd-mini-item .pd-unfav-btn {
    margin-left: auto;
}

/* ─── Provider cards grid ─── */
.pd-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

/* ─── Base card ─── */
.pd-provider-card {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    border: 1px solid var(--pd-border);
    overflow: visible;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pd-provider-card:hover {
    box-shadow: var(--pd-shadow-md);
    transform: translateY(-1px);
}

/* ─── Card inner = clickable link ─── */
.pd-provider-inner {
    display: flex;
    flex-direction: column;
    padding: 14px 16px 12px;
    text-decoration: none;
    color: var(--pd-text);
    height: 100%;
    box-sizing: border-box;
}

/* ─── Normal card photo ─── */
.pd-provider-thumb {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--pd-bg);
}

/* Top row: photo | info | price */
.pd-provider-top-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pd-provider-thumb-col {
    flex-shrink: 0;
}

/* Price on the right */
.pd-provider-top-row > .pd-provider-rate {
    flex-shrink: 0;
    margin-bottom: 0;
    text-align: right;
    white-space: nowrap;
}

.pd-provider-info {
    flex: 1;
    min-width: 0;
}

/* Bottom section: zones + desc full width */
.pd-provider-bottom {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--pd-border);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pd-provider-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-provider-rating {
    margin-bottom: 3px;
}

.pd-provider-rating .pd-star {
    font-size: 14px;
}

.pd-provider-rating .pd-rating-text {
    font-size: 11px;
}

.pd-provider-rate {
    font-size: 16px;
    color: var(--pd-secondary);
    font-weight: 700;
    margin: 0;
    align-self: center;
}

/* Zones cloud in cards */
.pd-provider-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 -2px 6px;
}

.pd-provider-zones .pd-tag {
    font-size: 10px;
    padding: 1px 7px;
}

.pd-zones-compact .pd-tag {
    font-size: 8px;
    padding: 1px 5px;
}

/* Description snippet */
.pd-provider-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--pd-text-muted);
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* Bottom actions row: featured link left, contactar right */
.pd-provider-bottom-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6px 16px 12px;
    gap: 8px;
    border-top: 1px solid var(--pd-border);
}

/* Featured link button — left side */
.pd-featured-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pd-primary);
    border: 1.5px solid var(--pd-primary);
    border-radius: 20px;
    padding: 4px 14px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    line-height: 1.4;
    letter-spacing: 0.01em;
    margin-right: auto;
}
.pd-featured-link-btn:hover {
    background: var(--pd-primary);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* "Contactar →" — always right side */
.pd-provider-cta {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pd-primary);
}

.pd-provider-inner:hover .pd-provider-cta {
    text-decoration: underline;
}

/* Featured link button — profile view (larger) */
.pd-featured-link-btn-profile {
    font-size: 15px;
    padding: 10px 28px;
    border-radius: 24px;
    border-width: 2px;
}

/* Favorite count line (below name, same size as zone tags) */
.pd-provider-fav-count {
    font-size: 10px;
    color: var(--pd-text-muted);
    margin-bottom: 1px;
    font-weight: 400;
}


/* Fav button */
.pd-provider-fav-wrap {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.pd-provider-fav-wrap .pd-btn-fav {
    width: 30px;
    height: 30px;
    font-size: 14px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
}

/* ═══════════════════════════════════════════════
   FEATURED card: same size as normal, gold accent
   ═══════════════════════════════════════════════ */
.pd-provider-card.pd-card-featured {
    border: 2px solid var(--pd-featured);
    box-shadow: 0 0 0 3px var(--pd-featured-light), var(--pd-shadow);
    margin-top: 12px;
    background: linear-gradient(135deg, #faf5ff, #ede9fe);
}

/* Featured card — zone tags purple */
.pd-provider-card.pd-card-featured .pd-tag {
    background: rgba(124, 58, 237, 0.1);
    color: #6d28d9;
    border-color: rgba(124, 58, 237, 0.2);
}

/* Featured card — contactar purple */
.pd-provider-card.pd-card-featured .pd-provider-cta {
    color: var(--pd-featured);
}
.pd-provider-card.pd-card-featured .pd-provider-cta:hover {
    color: #5b21b6;
}

/* Featured card — featured link button purple */
.pd-provider-card.pd-card-featured .pd-featured-link-btn {
    color: var(--pd-featured);
    border-color: var(--pd-featured);
}
.pd-provider-card.pd-card-featured .pd-featured-link-btn:hover {
    background: var(--pd-featured);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

/* Featured card — border separators purple */
.pd-provider-card.pd-card-featured .pd-provider-bottom {
    border-top-color: rgba(124, 58, 237, 0.15);
}
.pd-provider-card.pd-card-featured .pd-provider-bottom-actions {
    border-top-color: rgba(124, 58, 237, 0.15);
}

/* Featured card — stars purple */
.pd-provider-card.pd-card-featured .pd-star-full {
    color: #8b5cf6;
}

/* Featured card — fav count */
.pd-provider-card.pd-card-featured .pd-provider-fav-count {
    color: #6d28d9;
}

/* Featured card — description */
.pd-provider-card.pd-card-featured .pd-provider-desc {
    color: #6d28d9;
}


/* ═══════════════════════════════════════════════
   NEW card: blue accent (same style as featured badge)
   ═══════════════════════════════════════════════ */
.pd-card-new {
    border: 2px solid var(--pd-primary);
    box-shadow: 0 0 0 3px var(--pd-primary-light), var(--pd-shadow);
    margin-top: 12px;
    background: linear-gradient(135deg, #f8faff, #eff6ff);
}

.pd-badge-new {
    position: absolute;
    top: -12px;
    left: 16px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
}

.pd-provider-services,
.pd-provider-transport {
    margin-bottom: 8px;
}

.pd-provider-desc {
    color: var(--pd-text-muted);
    font-size: 13px;
    margin: 8px 0 12px;
}

/* ─── Stars ─── */
.pd-star { font-size: 18px; }
.pd-star-full { color: var(--pd-warning); }
.pd-star-half { color: var(--pd-warning); opacity: 0.6; }
.pd-star-empty { color: #cbd5e1; }
.pd-rating-text { font-size: 13px; color: var(--pd-text-muted); }

.pd-star-btn {
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.1s;
    background: none;
    border: none;
    padding: 0;
}
.pd-star-btn:hover { transform: scale(1.2); }

/* ─── Pagination ─── */
.pd-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pd-page-btn {
    padding: 8px 14px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    background: var(--pd-white);
    cursor: pointer;
    font-family: var(--pd-font);
    font-size: 14px;
}

.pd-page-btn.active {
    background: var(--pd-primary);
    color: white;
    border-color: var(--pd-primary);
}

.pd-page-btn:hover:not(.active) {
    border-color: var(--pd-primary);
}

/* ─── Empty state ─── */
.pd-empty-state {
    text-align: center;
    padding: 40px;
    color: var(--pd-text-muted);
}

.pd-error {
    color: var(--pd-danger);
    padding: 20px;
    text-align: center;
}

.pd-muted {
    color: var(--pd-text-muted);
}

/* ─── Profile view ─── */
.pd-profile-card {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    padding: 24px;
    box-shadow: var(--pd-shadow);
    border: 1px solid var(--pd-border);
    overflow: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.pd-profile-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.pd-profile-photo-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--pd-bg);
}

.pd-profile-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--pd-text-muted);
    background: var(--pd-bg);
}

.pd-profile-main-info h1 {
    margin: 0 0 8px;
    font-size: 24px;
}

.pd-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.pd-meta-item {
    font-size: 14px;
    color: var(--pd-text-muted);
}

.pd-meta-item.pd-rate {
    color: var(--pd-secondary);
    font-weight: 600;
    font-size: 16px;
}

.pd-profile-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--pd-border);
}

.pd-profile-section h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.pd-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--pd-border);
}

.pd-profile-actions .pd-btn {
    text-align: center;
    justify-content: center;
}

.pd-profile-transport {
    margin-top: 8px;
}

/* ─── Availability grid ─── */
.pd-availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.pd-avail-slot {
    background: var(--pd-bg);
    padding: 8px 12px;
    border-radius: var(--pd-radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* ─── Reviews ─── */
.pd-reviews-section {
    margin-top: 24px;
}

.pd-reviews-section h2 {
    margin: 0 0 16px;
}

.pd-review-form {
    margin-bottom: 24px;
}

.pd-review-form h4 {
    margin: 0 0 12px;
}

.pd-review-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-family: var(--pd-font);
    margin: 12px 0;
    resize: vertical;
    box-sizing: border-box;
}

#pd-star-input {
    display: flex;
    gap: 4px;
}

.pd-review-item {
    background: var(--pd-white);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.pd-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.pd-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.pd-review-stars { font-size: 14px; }

.pd-review-date {
    font-size: 12px;
    color: var(--pd-text-muted);
}

.pd-review-comment {
    margin: 8px 0 0;
    color: var(--pd-text);
    font-size: 14px;
}

/* ─── Dashboard ─── */
.pd-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.pd-dashboard-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pd-dashboard-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.pd-dashboard-user h1 {
    margin: 0;
    font-size: 22px;
}

.pd-rating-inline {
    font-size: 14px;
    color: var(--pd-warning);
    margin-left: 8px;
}

.pd-dashboard-actions-top {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

/* ─── Forms ─── */
.pd-form-group {
    margin-bottom: 16px;
}

.pd-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--pd-text);
}

.pd-form-group input[type="text"],
.pd-form-group input[type="tel"],
.pd-form-group input[type="number"],
.pd-form-group input[type="url"],
.pd-form-group select,
.pd-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-size: 14px;
    font-family: var(--pd-font);
    box-sizing: border-box;
}

.pd-form-group textarea {
    resize: vertical;
}

.pd-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pd-input-euro {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-input-euro input {
    flex: 1;
}

.pd-input-euro span {
    font-weight: 600;
    color: var(--pd-text-muted);
}

.pd-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.pd-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--pd-radius-sm);
    transition: background 0.15s;
}

.pd-checkbox-label:hover {
    background: var(--pd-bg);
}

.pd-mt { margin-top: 16px; }

/* ─── Photo upload ─── */
.pd-photo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pd-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.pd-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pd-bg);
    color: var(--pd-text-muted);
    font-size: 12px;
}

/* ─── Availability editor ─── */
.pd-avail-day {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pd-border);
}

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

.pd-slot-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.pd-slot-row input[type="time"] {
    padding: 4px 8px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-family: var(--pd-font);
}

.pd-btn-remove-slot {
    background: var(--pd-danger-light);
    color: var(--pd-danger);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Quick links (client dashboard) ─── */
.pd-quick-links {
    display: grid;
    gap: 12px;
}

.pd-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--pd-bg);
    border-radius: var(--pd-radius-sm);
    text-decoration: none;
    color: var(--pd-text);
    transition: background 0.15s;
}

.pd-quick-link:hover {
    background: var(--pd-primary-light);
}

.pd-quick-icon {
    font-size: 24px;
}

/* ─── Modal ─── */
.pd-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.pd-modal-content {
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.pd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--pd-border);
}

.pd-modal-header h3 { margin: 0; }

.pd-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--pd-text-muted);
}

.pd-modal-body {
    padding: 20px;
}

.pd-modal-body label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin: 12px 0 4px;
}

.pd-modal-body select,
.pd-modal-body textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-family: var(--pd-font);
    box-sizing: border-box;
}

.pd-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--pd-border);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ─── Map ─── */
.pd-map {
    width: 100%;
    height: 300px;
    border-radius: var(--pd-radius-sm);
    border: 1px solid var(--pd-border);
    margin-bottom: 4px;
    z-index: 1;
}

.pd-map .leaflet-control-attribution {
    font-size: 10px;
}

/* ─── Field hints ─── */
.pd-field-hint {
    display: block;
    font-size: 12px;
    color: var(--pd-text-muted);
    margin-top: 4px;
    font-style: italic;
}

/* ─── Provider card actions ─── */
.pd-provider-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* ─── Directory topbar ─── */
.pd-dir-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/* ─── Filters panel ─── */
.pd-filters-panel {
    margin-bottom: 20px;
}

.pd-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.pd-filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--pd-text-muted);
    margin-bottom: 5px;
}

.pd-filter-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-size: 14px;
    font-family: var(--pd-font);
    background: var(--pd-white);
    color: var(--pd-text);
    touch-action: manipulation;
}

.pd-mb { margin-bottom: 10px; }

/* ─── Char counter ─── */
.pd-char-counter {
    display: block;
    font-size: 12px;
    color: var(--pd-text-muted);
    margin-top: 4px;
    text-align: right;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .pd-login-wrapper, .pd-directory-wrapper, .pd-profile-wrapper,
    .pd-dashboard-wrapper, .pd-chat-wrapper {
        padding: 12px;
    }

    .pd-profile-header { flex-direction: column; align-items: center; text-align: center; }
    .pd-profile-photo-large { width: 100px; height: 100px; }
    .pd-profile-main-info h1 { font-size: 20px; }
    .pd-profile-meta { justify-content: center; gap: 8px; flex-wrap: wrap; }
    .pd-profile-actions { flex-direction: column; }
    .pd-profile-actions .pd-btn { width: 100%; justify-content: center; }
    .pd-profile-transport { text-align: center; }

    .pd-form-row { grid-template-columns: 1fr; }
    .pd-role-cards { grid-template-columns: 1fr; }
    .pd-dashboard-header { flex-direction: column; align-items: flex-start; }
    .pd-dashboard-actions-top { width: 100%; }
    .pd-dashboard-actions-top .pd-btn { flex: 1; justify-content: center; font-size: 12px; padding: 6px 8px; }
    .pd-dashboard-grid { grid-template-columns: 1fr; }
    .pd-providers-grid { grid-template-columns: 1fr; }
    .pd-provider-thumb { width: 64px; height: 64px; border-radius: 8px; }
    .pd-provider-top-row > .pd-provider-rate { font-size: 13px; }
    .pd-filters-grid { grid-template-columns: 1fr 1fr; }

    .pd-card { padding: 16px; }
    .pd-card h3 { font-size: 16px; }

    .pd-map { height: 220px; }

    .pd-review-form .pd-star-btn { font-size: 24px; }

    .pd-availability-grid { grid-template-columns: 1fr; }
    .pd-checkbox-grid { grid-template-columns: 1fr 1fr; }

    .pd-suspended-container { padding: 20px; }
    .pd-suspended-icon { font-size: 48px; }
}

/* ═══════════════════════════════════════════════
   Suspended Account Styles
   ═══════════════════════════════════════════════ */

.pd-suspended-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    text-align: center;
}

.pd-suspended-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.pd-suspended-container h1 {
    color: var(--pd-danger);
    font-size: 24px;
    margin-bottom: 16px;
}

.pd-suspended-text {
    color: var(--pd-text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.pd-suspended-list {
    text-align: left;
    max-width: 320px;
    margin: 0 auto 20px;
    color: var(--pd-text-muted);
    font-size: 14px;
    line-height: 1.8;
    list-style: none;
    padding: 0;
}

.pd-suspended-list li::before {
    content: "\2718 ";
    color: var(--pd-danger);
    font-weight: 700;
    margin-right: 6px;
}

.pd-suspended-appeal {
    margin: 30px 0;
    text-align: left;
}

.pd-appeal-form {
    background: var(--pd-bg);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 24px;
}

.pd-appeal-form h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.pd-appeal-form p {
    color: var(--pd-text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.pd-appeal-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    font-family: var(--pd-font);
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}

.pd-appeal-sent {
    background: var(--pd-secondary-light);
    border: 1px solid #a7f3d0;
    border-radius: var(--pd-radius);
    padding: 24px;
    text-align: left;
}

.pd-appeal-sent h3 {
    margin-top: 0;
    color: var(--pd-secondary);
}

.pd-appeal-message-preview {
    margin-top: 12px;
    padding: 12px;
    background: var(--pd-white);
    border-radius: var(--pd-radius-sm);
    font-size: 14px;
}

.pd-appeal-rejected {
    background: var(--pd-danger-light);
    border: 1px solid #fca5a5;
    border-radius: var(--pd-radius);
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.pd-appeal-rejected h3 {
    margin-top: 0;
    color: var(--pd-danger);
    font-size: 16px;
}

.pd-suspended-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.pd-suspended-inline {
    color: var(--pd-danger);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    background: var(--pd-danger-light);
    border-radius: var(--pd-radius-sm);
    margin: 0;
}

.pd-suspended-notice {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    text-align: center;
    background: var(--pd-danger-light);
    border: 1px solid #fca5a5;
    border-radius: var(--pd-radius);
}

.pd-suspended-notice h2 {
    color: var(--pd-danger);
    margin-bottom: 12px;
}

.pd-suspended-notice p {
    color: var(--pd-text-muted);
    font-size: 14px;
}

.pd-suspended-notice a {
    color: var(--pd-primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════
   Profile Completion & Validation Styles
   ═══════════════════════════════════════════════ */

.pd-profile-incomplete-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: var(--pd-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    text-align: center;
}

.pd-profile-incomplete-banner strong {
    font-size: 18px;
    color: #92400e;
    display: block;
    margin-bottom: 6px;
}

.pd-profile-incomplete-banner p {
    color: #78350f;
    font-size: 14px;
    margin: 0;
}

/* Required field asterisk */
.pd-required {
    color: var(--pd-danger);
    font-weight: 700;
}

/* Field error state */
.pd-field-error,
input.pd-field-error,
select.pd-field-error,
textarea.pd-field-error {
    border-color: var(--pd-danger) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

/* Map error state */
.pd-map-error {
    border: 2px solid var(--pd-danger) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
    border-radius: var(--pd-radius-sm);
}

/* Error message below field */
.pd-field-error-msg {
    display: block;
    color: var(--pd-danger);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

/* Disabled button look */
.pd-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--pd-border);
    color: var(--pd-text-muted);
    border: 2px solid var(--pd-border);
}

/* Quick link disabled */
.pd-quick-link-disabled {
    opacity: 0.7;
    cursor: default;
    background: var(--pd-warning-light);
    border: 1px dashed var(--pd-warning);
}

/* Incomplete notice (directory/chat block) */
.pd-incomplete-notice {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    text-align: center;
    background: var(--pd-warning-light);
    border: 1px solid #fcd34d;
    border-radius: var(--pd-radius);
}

.pd-incomplete-notice h2 {
    color: #92400e;
    margin-bottom: 12px;
    font-size: 20px;
}

.pd-incomplete-notice p {
    color: var(--pd-text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ─── Settings toggle ─── */
.pd-settings-toggle-card {
    padding: 0 !important;
}

.pd-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--pd-font);
    font-size: 15px;
    font-weight: 600;
    color: var(--pd-text-muted);
    transition: color 0.2s;
}

.pd-settings-toggle:hover {
    color: var(--pd-text);
}

.pd-toggle-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

/* ─── Favorites ─── */
.pd-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.pd-fav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--pd-bg);
    border-radius: var(--pd-radius-sm);
    border: 1px solid var(--pd-border);
    transition: opacity 0.3s, transform 0.3s;
}

.pd-fav-photo img,
.pd-fav-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.pd-fav-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pd-border);
    color: var(--pd-text-muted);
    font-weight: 700;
    font-size: 18px;
}

.pd-fav-info {
    flex: 1;
    min-width: 0;
}

.pd-fav-info strong {
    display: block;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-fav-info small {
    display: block;
    color: var(--pd-text-muted);
    font-size: 12px;
}

.pd-fav-rate {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pd-secondary);
}

.pd-fav-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.pd-empty-text {
    color: var(--pd-text-muted);
    font-size: 14px;
    padding: 12px 0;
}

.pd-empty-text a {
    color: var(--pd-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Favorite button on cards and profiles */
.pd-btn-fav {
    background: none;
    border: 1px solid var(--pd-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.pd-btn-fav:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.pd-btn-fav.pd-fav-active {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.pd-btn-fav-profile {
    border-color: var(--pd-border);
}

.pd-fav-active-profile {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

/* ─── Own review highlight ─── */
.pd-review-mine {
    background: var(--pd-primary-light);
    border: 1px solid var(--pd-primary);
    border-radius: var(--pd-radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}

/* ─── Login required ─── */
.pd-login-required {
    text-align: center;
    padding: 60px 20px;
    max-width: 400px;
    margin: 0 auto;
}
.pd-login-required p {
    font-size: 1.1rem;
    color: var(--pd-text);
    margin-bottom: 20px;
}
.pd-login-required .pd-btn {
    display: inline-block;
    text-decoration: none;
}

/* ═══════════════════════════════════════════════
   Onboarding Wizard
   ═══════════════════════════════════════════════ */

.pd-wizard-card {
    padding: 0 !important;
    overflow: hidden;
    border: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04);
    max-width: 640px;
    margin: 0 auto 24px;
}

.pd-wizard-progress {
    height: 5px;
    background: var(--pd-border);
    position: relative;
}

.pd-wizard-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pd-primary), #6366f1);
    border-radius: 0 3px 3px 0;
    transition: width 0.4s ease;
}

.pd-wizard-step {
    padding: 36px 32px 24px;
    text-align: center;
}

.pd-wizard-step h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--pd-text);
}

.pd-wizard-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.pd-wizard-desc {
    color: var(--pd-text-muted);
    font-size: 15px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.pd-wizard-step .pd-form-group {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pd-wizard-step .pd-photo-upload {
    justify-content: center;
}

.pd-wizard-step .pd-map {
    height: 260px;
    border-radius: 12px;
}

.pd-wizard-step .pd-checkbox-grid {
    text-align: left;
    max-width: 460px;
    margin: 0 auto;
}

.pd-wizard-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px 28px;
}

/* Large variants for wizard */
.pd-input-large {
    width: 100%;
    max-width: 400px;
    padding: 14px 18px;
    font-size: 18px;
    border-radius: var(--pd-radius-sm);
    border: 2px solid var(--pd-border);
    transition: border-color 0.2s;
}

.pd-input-large:focus {
    border-color: var(--pd-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--pd-primary-light);
}

.pd-select-large {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--pd-border);
    border-radius: var(--pd-radius);
    font-family: var(--pd-font);
    background: var(--pd-white);
    transition: border-color 0.2s;
}

.pd-select-large:focus {
    border-color: var(--pd-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.pd-input-euro-large {
    max-width: 240px;
    margin: 0 auto;
}

.pd-input-euro-large input {
    font-size: 24px !important;
    text-align: center;
    padding: 12px 16px !important;
    font-weight: 700;
}

.pd-input-euro-large span {
    font-size: 20px;
    font-weight: 700;
}

.pd-checkbox-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.pd-checkbox-grid-large .pd-checkbox-label {
    padding: 12px 14px;
    border: 2px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    transition: all 0.2s;
    font-size: 15px;
}

.pd-checkbox-grid-large .pd-checkbox-label:hover {
    border-color: var(--pd-primary);
    background: var(--pd-primary-light);
}

.pd-checkbox-grid-large .pd-checkbox-label:has(input:checked) {
    border-color: var(--pd-primary);
    background: var(--pd-primary-light);
    font-weight: 600;
}

.pd-avail-compact {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.pd-avail-compact .pd-avail-day {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

@keyframes pd-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Wizard responsive */
@media (max-width: 768px) {
    .pd-wizard-card {
        margin: 0 -8px 20px;
        border-radius: var(--pd-radius-sm);
    }
    .pd-wizard-step {
        padding: 24px 18px 16px;
    }
    .pd-wizard-step h2 {
        font-size: 18px;
    }
    .pd-wizard-icon {
        font-size: 38px;
    }
    .pd-wizard-nav {
        padding: 12px 18px 20px;
    }
    .pd-wizard-step .pd-form-group,
    .pd-wizard-step .pd-checkbox-grid {
        max-width: 100%;
    }
    .pd-select-large {
        max-width: 100%;
    }
    .pd-checkbox-grid-large {
        grid-template-columns: 1fr 1fr;
    }
}

/* ═══════════════════════════════════════════════
   Chat Floating Bubble & Mini Panel
   ═══════════════════════════════════════════════ */

#pd-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--pd-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

#pd-chat-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5);
}

#pd-chat-bubble:active {
    transform: scale(0.95);
}

#pd-chat-bubble svg {
    width: 26px;
    height: 26px;
}

#pd-chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: pd-badge-pulse 2s infinite;
}

@keyframes pd-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ─── Mini chat panel ─── */
#pd-chat-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 99998;
    width: 360px;
    max-height: 480px;
    background: var(--pd-white);
    border-radius: var(--pd-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pd-panel-in 0.2s ease-out;
}

@keyframes pd-panel-in {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pd-cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--pd-border);
    background: var(--pd-bg);
}

.pd-cp-header strong {
    font-size: 15px;
    color: var(--pd-text);
}

#pd-cp-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--pd-text-muted);
    padding: 0;
    line-height: 1;
}

#pd-cp-close:hover {
    color: var(--pd-text);
}

.pd-cp-list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.pd-cp-loading,
.pd-cp-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--pd-text-muted);
    font-size: 14px;
}

/* ─── Conversation item ─── */
.pd-cp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--pd-text);
    border-bottom: 1px solid var(--pd-border);
    transition: background 0.15s;
    position: relative;
}

.pd-cp-item:hover {
    background: var(--pd-bg);
}

.pd-cp-item-unread {
    background: #eff6ff;
}

.pd-cp-item-unread:hover {
    background: #dbeafe;
}

.pd-cp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.pd-cp-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pd-border);
    color: var(--pd-text-muted);
    font-weight: 700;
    font-size: 16px;
}

.pd-cp-item-info {
    flex: 1;
    min-width: 0;
}

.pd-cp-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pd-cp-item-top strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-cp-time {
    font-size: 11px;
    color: var(--pd-text-muted);
    flex-shrink: 0;
}

.pd-cp-item-msg {
    font-size: 12px;
    color: var(--pd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.pd-cp-item-unread .pd-cp-item-msg {
    color: var(--pd-text);
    font-weight: 500;
}

.pd-cp-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pd-cp-footer {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pd-primary);
    text-decoration: none;
    border-top: 1px solid var(--pd-border);
    background: var(--pd-bg);
    transition: background 0.15s;
}

.pd-cp-footer:hover {
    background: var(--pd-primary-light);
}

/* ─── Mobile responsive ─── */
@media (max-width: 420px) {
    #pd-chat-bubble {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
    #pd-chat-bubble svg {
        width: 22px;
        height: 22px;
    }
    #pd-chat-panel {
        bottom: 76px;
        right: 8px;
        left: 8px;
        width: auto;
        max-height: 70vh;
    }
}

/* ══════════ Candado sobre foto difuminada (visitantes sin sesión) ══════════ */
.pd-provider-thumb-col {
    position: relative;
}
.pd-thumb-lock {
    position: absolute;
    right: -4px;
    bottom: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--pd-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    pointer-events: none;
}

/* ══════════ Tarjeta de captación al final del directorio ══════════ */
.pd-join-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--pd-primary);
    background: var(--pd-primary-light);
    min-height: 220px;
}
.pd-join-inner {
    padding: 26px 22px;
    max-width: 320px;
}
.pd-join-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: var(--pd-primary);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    line-height: 44px;
}
.pd-join-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--pd-text);
}
.pd-join-card p {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--pd-text-muted);
}

/* ══════════ Móvil-app: targets táctiles y legibilidad (≤640px) ══════════ */
@media (max-width: 640px) {
    .pd-provider-info h3 {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 17px;
        line-height: 1.25;
    }
    .pd-provider-bottom-actions {
        display: flex;
        gap: 10px;
    }
    .pd-provider-bottom-actions .pd-provider-cta,
    .pd-provider-bottom-actions .pd-featured-link-btn {
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: 12px 14px;
        font-size: 15px;
        font-weight: 700;
        border-radius: 12px;
    }
    .pd-provider-bottom-actions .pd-provider-cta {
        background: var(--pd-primary);
        color: #fff;
    }
    #pd-toggle-filters,
    #pd-search-btn {
        min-height: 46px;
        padding: 12px 20px;
        font-size: 15px;
    }
    .pd-filters-grid select {
        min-height: 46px;
        font-size: 16px; /* evita el zoom automático de iOS */
    }
    .pd-btn-fav {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}
/* Botón de la tarjeta de captación: contraste asegurado */
.pd-join-card .pd-btn,
.pd-join-card .pd-btn:visited {
    color: #fff !important;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ══════════ Visitantes sin sesión: perfiles desenfocados ══════════ */
/* Cubre también las fotos legacy de Google (el blur del servidor solo
   alcanza a las subidas al proxy). El texto no se puede seleccionar. */
.pd-anon .pd-provider-thumb {
    filter: blur(7px);
    transform: scale(1.04); /* oculta el halo del borde al difuminar */
}
.pd-anon .pd-provider-desc {
    filter: blur(3.5px);
    user-select: none;
    -webkit-user-select: none;
}
.pd-anon .pd-join-card * {
    filter: none; /* la tarjeta de captación nítida */
}

/* ══════════ Modal de recorte de foto (cuadrado) ══════════ */
#pd-crop-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.72); display: none; align-items: center; justify-content: center; padding: 16px; }
#pd-crop-modal.is-open { display: flex; }
.pd-crop-box { background: #fff; border-radius: 16px; max-width: 420px; width: 100%; max-height: 94vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.pd-crop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-weight: 700; font-size: 16px; color: #1e293b; border-bottom: 1px solid #eef0f3; }
.pd-crop-x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #94a3b8; padding: 0 4px; }
.pd-crop-x:hover { color: #1e293b; }
.pd-crop-stage { background: #1b1b1f; height: 58vh; max-height: 380px; }
.pd-crop-stage img { display: block; max-width: 100%; }
.pd-crop-hint { font-size: 12px; color: #64748b; text-align: center; padding: 10px 14px 2px; }
.pd-crop-tools { display: flex; gap: 10px; justify-content: center; padding: 8px 14px 4px; }
.pd-crop-tools button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #dcdfe4; background: #f6f7f9; font-size: 20px; line-height: 1; cursor: pointer; color: #334155; }
.pd-crop-tools button:hover { background: #eef0f3; }
.pd-crop-actions { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid #eef0f3; }
.pd-crop-actions .pd-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; border: 2px solid transparent; text-decoration: none; }
#pd-crop-modal .pd-btn-primary { background: #2563eb; color: #fff; }
#pd-crop-modal .pd-btn-primary:hover { background: #1d4ed8; }
#pd-crop-modal .pd-btn-outline { background: #fff; color: #334155; border-color: #cbd5e1; }
#pd-crop-modal .pd-btn-outline:hover { background: #f1f5f9; }

/* ═══════════════ PERFIL ESTILO CV ═══════════════ */
.pd-cv-wrapper { max-width: 920px; margin: 0 auto; padding: 8px 0 40px; }
.pd-cv-back { margin-bottom: 14px; }
.pd-cv {
    background: #fff; border: 1px solid #e8ebf0; border-radius: 18px;
    box-shadow: 0 10px 40px -18px rgba(15,23,42,.25); overflow: hidden;
}
/* Cabecera */
.pd-cv-head {
    display: flex; align-items: center; gap: 22px; padding: 30px 32px;
    background: linear-gradient(135deg, #0a1d3a 0%, #14315c 100%); color: #fff;
}
.pd-cv-avatar { flex: none; width: 104px; height: 104px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 6px 20px rgba(0,0,0,.3); background: #1e3a5f; }
.pd-cv-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-cv-avatar-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 44px; font-weight: 700; color: #fff; }
.pd-cv-id { flex: 1 1 auto; min-width: 0; }
.pd-cv-badges { display: flex; gap: 8px; margin-bottom: 6px; }
.pd-cv-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; }
.pd-cv-badge-feat { background: #fbbf24; color: #422006; }
.pd-cv-badge-new { background: #34d399; color: #064e3b; }
.pd-cv-id h1 { margin: 0 0 2px; font-size: 27px; line-height: 1.15; color: #fff; }
.pd-cv-role { margin: 0 0 10px; font-size: 14.5px; color: #dbe6f5; font-weight: 500; }
.pd-cv-rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pd-cv-stars .pd-star-full { color: #fbbf24; }
.pd-cv-stars .pd-star-empty { color: rgba(255,255,255,.35); }
.pd-cv-rating-txt { font-size: 13px; color: #cdd8e8; }
.pd-cv-rate { flex: none; text-align: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 18px; }
.pd-cv-rate-from { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #b9c6da; }
.pd-cv-rate strong { display: block; font-size: 30px; line-height: 1.1; color: #fff; }
.pd-cv-rate-unit { display: block; font-size: 12px; color: #b9c6da; }
/* Acciones */
.pd-cv-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 32px; border-bottom: 1px solid #eef1f5; background: #fafbfc; }
.pd-cv-actions .pd-btn { min-height: 44px; }
/* Cuerpo 2 columnas */
.pd-cv-body { display: grid; grid-template-columns: 300px 1fr; gap: 0; }
.pd-cv-side { padding: 26px 26px; border-right: 1px solid #eef1f5; background: #fcfcfd; }
.pd-cv-main { padding: 26px 30px; min-width: 0; }
.pd-cv-block { margin-bottom: 28px; }
.pd-cv-block:last-child { margin-bottom: 0; }
.pd-cv-h3 {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
    color: #64748b; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid #eef1f5;
}
/* Datos clave */
.pd-cv-facts { list-style: none; margin: 0; padding: 0; }
.pd-cv-facts li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 14.5px; color: #1e293b; }
.pd-cv-fact-ic { flex: none; font-size: 15px; line-height: 1.4; }
.pd-cv-fact-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; margin-bottom: 1px; }
/* Chips de zonas */
.pd-cv-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pd-cv-chip { font-size: 13px; background: #eef2f8; color: #334155; border: 1px solid #e2e8f0; border-radius: 999px; padding: 5px 12px; }
/* Disponibilidad */
.pd-cv-avail { list-style: none; margin: 0; padding: 0; }
.pd-cv-avail li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e8ebf0; font-size: 14px; }
.pd-cv-avail li:last-child { border-bottom: 0; }
.pd-cv-avail-day { color: #1e293b; font-weight: 500; }
.pd-cv-avail-time { color: #64748b; font-variant-numeric: tabular-nums; }
/* Sobre mí */
.pd-cv-about { font-size: 15.5px; line-height: 1.75; color: #334155; margin: 0; white-space: pre-line; }
/* Enlace destacado */
.pd-cv-featured-link { display: inline-flex; align-items: center; gap: 8px; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: 10px; padding: 10px 16px; font-weight: 600; text-decoration: none; margin-bottom: 22px; }
.pd-cv-featured-link:hover { background: #fde68a; }
/* Responsive */
@media (max-width: 720px) {
    .pd-cv-head { flex-direction: column; text-align: center; padding: 26px 20px; }
    .pd-cv-id { text-align: center; }
    .pd-cv-rating, .pd-cv-badges { justify-content: center; }
    .pd-cv-body { grid-template-columns: 1fr; }
    .pd-cv-side { border-right: 0; border-bottom: 1px solid #eef1f5; }
    .pd-cv-actions { padding: 16px 20px; }
    .pd-cv-actions .pd-btn { flex: 1 1 auto; justify-content: center; }
}
/* override: el rol del CV debe verse claro sobre el azul (una regla de párrafo del tema lo oscurecía) */
.pd-cv .pd-cv-head .pd-cv-role { color: #dbe6f5 !important; }
.pd-cv .pd-cv-head .pd-cv-rating-txt { color: #cdd8e8 !important; }
