/* ── Reset & Base ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── Navbar ── */
.navbar {
    background: #1a1a2e;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #e94560;
}

.nav-links a {
    color: #ccc;
    margin-left: 24px;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 70px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 12px;
}

.hero p {
    font-size: 18px;
    color: #aaa;
    margin-bottom: 32px;
}

/* ── Search Bar ── */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 750px;
    margin: 0 auto;
}

.search-bar input,
.search-bar select {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    flex: 1;
    min-width: 160px;
}

.search-bar button {
    padding: 12px 28px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: #c73652;
}

/* ── Section ── */
.section {
    padding: 50px 0;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 28px;
    color: #1a1a2e;
}

/* ── Property Cards Grid ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-no-image {
    width: 100%;
    height: 200px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.card-body {
    padding: 18px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a2e;
}

.card-location {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.card-location i {
    color: #e94560;
    margin-right: 4px;
}

.card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #555;
    margin-bottom: 14px;
}

.card-meta span i {
    margin-right: 4px;
    color: #1a1a2e;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #e94560;
}

.price span {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

.btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #1a1a2e;
    color: white;
}

.btn-primary:hover {
    background: #e94560;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-whatsapp:hover {
    background: #1ebe57;
}

/* ── No Results ── */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* ── Footer ── */
.footer {
    background: #1a1a2e;
    color: #aaa;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    font-size: 14px;
}

.footer a {
    color: #25d366;
}

/* ── Forms (used in Phase 5) ── */
.form-box {
    background: white;
    padding: 36px;
    border-radius: 12px;
    max-width: 480px;
    margin: 60px auto;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.form-box h2 {
    margin-bottom: 24px;
    color: #1a1a2e;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
}

.alert-success {
    background: #eafaf1;
    color: #1e8449;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar input,
    .search-bar select,
    .search-bar button {
        width: 100%;
        min-width: 0;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .detail-wrapper {
        grid-template-columns: 1fr;
    }

    .facts-box {
        grid-template-columns: 1fr;
    }

    .dashboard-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 12px 10px;
    }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 28px; }
    .search-bar input,
    .search-bar select { min-width: 100%; }
    .cards-grid { grid-template-columns: 1fr; }
    .dashboard-topbar {
        padding: 18px 12px;
    }
    .dashboard-table th,
    .dashboard-table td {
        font-size: 13px;
    }
}
/* ── Property Detail Page ── */
.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.detail-image {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.detail-no-image {
    width: 100%;
    height: 340px;
    background: #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    margin-bottom: 20px;
}

/* Quick facts */
.facts-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.fact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fact i {
    font-size: 22px;
    color: #e94560;
    width: 28px;
}

.fact div {
    display: flex;
    flex-direction: column;
}

.fact-value {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.fact-label {
    font-size: 12px;
    color: #999;
}

/* Right side */
.detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.detail-location {
    color: #777;
    font-size: 15px;
    margin-bottom: 16px;
}

.detail-location i {
    color: #e94560;
    margin-right: 4px;
}

.detail-price {
    font-size: 30px;
    font-weight: 800;
    color: #e94560;
    margin-bottom: 28px;
}

.detail-price span {
    font-size: 15px;
    font-weight: 400;
    color: #999;
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.detail-section p {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
}

/* Contact box */
.contact-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px;
}

.contact-box h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.contact-box p {
    color: #777;
    font-size: 14px;
    margin-bottom: 18px;
}

.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.btn-block:hover {
    opacity: 0.88;
}

.btn-call {
    background: #1a1a2e;
    color: white;
}

/* ── Responsive: detail page ── */
@media (max-width: 768px) {
    .detail-wrapper {
        grid-template-columns: 1fr;
    }
}
/* ── Dashboard ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #e94560;
}

.stat-label {
    font-size: 13px;
    color: #999;
}

.table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dash-table th {
    background: #1a1a2e;
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
}

.dash-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.dash-table tr:last-child td {
    border-bottom: none;
}

.dash-table tr:hover td {
    background: #fafafa;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-green {
    background: #eafaf1;
    color: #1e8449;
}

.badge-red {
    background: #fdecea;
    color: #c0392b;
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-view {
    background: #eef2ff;
    color: #3b5bdb;
}

.btn-edit {
    background: #fff9db;
    color: #e67700;
}

.btn-delete {
    background: #fdecea;
    color: #c0392b;
}

.btn-action:hover {
    opacity: 0.8;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.btn-action {
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.actions {
    align-items: center;
    flex-wrap: wrap;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
}

.checkbox-row label {
    margin: 0;
    cursor: pointer;
}

@media (max-width: 768px) {
    .dashboard-header {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-row,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Dashboard refresh */
.dashboard-page {
    background: #f4f6f8;
    padding: 34px 0 60px;
    min-height: calc(100vh - 80px);
}

.dashboard-topbar {
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 8px rgba(20, 27, 45, 0.05);
}

.dashboard-topbar h1 {
    color: #1a1a2e;
    font-size: 28px;
    line-height: 1.15;
    margin: 8px 0 6px;
}

.dashboard-topbar p {
    color: #667085;
    font-size: 14px;
    line-height: 1.5;
}

.role-pill {
    background: #eef2ff;
    color: #3b5bdb;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    padding: 5px 10px;
}

.dashboard-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.dashboard-stats {
    margin-bottom: 18px;
}

.dashboard-stats .stat-box {
    align-items: flex-start;
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    box-shadow: 0 1px 8px rgba(20, 27, 45, 0.05);
    gap: 8px;
    padding: 20px;
    text-align: left;
}

.stat-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    margin-bottom: 6px;
    width: 34px;
}

.stat-icon-dark {
    background: #eef0f3;
    color: #1a1a2e;
}

.stat-icon-green {
    background: #eafaf1;
    color: #1e8449;
}

.stat-icon-red {
    background: #fdecea;
    color: #c0392b;
}

.stat-icon-blue {
    background: #e7f3ff;
    color: #2563eb;
}

.info-pill {
    align-self: center;
    background: #eef2ff;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
}

.dashboard-panel {
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    box-shadow: 0 1px 8px rgba(20, 27, 45, 0.05);
    overflow: hidden;
}

.panel-heading {
    align-items: center;
    border-bottom: 1px solid #edf0f4;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
}

.panel-heading h2 {
    color: #1a1a2e;
    font-size: 18px;
    margin-bottom: 4px;
}

.panel-heading p {
    color: #667085;
    font-size: 13px;
}

.dashboard-table-wrapper {
    border-radius: 0;
    box-shadow: none;
}

.dashboard-table th {
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-table td {
    color: #344054;
}

.property-cell {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 220px;
}

.property-cell img,
.property-thumb-empty {
    border-radius: 8px;
    flex: 0 0 auto;
    height: 48px;
    object-fit: cover;
    width: 64px;
}

.property-thumb-empty {
    align-items: center;
    background: #eef0f3;
    color: #98a2b3;
    display: inline-flex;
    justify-content: center;
}

.property-cell strong {
    color: #1a1a2e;
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.property-cell span {
    color: #98a2b3;
    display: block;
    font-size: 12px;
}

.table-price {
    color: #1a1a2e;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-table .actions {
    min-width: 214px;
}

.dashboard-table .actions form {
    display: inline-flex;
}

.dashboard-table .btn-action {
    gap: 6px;
    min-height: 32px;
}

.dashboard-empty {
    align-items: center;
    color: #667085;
    display: flex;
    flex-direction: column;
    padding: 54px 20px;
    text-align: center;
}

.dashboard-empty i {
    align-items: center;
    background: #eef2ff;
    border-radius: 999px;
    color: #3b5bdb;
    display: inline-flex;
    font-size: 24px;
    height: 54px;
    justify-content: center;
    margin-bottom: 16px;
    width: 54px;
}

.dashboard-empty h3 {
    color: #1a1a2e;
    font-size: 20px;
    margin-bottom: 8px;
}

.dashboard-empty p {
    font-size: 14px;
    margin-bottom: 18px;
    max-width: 360px;
}

@media (max-width: 768px) {
    .dashboard-page {
        padding-top: 20px;
    }

    .dashboard-topbar,
    .panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-add-btn {
        width: 100%;
    }

    .dashboard-topbar h1 {
        font-size: 24px;
    }
}
