:root {
    --pwal-pink:     #f43f8e;
    --pwal-purple:   #7c3aed;
    --pwal-gradient: linear-gradient(90deg, #f43f8e 0%, #7c3aed 100%);
    --bg-page:       #eef2ff;
    --bg-card:       #ffffff;
    --text-main:     #0f172a;
    --text-muted:    #94a3b8;
    --border:        #e2e8f0;
    --radius:        16px;
    --shadow:        0 2px 12px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    margin: 0;
}

/* ── Navbar ── */
.dash-navbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.navbar-inner {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 60px;
    gap: 24px;
    position: relative;
}

.navbar-brand-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo { height: 50px; }

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link-item {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link-item:hover { background: #f8fafc; color: var(--text-main); }

.nav-link-item.active {
    background: linear-gradient(90deg, rgba(244,63,142,0.1), rgba(124,58,237,0.1));
    color: var(--pwal-pink);
    font-weight: 700;
}

.nav-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    margin-left: 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    vertical-align: 2px;
}

.mobile-nav-item .nav-unread-badge {
    float: right;
    margin-top: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.lang-btn {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.flag-img { width: 18px; border-radius: 2px; }

.nav-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    color: #64748b;
    transition: all 0.2s;
}

.nav-icon-btn:hover { background: #f1f5f9; }

/* Credit balance chip */
.nav-credit-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(251,191,36,.12));
    border: 1px solid rgba(245,158,11,.28);
    font-size: 13px;
    font-weight: 700;
    color: #d97706;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.nav-credit-chip i { font-size: 13px; color: #f59e0b; }
.nav-credit-chip:hover {
    background: linear-gradient(135deg, rgba(245,158,11,.2), rgba(251,191,36,.2));
    color: #b45309;
    transform: translateY(-1px);
}
.nav-credit-val { line-height: 1; }

.notif-badge {
    position: absolute;
    top: -6px; right: -6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: red;
    color: #fff;
    font-size: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.nav-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: var(--pwal-gradient);
}

.avatar-img    { width: 100%; height: 100%; object-fit: cover; }

.avatar-initials {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.hamburger {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 4px 8px;
}

.mobile-menu {
    border-top: 1px solid var(--border);
    padding: 8px 16px;
    display: none;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu.open { display: flex; }

.mobile-nav-item {
    padding: 10px 12px;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.mobile-nav-item:hover { background: #f8fafc; color: var(--text-main); }

/* ── Page wrapper ── */
.dash-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 24px;
}

/* ── Org Banner ── */
.db-org-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(90deg, #4c1d95, #6d28d9, #7c3aed);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.db-org-banner-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.db-org-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.db-org-btn:hover { background: rgba(255,255,255,0.25); }

.db-org-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.db-org-close:hover { color: #fff; }

/* ── Stat Cards ── */
.db-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.db-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

.db-stat-icon-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.6rem;
    flex-direction: column;
    gap: 2px;
}

/* icon variants */
.db-icon-total { background: linear-gradient(135deg, #ede9fe, #c4b5fd); }
.db-icon-total i { color: #7c3aed; }

.db-icon-sale { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.db-icon-sale i { color: #db2777; }

.db-icon-rent { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
.db-icon-rent i { color: #16a34a; }

.db-icon-sold { background: linear-gradient(135deg, #1e1b4b, #312e81); }
.db-icon-sold i { color: #fff; }

/* tag inside icon */
.db-icon-tag {
    font-size: 7px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    line-height: 1.4;
}

.db-tag-sale { background: #f43f8e; color: #fff; }
.db-tag-rent { background: #16a34a; color: #fff; }
.db-tag-sold { background: #374151; color: #fff; }

.db-stat-info { flex: 1; min-width: 0; }

.db-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.db-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 3px;
}

/* ── Dash Card ── */
.dash-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.dash-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0;
}

/* ── Filter selects (Market Data / Properties Stats) ── */
.db-filter-sel {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.db-filter-sel:focus { border-color: var(--pwal-purple); }

/* ── Create Org / Save Post cards ── */
.db-circle-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.db-create-org-btn {
    background: var(--pwal-purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.db-create-org-btn:hover { opacity: 0.88; }

.db-big-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

/* ── Team Member card ── */
.db-add-member-btn {
    background: var(--pwal-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.db-add-member-btn:hover { opacity: 0.88; color: #fff; }

.db-org-logo {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #34d399, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Avatar stack ── */
.avatar-stack { display: flex; flex-direction: row-reverse; }

.avatar-bubble {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

/* ── Chart legend ── */
.chart-legend {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    gap: 4px;
    flex-wrap: wrap;
}

.legend-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
}

/* ── Stat card (legacy) -- used in old references -- */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ── Footer ── */
.dash-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 32px;
}
