@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

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

/* NAV */
nav {
    background: #0f172a;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-logo span { color: #60a5fa; }

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

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

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

/* BUTTONS */
.btn {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-block;
    letter-spacing: -0.01em;
}

.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(59,130,246,0.35); }
.btn-secondary { background: transparent; color: #94a3b8; border: 1px solid #334155; }
.btn-secondary:hover { color: #f1f5f9; border-color: #64748b; }
.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(160deg, #0f172a 0%, #1e293b 50%, #162032 100%);
    color: white;
    padding: 88px 32px 72px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 0%, rgba(59,130,246,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    line-height: 1.15;
    position: relative;
}

.hero h1 span { color: #60a5fa; }

.hero p {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 520px;
    margin: 0 auto 44px;
    line-height: 1.65;
    position: relative;
}

/* SEARCH BAR */
.search-bar {
    background: white;
    border-radius: 14px;
    padding: 18px 20px;
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
}

.search-bar select, .search-bar input {
    flex: 1;
    min-width: 150px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #1e293b;
    background: #f8fafc;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

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

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

.section { padding: 52px 0; }

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

.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

/* CARD */
.card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid #f1f5f9;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.06);
    border-color: #e2e8f0;
}

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

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

.card-body { padding: 18px; }

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

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

.card-dims { font-size: 0.82rem; 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.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    margin-top: 10px;
    letter-spacing: 0.01em;
}

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

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

.modal {
    background: white;
    border-radius: 18px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

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

.modal-body { padding: 28px 32px 32px; }
.modal-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

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

.detail-item label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
}

.detail-item span { font-size: 0.92rem; font-weight: 500; }

.contact-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.contact-box h3 {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-box p { font-size: 0.9rem; margin-bottom: 6px; }

/* FORMS */
.form-card {
    background: white;
    border-radius: 18px;
    padding: 44px;
    max-width: 480px;
    margin: 52px auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.form-card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.form-card .subtitle { color: #64748b; font-size: 0.9rem; margin-bottom: 30px; line-height: 1.5; }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    letter-spacing: 0.01em;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: white;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.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: 22px; font-size: 0.85rem; color: #64748b; }
.form-link a { color: #3b82f6; text-decoration: none; font-weight: 600; }
.form-link a:hover { text-decoration: underline; }

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

.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: 20px 28px;
}

.dashboard-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

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

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

.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: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.03em;
}

.stat-card .label { font-size: 0.8rem; color: #94a3b8; margin-top: 4px; font-weight: 500; }

/* TABLE */
.table-wrap {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

table { width: 100%; border-collapse: collapse; }

th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

td { padding: 14px 16px; font-size: 0.875rem; border-top: 1px solid #f1f5f9; }
tr:hover td { background: #fafbfc; }

/* PAGINATION */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; }

.pagination button {
    padding: 8px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.15s;
    color: #475569;
}

.pagination button:hover, .pagination button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

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

.photo-upload:hover { border-color: #3b82f6; background: #eff6ff; }
.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: 8px; border: 1px solid #e2e8f0; }

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

.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: 72px 24px; color: #94a3b8; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; color: #64748b; }
.empty-state p { font-size: 0.9rem; line-height: 1.6; }

/* MOBILE NAV */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    z-index: 150;
}

.mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px 8px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    gap: 3px;
}

.mobile-nav a .nav-icon { font-size: 1.3rem; line-height: 1; }
.mobile-nav a.active { color: #2563eb; }

@media (max-width: 768px) {
    .hero { padding: 64px 20px 56px; }
    .hero h1 { font-size: 2.1rem; }
    .hero p { font-size: 1rem; }
    .search-bar { flex-direction: column; gap: 8px; padding: 16px; }
    .container { padding: 0 16px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .mobile-nav { display: flex; }
    .main-panel { padding: 16px; padding-bottom: 80px; }
    .table-wrap { overflow-x: auto; }
    .form-card { padding: 28px 20px; margin: 24px 16px; }
    .form-row { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .modal-body { padding: 20px; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
    .photo-upload { padding: 32px 16px; }
    .btn-sm { padding: 8px 14px; font-size: 0.82rem; }
    nav { padding: 0 16px; }
}
