:root {
    /* CORE PALETTE (Zillow Blue / Clean Light) */
    --primary: #006AFF;       /* Zillow Blue */
    --primary-dark: #0056cf;
    --primary-soft: #e6f2ff;
    --text-main: #2a2a33;
    --text-muted: #596b82;
    --bg-body: #f9f9fb;
    --bg-card: #ffffff;
    --border: #dce0e6;
    
    /* STATUS COLORS */
    --success: #00a862;       /* Growth Green */
    --warning: #ffaa00;
    --danger: #d93c3c;

    /* SPACING */
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 1. RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.5; }
a { text-decoration: none; color: inherit; }

/* 2. LAYOUT UTILITIES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.mt-20 { margin-top: 20px; }

/* 3. HEADER (Zillow Style) */
header { background: #fff; border-bottom: 1px solid var(--border); padding: 15px 0; position: sticky; top: 0; z-index: 50; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.nav-links a { margin-left: 20px; font-weight: 500; color: var(--text-muted); font-size: 0.9rem; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); background: var(--primary-soft); padding: 6px 12px; border-radius: 20px; }

/* 4. CARDS (Propwire/Zillow Hybrid) */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary); }
.card-img { height: 180px; background: #eee; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 15px; }
.card-price { font-size: 1.4rem; font-weight: 700; color: var(--text-main); }
.card-meta { font-size: 0.9rem; color: var(--text-muted); margin: 5px 0; }
.badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.7); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.badge.closing { background: var(--primary); }

/* 5. DATA TABLES (DealCheck Style) */
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.9rem; }
.data-table th { text-align: left; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: 8px; font-size: 0.8rem; text-transform: uppercase; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); color: var(--text-main); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .val-pos { color: var(--success); font-weight: 600; }
.data-table .val-neg { color: var(--danger); font-weight: 600; }

/* 6. BUTTONS */
.btn { display: inline-block; padding: 10px 20px; border-radius: 4px; font-weight: 600; text-align: center; cursor: pointer; border: none; font-size: 0.9rem; width: 100%; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 1px solid var(--border); background: #fff; color: var(--text-main); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* 7. TABS (Propwire Style) */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; background: #fff; padding: 0 20px; }
.tab-btn { padding: 15px 20px; cursor: pointer; color: var(--text-muted); font-weight: 600; border-bottom: 3px solid transparent; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 8. TRACKER PROGRESS */
.progress-container { height: 6px; background: var(--border); border-radius: 10px; margin: 10px 0; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); width: 0%; transition: width 0.5s; }