/**
 * Premium User Dashboard Styles
 * Modern, clean interface for landlord property management
 */

/* ── Dashboard Container ── */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ─── Pill Toggles — Tipo de Propiedad & Tipo de Operación ─── */
.fancy-property-type .acf-label,
.fancy-operation-type .acf-label {
    text-align: left !important;
}

.fancy-property-type .acf-label label,
.fancy-operation-type .acf-label label {
    font-size: 0.95rem !important;
    margin-bottom: 0.75rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
}

/* Remove ACF taxonomy field border/scroll */
.fancy-property-type .acf-taxonomy-field,
.fancy-property-type .acf-input,
.fancy-property-type .acf-input > div,
.fancy-property-type .acf-input > div > div {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Pill list — works for both taxonomy (ul) and radio (.acf-radio-list) */
.fancy-property-type ul,
.fancy-property-type .acf-radio-list,
.fancy-operation-type .acf-radio-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

.fancy-property-type ul > li,
.fancy-property-type .acf-radio-list > li,
.fancy-operation-type .acf-radio-list > li {
    display: block !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 0 !important;
}

.fancy-property-type ul > li > label,
.fancy-property-type .acf-radio-list > li > label,
.fancy-operation-type .acf-radio-list > li > label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 9px 18px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 999px !important;
    background: #fff !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    white-space: nowrap !important;
    transition: all 0.18s ease !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: 0 !important;
    width: auto !important;
    text-align: left !important;
    box-shadow: none !important;
    flex-direction: row !important;
}

.fancy-property-type ul > li > label:hover,
.fancy-property-type .acf-radio-list > li > label:hover,
.fancy-operation-type .acf-radio-list > li > label:hover {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: rgba(31, 123, 255, 0.06) !important;
    transform: none !important;
    box-shadow: none !important;
}

.fancy-property-type ul input[type="radio"],
.fancy-property-type ul input[type="checkbox"],
.fancy-property-type .acf-radio-list input[type="radio"],
.fancy-operation-type .acf-radio-list input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

.fancy-property-type ul > li:has(input:checked) > label,
.fancy-property-type .acf-radio-list > li:has(input:checked) > label,
.fancy-operation-type .acf-radio-list > li:has(input:checked) > label {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(31, 123, 255, 0.35) !important;
    transform: none !important;
}

.fancy-property-type .acf-label .description,
.fancy-property-type .acf-required,
.fancy-operation-type .acf-label .description,
.fancy-operation-type .acf-required {
    display: none !important;
}

/* Override .publish-page constraints when the modern dashboard is rendered */
.publish-page:has(.dashboard-shell) {
    max-width: none;
    padding-top: 0;
    padding-bottom: 0;
}

/* ── Modern Sidebar Shell ── */
.dashboard-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 0;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 24px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    background: var(--primary-gradient);
    box-shadow: 0 6px 14px rgba(31, 123, 255, 0.35);
    flex-shrink: 0;
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 12px;
    color: #94a3b8;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 11px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
    position: relative;
}

.sidebar-link svg {
    flex-shrink: 0;
    color: #94a3b8;
    transition: color 0.18s ease;
}

.sidebar-link span:not(.sidebar-badge) {
    flex: 1;
}

.sidebar-link:hover {
    background: #f8fafc;
    color: var(--text-primary);
}

.sidebar-link:hover svg {
    color: var(--primary-color);
}

.sidebar-link--active {
    background: linear-gradient(135deg, rgba(31, 123, 255, 0.1) 0%, rgba(32, 214, 199, 0.08) 100%);
    color: var(--primary-color);
}

.sidebar-link--active svg {
    color: var(--primary-color);
}

.sidebar-link--active::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--primary-color), #20D6C7);
}

.sidebar-link--danger {
    color: #94a3b8;
}

.sidebar-link--danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.sidebar-link--danger:hover svg {
    color: #dc2626;
}

.sidebar-link--danger.sidebar-link--active {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.sidebar-link--danger.sidebar-link--active svg {
    color: #dc2626;
}

.sidebar-link--danger.sidebar-link--active::before {
    background: #ef4444;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 22px;
    width: auto;
    height: 22px;
    padding: 0 7px;
    background: rgba(31, 123, 255, 0.1);
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-hover);
}

.sidebar-link--active .sidebar-badge {
    background: var(--primary-color);
    color: #fff;
}

.sidebar-badge--alert {
    background: #ef4444;
    color: #fff;
    animation: pulse 2s infinite;
}

/* ── Main column ── */
.dashboard-main {
    min-width: 0;
}

.dashboard-topbar {
    margin-bottom: 22px;
    padding: 26px 30px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.dashboard-topbar .dashboard-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.dashboard-topbar .dashboard-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* ── Stats grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card--blue .stat-card-icon { background: rgba(31, 123, 255, 0.1); color: var(--primary-color); }
.stat-card--green .stat-card-icon { background: #ecfdf5; color: #059669; }
.stat-card--amber .stat-card-icon { background: #fffbeb; color: #d97706; }
.stat-card--purple .stat-card-icon { background: rgba(32, 214, 199, 0.12); color: #20D6C7; }

.stat-card-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-card-label {
    font-size: 12px;
    color: #94a3b8;
    margin: 4px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px 0;
    }
    .dashboard-sidebar {
        position: static;
        min-height: auto;
        padding: 16px;
    }
    .sidebar-nav,
    .sidebar-footer {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        border-top: none;
        padding-top: 0;
        margin-top: 12px;
    }
    .sidebar-link {
        padding: 9px 12px;
        font-size: 13px;
    }
    .sidebar-link span { display: none; }
    .sidebar-link--active::before { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-topbar { padding: 20px; }
}

@media (max-width: 520px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 14px; }
    .stat-card-value { font-size: 20px; }
    .profile-danger-zone {
        align-items: flex-start;
        flex-direction: column;
    }
    .btn-danger-outline {
        width: 100%;
    }
}

/* ── Dashboard Header ── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.dashboard-welcome {
    flex: 1;
}

.dashboard-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

.dashboard-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.dashboard-logout-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
    transform: translateY(-1px);
}

/* ── Dashboard Navigation Tabs ── */
.dashboard-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 12px;
    overflow-x: auto;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-tab:hover {
    background: #fff;
    color: #334155;
}

.nav-tab.active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(31, 123, 255, 0.1);
}

.nav-tab svg {
    flex-shrink: 0;
}

.nav-tab--danger.active {
    color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--border-color);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

.nav-tab.active .tab-badge {
    background: var(--primary-color);
    color: #fff;
}

.tab-badge--alert {
    background: #ef4444;
    color: #fff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ── Dashboard Content Area ── */
.dashboard-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.dashboard-tab-panel {
    padding: 32px 0;
}

.dashboard-tab-panel .acf-form-wrapper {
    max-width: 100%;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(31, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 123, 255, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #ef4444;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

/* ── Alerts ── */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.alert svg {
    flex-shrink: 0;
}

.alert--success {
    background: #ecfdf5;
    border: 2px solid #d1fae5;
    color: #065f46;
}

.alert--error {
    background: #fef2f2;
    border: 2px solid #fee2e2;
    color: #991b1b;
}

.alert--danger {
    background: #fef2f2;
    border: 2px solid #fee2e2;
    color: #991b1b;
}

.alert--danger strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

/* ── Properties Grid ── */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.property-card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    padding: 0;
}

.property-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.property-card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.property-card-image--placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, var(--border-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.property-card-content {
    padding: 20px;
}

.property-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.property-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.property-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.property-status--publish {
    background: #d1fae5;
    color: #065f46;
}

.property-status--pending {
    background: #fef3c7;
    color: #92400e;
}

.property-status--draft {
    background: var(--border-color);
    color: #475569;
}

.property-card-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.property-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 15px;
    margin: 0 0 24px 0;
}

/* ── Inbox Styles ── */
.inbox-unread-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #fef3c7;
    border: 2px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

.inbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inbox-message-item {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.inbox-message-item:hover {
    border-color: #cbd5e1;
}

.inbox-message-item--unread {
    border-color: #fde68a;
    background: #fffbeb;
}

.inbox-message-item--active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(31, 123, 255, 0.1);
}

.inbox-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    color: inherit;
}

.inbox-message-header:hover {
    text-decoration: none;
}

.inbox-message-meta {
    flex: 1;
    min-width: 0;
}

.inbox-message-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inbox-message-subject {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 14px;
}

.inbox-message-date {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.inbox-message-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge--unread {
    background: #fef3c7;
    color: #92400e;
}

.status-badge--read {
    background: rgba(31, 123, 255, 0.1);
    color: var(--primary-hover);
}

.status-badge--replied {
    background: #d1fae5;
    color: #065f46;
}

.inbox-chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
    color: #94a3b8;
}

.inbox-chevron--open {
    transform: rotate(180deg);
}

.inbox-message-body {
    padding: 0 20px 20px 20px;
    border-top: 1px solid #f1f5f9;
}

.message-bubble {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.message-bubble--visitor {
    background: #f8fafc;
    border: 2px solid var(--border-color);
}

.message-bubble--reply {
    background: rgba(31, 123, 255, 0.06);
    border: 2px solid rgba(31, 123, 255, 0.14);
}

.message-bubble-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 13px;
}

.message-bubble-header strong {
    color: var(--text-primary);
}

.message-bubble-email {
    color: var(--text-secondary);
}

.message-bubble-phone {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.message-bubble-phone:hover {
    text-decoration: underline;
}

.message-bubble-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.message-bubble-time {
    font-size: 12px;
    color: #94a3b8;
}

.inbox-reply-form {
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.inbox-reply-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inbox-reply-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.inbox-reply-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 123, 255, 0.1);
}

/* ── Profile & Forms ── */
.profile-form,
.delete-account-form {
    max-width: 600px;
}

.profile-danger-zone {
    max-width: 600px;
    margin-top: 32px;
    padding: 18px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff7f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.profile-danger-zone h3 {
    margin: 0 0 4px;
    color: #991b1b;
    font-size: 15px;
    font-weight: 800;
}

.profile-danger-zone p {
    margin: 0;
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.45;
}

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 14px;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    background: #fff;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.18s ease;
}

.btn-danger-outline:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.form-field {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 123, 255, 0.1);
}

.form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 6px 0 0 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    margin-top: 32px;
}

/* ── ACF Form Wrapper ── */
.acf-form-wrapper {
    max-width: 900px;
}

/* ── Responsive Design ── */
@media (max-width: 768px) {
    /* Stack all 2-column ACF fields to single column.
       High specificity to outweigh publish-form.css 50% rule loaded by Vite. */
    .acf-frontend-form .acf-fields > .acf-field[data-width],
    .acf-frontend-form .form-step-container > .acf-field[data-width],
    .acf-frontend-form .acf-fields > .acf-field[data-width="50"],
    .acf-frontend-form .form-step-container > .acf-field[data-width="50"],
    .acf-frontend-form .acf-fields > .acf-field[data-width="33"],
    .acf-frontend-form .form-step-container > .acf-field[data-width="33"],
    .dashboard-content .acf-field[data-width] {
        width: 100% !important;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .dashboard-title {
        font-size: 24px;
    }

    .dashboard-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-tab-panel {
        padding: 20px 0;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

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

    .property-card-actions {
        flex-direction: column;
    }

    .property-card-actions .btn-secondary,
    .property-card-actions .btn-danger {
        width: 100%;
        justify-content: center;
    }

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

    .inbox-message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .inbox-message-status {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 16px 12px;
    }

    .nav-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .dashboard-shell {
        padding: 12px 0 !important;
        gap: 12px !important;
    }

    .dashboard-topbar {
        padding: 16px 20px !important;
        border-radius: 12px !important;
    }

    .dashboard-topbar .dashboard-title {
        font-size: 20px !important;
    }

    .dashboard-topbar .dashboard-subtitle {
        font-size: 13px !important;
    }

    .dashboard-content {
        border-radius: 12px !important;
    }

    .dashboard-tab-panel {
        padding: 16px 0 !important;
    }


    .dashboard-sidebar {
        padding: 12px 16px !important;
        border-radius: 12px !important;
    }

    .acf-frontend-form .acf-form,
    .acf-form {
        padding: 0 !important;
    }
}

/* ── Contact-visibility toggle switches (profile form) ── */
.contact-toggles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.contact-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    background: #ffffff;
    transition: background-color 0.15s;
}
.contact-toggle + .contact-toggle {
    border-top: 1px solid #f1f5f9;
}
.contact-toggle:hover {
    background: #f8fafc;
}
.contact-toggle__text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
}
/* Hide the native checkbox; the switch is drawn by the sibling span. */
.contact-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.contact-toggle__switch {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.2s ease;
}
.contact-toggle__switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
    transition: transform 0.2s ease;
}
.contact-toggle input[type="checkbox"]:checked + .contact-toggle__switch {
    background: var(--primary-color, #1F7BFF);
}
.contact-toggle input[type="checkbox"]:checked + .contact-toggle__switch::after {
    transform: translateX(18px);
}
.contact-toggle input[type="checkbox"]:focus-visible + .contact-toggle__switch {
    box-shadow: 0 0 0 3px rgba(31, 123, 255, 0.30);
}

/* ── Didit identity-verification gate (publish tab) ── */
.didit-gate {
    text-align: center;
    max-width: 460px;
    margin: 8px auto;
    padding: 32px 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}
.didit-gate__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(31, 123, 255, 0.10);
    color: var(--primary-color, #1F7BFF);
}
.didit-gate__title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}
.didit-gate__text {
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #64748b;
}
.didit-gate__error {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: #b91c1c;
}

/* ── Remove-avatar control ── */
.avatar-remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #b91c1c;
    cursor: pointer;
    user-select: none;
}
.avatar-remove input[type="checkbox"] {
    accent-color: #b91c1c;
    cursor: pointer;
}
.avatar-remove svg {
    flex: 0 0 auto;
}

/* ── International phone field (country-code picker + number) ── */
.phone-field {
    position: relative;
    display: flex;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    overflow: visible;
}
.phone-field:focus-within {
    border-color: var(--primary-color, #1F7BFF);
    box-shadow: 0 0 0 3px rgba(31, 123, 255, 0.15);
}
.phone-field__cc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    background: #f8fafc;
    border: 0;
    border-right: 1px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    white-space: nowrap;
}
.phone-field__cc:hover {
    background: #f1f5f9;
}
.phone-field__dial {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}
.phone-field__num {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: #0f172a;
    outline: none;
}
.phone-field__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.phone-field__opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
}
.phone-field__opt:hover {
    background: #f1f5f9;
}
.phone-field__opt.is-active {
    background: rgba(31, 123, 255, 0.10);
    color: var(--primary-color, #1F7BFF);
    font-weight: 600;
}
.phone-field__opt-name {
    flex: 1 1 auto;
}
.phone-field__opt-dial {
    color: #94a3b8;
    font-weight: 600;
}
