/* Hinweis im Immobilien-Modal (Schritt 1 vor Objekt-Hub) */
.property-form-hub-hint {
    margin: 0 1.25rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
    border: 1px solid rgba(37, 99, 235, 0.18);
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-secondary, #4b5563);
}

.property-form-hub-hint strong {
    display: block;
    color: var(--text-primary, #111);
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.property-form-hub-hint.hidden {
    display: none !important;
}

.ph-welcome-banner {
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ph-welcome-banner h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.ph-welcome-banner p {
    margin: 0;
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.5;
}

/**
 * VIVEREA – Objekt-Hub (Immobilien-Detailansicht)
 * Effizient. Modern. Einfach.
 */

.property-hub {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    flex-direction: column;
    background: var(--bg-canvas, #f5f4f1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.property-hub.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.property-hub-header {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.property-hub-back {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary, #1a1a1a);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.15s ease;
}

.property-hub-back:hover {
    background: rgba(0, 0, 0, 0.08);
}

.property-hub-header-main {
    flex: 1;
    min-width: 0;
}

.property-hub-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.25;
}

.property-hub-address {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7280);
}

.property-hub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.property-hub-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary, #4b5563);
}

.property-hub-badge--type {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.property-hub-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.property-hub-tabs-wrap {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.property-hub-tabs {
    display: flex;
    gap: 0.15rem;
    padding: 0 1rem 0;
    min-width: min-content;
}

.property-hub-tab {
    flex-shrink: 0;
    border: none;
    background: transparent;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.property-hub-tab:hover {
    color: var(--text-primary, #1a1a1a);
}

.property-hub-tab:focus-visible {
    outline: none;
    border-radius: var(--r-xs);
    box-shadow: var(--input-focus-ring);
}

.property-hub-tab.is-active {
    color: var(--text-primary, #1a1a1a);
    border-bottom-color: var(--accent, #2563eb);
}

.property-hub-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

.property-hub-panel {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* Übersicht: Schnellmenü links, Inhalt rechts */
.ph-overview-layout {
    display: grid;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
}

.ph-overview-nav {
    position: sticky;
    top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ph-quick-menu-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ph-quick-menu-head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary, #111);
}

.ph-quick-group {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ph-quick-group:last-child {
    border-bottom: none;
}

.ph-quick-group-title {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary, #6b7280);
}

.ph-quick-group-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ph-quick-link--nav {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
}

.ph-overview-main {
    min-width: 0;
}

.ph-overview-main .ph-kpi-grid {
    margin-bottom: 1rem;
}

.property-hub-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #6b7280);
    font-size: 0.95rem;
}

.property-hub-loading::before {
    content: '';
    width: 22px;
    height: 22px;
    margin-bottom: 0.75rem;
    border-radius: 50%;
    border: 2px solid var(--separator-subtle);
    border-top-color: var(--accent);
    animation: phLoadingSpin 0.7s linear infinite;
}

@keyframes phLoadingSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .property-hub-loading::before {
        animation: none;
    }
}

/* KPI / Übersicht */
.ph-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ph-kpi {
    background: var(--bg-1);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--separator-subtle);
    box-shadow: var(--shadow-1);
}

.ph-kpi-value {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary, #111);
}

.ph-kpi-label {
    font-size: 0.78rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 0.15rem;
}

.ph-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    overflow: hidden;
}

.ph-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ph-section-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary, #111);
}

.ph-section-body {
    padding: 1rem;
}

.ph-section-body--flush {
    padding: 0;
}

.ph-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ph-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fafafa;
    font-size: 0.8rem;
    color: var(--text-primary, #333);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ph-quick-link:hover {
    background: #f0f0f0;
    border-color: rgba(0, 0, 0, 0.12);
}

/* Listen */
.ph-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ph-list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ph-list-item:last-child {
    border-bottom: none;
}

.ph-list-primary {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary, #111);
}

.ph-list-meta {
    font-size: 0.8rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 0.15rem;
}

.ph-list-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.ph-btn-ghost {
    border: none;
    background: transparent;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    color: var(--accent, #2563eb);
    cursor: pointer;
    border-radius: 6px;
}

.ph-btn-ghost:hover {
    background: rgba(37, 99, 235, 0.08);
}

.ph-btn-ghost--danger {
    color: #dc2626;
}

.ph-btn-ghost--danger:hover {
    background: rgba(220, 38, 38, 0.08);
}

.ph-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary, #6b7280);
    font-size: 0.88rem;
}

/* Kontakt-Karten · Handwerker */
.ph-contacts-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 1rem 0.85rem;
}
.ph-contacts-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0c1222;
}
.ph-contacts-lede {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}
.ph-empty--contacts {
    text-align: center;
    padding: 2.5rem 1.25rem;
}
.ph-empty-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0c1222;
}
.ph-empty-sub {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.ph-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
    padding: 0.25rem 1rem 1rem;
}

.ph-contact-card {
    background: #fff;
    border: 1px solid rgba(12, 18, 34, 0.08);
    border-radius: 14px;
    padding: 1rem 1.05rem;
    box-shadow: 0 1px 2px rgba(12, 18, 34, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.ph-contact-card:hover {
    border-color: rgba(12, 18, 34, 0.14);
    box-shadow: 0 6px 18px rgba(12, 18, 34, 0.06);
}

.ph-contact-role {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.35rem;
}

.ph-contact-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.ph-contact-line {
    font-size: 0.82rem;
    color: var(--text-secondary, #4b5563);
    margin-top: 0.2rem;
}

.ph-contact-line a {
    color: inherit;
    text-decoration: none;
}

.ph-contact-line a:hover {
    text-decoration: underline;
}

.ph-contact-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Dokumente */
.ph-doc-upload {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ph-upload-zone {
    border: 1.5px dashed rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ph-upload-zone:hover,
.ph-upload-zone.is-dragover {
    border-color: var(--accent, #2563eb);
    background: rgba(37, 99, 235, 0.04);
}

.ph-upload-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.ph-upload-form .ph-field-full {
    grid-column: 1 / -1;
}

.ph-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.25rem;
}

.ph-field input,
.ph-field select,
.ph-field textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    background: #fff;
}

/* Bilder */
.ph-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.65rem;
    padding: 1rem;
}

.ph-gallery img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Kontakt-Modal */
.ph-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 13000;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ph-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.ph-modal {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
    max-height: 90vh;
    overflow-y: auto;
}

.ph-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ph-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.ph-modal-body {
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ph-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.85rem 1.15rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ph-notes-block {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-primary, #333);
}

@media (max-width: 900px) {
    .ph-overview-layout {
        grid-template-columns: 1fr;
    }

    .ph-overview-nav {
        position: static;
    }
}

@media (max-width: 640px) {
    .property-hub-header {
        flex-wrap: wrap;
        padding: 0.85rem 1rem 0.65rem;
    }

    .property-hub-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .property-hub-title {
        font-size: 1.15rem;
    }

    .ph-upload-form {
        grid-template-columns: 1fr;
    }

    .ph-contact-grid {
        grid-template-columns: 1fr;
    }
}
