/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Navbar ── */
.navbar {
    background: #2c3e50;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand a {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: #3498db; }
.nav-user { color: #bdc3c7; font-size: 0.9rem; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; flex: 1; }

/* ── Messages ── */
.messages { padding: 0 2rem; margin-top: 1rem; }
.message {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.message-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.message-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.message-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ── Auth Pages ── */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}
.auth-card {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.auth-card h2 { margin-bottom: 0.25rem; color: #2c3e50; }
.auth-subtitle { color: #888; margin-bottom: 1.5rem; font-size: 0.9rem; }
.auth-link { margin-top: 1.25rem; text-align: center; font-size: 0.9rem; color: #555; }
.auth-link a { color: #3498db; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.9rem; color: #444; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: #fafafa;
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: #3498db; background: #fff; }
.help-text  { color: #888; font-size: 0.8rem; margin-top: 0.25rem; display: block; }
.error-text { color: #e74c3c; font-size: 0.8rem; margin-top: 0.25rem; display: block; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}
.btn-primary   { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-secondary { background: #95a5a6; color: #fff; }
.btn-secondary:hover { background: #7f8c8d; }

/* ── Profile ── */
.profile-container { display: flex; justify-content: center; padding: 2rem 1rem; }
.profile-card {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.profile-header { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
.profile-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.profile-photo-placeholder {
    width: 80px; height: 80px; border-radius: 50%;
    background: #3498db; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700;
}
.role-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}
.role-admin  { background: #ffeaa7; color: #d35400; }
.role-owner  { background: #dfe6e9; color: #2d3436; }
.role-tenant { background: #d5f5e3; color: #1e8449; }

/* ── Footer ── */
.footer {
    background: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
}
/* ── Dashboard ── */
.dashboard { padding: 1rem 0; }

.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h2 { color: #2c3e50; font-size: 1.8rem; }
.dashboard-header p  { color: #888; margin-top: 0.25rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border-top: 4px solid #3498db;
}
.stat-number { font-size: 2rem; font-weight: 700; color: #2c3e50; }
.stat-label  { font-size: 0.85rem; color: #888; margin-top: 0.25rem; }

.dashboard-section {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.dashboard-section h3 { margin-bottom: 1rem; color: #2c3e50; font-size: 1.1rem; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.section-header h3 { margin-bottom: 0; }

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #aaa;
}
.empty-state p { margin-bottom: 1rem; }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    background: #f5f6fa;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    color: #555;
    border-bottom: 2px solid #eee;
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}
.data-table tr:hover { background: #fafafa; }

/* ── Property Cards ── */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.property-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}
.property-card:hover { transform: translateY(-3px); }
.property-img { width: 100%; height: 200px; object-fit: cover; }
.property-img-placeholder {
    width: 100%; height: 200px;
    background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}
.property-card-body { padding: 1.25rem; }
.property-card-body h3 { margin-bottom: 0.25rem; color: #2c3e50; }
.property-meta  { color: #888; font-size: 0.85rem; margin-bottom: 0.5rem; }
.property-price { color: #3498db; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.property-details { display: flex; gap: 1rem; font-size: 0.85rem; color: #555; margin-bottom: 0.75rem; }
.property-actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }

/* ── Status Badge ── */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}
.status-available   { background: #d5f5e3; color: #1e8449; }
.status-occupied    { background: #fde8d8; color: #c0392b; }
.status-unavailable { background: #eee;    color: #888; }

/* ── Property Detail ── */
.property-detail { max-width: 900px; margin: 0 auto; }
.photo-gallery { display: flex; gap: 0.75rem; overflow-x: auto; margin-bottom: 1.5rem; }
.gallery-img { height: 250px; width: auto; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.detail-card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.detail-header {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: 1.5rem;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem; margin-bottom: 1.5rem;
}
.detail-item {
    background: #f5f6fa; border-radius: 8px;
    padding: 0.75rem; text-align: center;
}
.detail-label { display: block; font-size: 0.78rem; color: #888; margin-bottom: 0.25rem; }
.detail-value { font-weight: 700; color: #2c3e50; }
.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 { margin-bottom: 0.5rem; color: #2c3e50; }
.detail-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

.section-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1rem 0 0.5rem 0;
}



/* ── Form Page ── */
.form-page { max-width: 700px; margin: 0 auto; }
.form-page h2 { margin-bottom: 1.5rem; color: #2c3e50; }
.form-card {
    background: #fff; border-radius: 10px;
    padding: 1.5rem; margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.form-card h3 { margin-bottom: 1rem; color: #2c3e50; }
.photo-form-row { margin-bottom: 1rem; }

/* ── Danger Button ── */
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
/* ── Room Cards ── */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.room-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}
.room-img { width: 100%; height: 160px; object-fit: cover; }
.room-img-placeholder {
    width: 100%; height: 160px;
    background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
}
.room-card-body { padding: 1rem; }
.room-card-body h4 { margin-bottom: 0.25rem; color: #2c3e50; }

/* ── Amenities ── */
.amenities-grid { margin-bottom: 1.5rem; }
.amenities-grid h3 { margin-bottom: 0.75rem; color: #2c3e50; }
.amenities-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.amenity {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
}
.amenity-yes { background: #d5f5e3; color: #1e8449; }
.amenity-no  { background: #f0f0f0; color: #aaa; text-decoration: line-through; }

/* ── Form Row ── */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

/* ── Checkbox Grid ── */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}




/* ── Search Page ── */
.search-page {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* ── Filter Panel ── */
.filter-panel {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 1rem;
}
.filter-panel h3 { margin-bottom: 1rem; color: #2c3e50; }
.filter-section { margin-bottom: 1.25rem; border-bottom: 1px solid #f0f0f0; padding-bottom: 1.25rem; }
.filter-section h4 { font-size: 0.85rem; color: #888; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.filter-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.9rem; margin-bottom: 0.5rem; }
.filter-input:focus { outline: none; border-color: #3498db; }
.amenity-checkboxes { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── Results Panel ── */
.results-panel { min-width: 0; }
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.results-header h3 { color: #2c3e50; }

/* ── View Toggle ── */
.view-toggle { display: flex; gap: 0.5rem; }
.toggle-btn {
    padding: 0.4rem 0.85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
}
.toggle-btn.active { background: #3498db; color: #fff; border-color: #3498db; }

/* ── Result Cards ── */
.result-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: transform 0.2s;
}
.result-card:hover { transform: translateY(-3px); }
.result-img { width: 100%; height: 190px; object-fit: cover; }
.result-img-placeholder {
    width: 100%; height: 190px;
    background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem;
}
.result-card-body { padding: 1rem; }
.result-card-body h4 { margin: 0.4rem 0 0.25rem; color: #2c3e50; }
.result-tag {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #d5f5e3;
    color: #1e8449;
}
.result-tag-room { background: #dbeafe; color: #1e40af; }
.mini-amenities { display: flex; gap: 0.25rem; margin-top: 0.5rem; flex-wrap: wrap; }
.mini-amenities .amenity { padding: 0.15rem 0.4rem; font-size: 0.85rem; }

/* ── List View ── */
.property-list-view { display: flex; flex-direction: column; gap: 1rem; }
.property-list-view .result-card { display: grid; grid-template-columns: 200px 1fr; }
.property-list-view .result-img { height: 100%; min-height: 150px; }
.property-list-view .result-img-placeholder { height: 100%; min-height: 150px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .search-page { grid-template-columns: 1fr; }
    .filter-panel { position: static; }
    .property-list-view .result-card { grid-template-columns: 1fr; }
}