* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff4757;
    --secondary-color: #2f3542;
    --accent-color: #ffa502;
    --success-color: #2ed573;
    --danger-color: #ff4757;
    --border-color: #dfe4ea;
    --bg-light: #f1f2f6;
    --text-dark: #2f3542;
    --text-light: #747d8c;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
}

.main-wrapper {
    min-height: calc(100vh - 200px);
}

/* Header */
.main-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.logo a {
    text-decoration: none;
}

.header-search {
    flex: 1;
    max-width: 500px;
}

.header-search form {
    display: flex;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
}

.header-search input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.95rem;
}

.header-search button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.header-search button:hover {
    background: #ee5a6f;
}

.header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.header-nav a:hover {
    background: var(--bg-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #ee5a6f;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 1.25rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.filter-group select,
.filter-group input[type="number"],
.filter-group input[type="text"] {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range input,
.price-range select {
    flex: 1;
}

.price-range span {
    color: var(--text-light);
}

/* Listings */
.listings-wrapper {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.listings-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.listings-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.listing-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.listing-card.vip {
    border: 2px solid var(--accent-color);
    background: linear-gradient(to bottom, #fff9e6 0%, white 30%);
}

.listing-card.premium {
    border: 2px solid var(--primary-color);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

.badge-vip {
    background: var(--accent-color);
    color: white;
}

.badge-premium {
    background: var(--primary-color);
    color: white;
}

.card-image {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-light);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.listing-card:hover .card-image img {
    transform: scale(1.05);
}

.image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.card-content {
    padding: 1rem;
}

.card-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card-specs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.card-specs span {
    display: flex;
    align-items: center;
}

.card-location {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.card-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-page {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s;
}

.btn-page:hover,
.btn-page.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* No results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.toast-success {
    background: var(--success-color);
}

.toast-error {
    background: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Footer */
.main-footer {
    background: var(--secondary-color);
    color: white;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ced6e0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        max-width: 100%;
        width: 100%;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 1rem;
    }
}

/* Auth forms */
.auth-container {
    max-width: 450px;
    margin: 3rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.auth-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #e84118;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #26de81;
}
