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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
}

/* NAV */
nav {
    background: #1e293b;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f8fafc;
    text-decoration: none;
}

.nav-logo span { color: #3b82f6; }

.nav-links { display: flex; gap: 8px; align-items: center; }

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: #f8fafc; }

.btn {
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: transparent; color: #94a3b8; border: 1px solid #334155; }
.btn-secondary:hover { color: #f8fafc; border-color: #94a3b8; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: #22c55e; color: white; }
.btn-success:hover { background: #16a34a; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* HERO */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
}

.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 16px; }
.hero h1 span { color: #3b82f6; }
.hero p { font-size: 1.15rem; color: #94a3b8; max-width: 560px; margin: 0 auto 40px; }

/* SEARCH BAR */
.search-bar {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.search-bar select, .search-bar input {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f8fafc;
}

.search-bar select:focus, .search-bar input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
}

/* MAIN CONTENT */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.section { padding: 48px 0; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.section-header h2 { font-size: 1.4rem; font-weight: 700; }

/* GRID */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* CARD */
.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

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

.card-body { padding: 16px; }

.card-material {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #3b82f6;
    margin-bottom: 6px;
}

.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }

.card-dims { font-size: 0.85rem; color: #64748b; margin-bottom: 8px; }

.card-location { font-size: 0.8rem; color: #94a3b8; display: flex; align-items: center; gap: 4px; }

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    margin-top: 8px;
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal {
    background: white;
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

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

.modal-body { padding: 28px; }
.modal-body h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 16px; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-item label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; display: block; margin-bottom: 2px; }
.detail-item span { font-size: 0.95rem; font-weight: 500; }

.contact-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.contact-box h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 10px; color: #475569; }
.contact-box p { font-size: 0.9rem; margin-bottom: 6px; }

/* FORMS */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    margin: 48px auto;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.form-card h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.form-card .subtitle { color: #64748b; font-size: 0.9rem; margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: #374151; }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-link { text-align: center; margin-top: 20px; font-size: 0.85rem; color: #64748b; }
.form-link a { color: #3b82f6; text-decoration: none; font-weight: 600; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 18px;
}

.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* DASHBOARD */
.dashboard-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 24px;
}

.dashboard-header h1 { font-size: 1.4rem; font-weight: 700; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 128px);
}

.sidebar {
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 24px 16px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.sidebar a:hover, .sidebar a.active { background: #eff6ff; color: #2563eb; }

.main-panel { padding: 32px; }

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.stat-card .value { font-size: 2rem; font-weight: 800; color: #1e293b; }
.stat-card .label { font-size: 0.8rem; color: #94a3b8; margin-top: 4px; }

/* TABLE */
.table-wrap { background: white; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.07); overflow: hidden; }

table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; padding: 12px 16px; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
td { padding: 14px 16px; font-size: 0.9rem; border-top: 1px solid #f1f5f9; }
tr:hover td { background: #f8fafc; }

/* PAGINATION */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination button {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.pagination button:hover, .pagination button.active { background: #3b82f6; color: white; border-color: #3b82f6; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* PHOTO UPLOAD */
.photo-upload {
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.photo-upload:hover { border-color: #3b82f6; }
.photo-upload p { color: #94a3b8; font-size: 0.85rem; margin-top: 8px; }

.photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.photo-previews img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }

/* STATUS BADGES */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active { background: #f0fdf4; color: #16a34a; }
.badge-expired { background: #fef2f2; color: #dc2626; }
.badge-pending { background: #fefce8; color: #ca8a04; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 64px 24px; color: #94a3b8; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: #475569; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .search-bar { flex-direction: column; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .form-card { padding: 24px; margin: 24px 16px; }
    .form-row { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}
