/* ROOT VARIABLES */
:root {
    --primary-brown: #8B4513;
    --dark-brown: #5D4037;
    --light-brown: #D7CCC8;
    --white: #FFFFFF;
    --off-white: #FAF9F6;
    --text-color: #3E2723;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-color);
    overflow-x: hidden;
}

/* UTILITIES */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.highlight { color: var(--light-brown); font-weight: 700; }
.brown-text { color: var(--primary-brown); }
.text-center { text-align: center; }
.bg-light { background-color: var(--off-white); }
a { text-decoration: none; }

/* NAVBAR */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    position: fixed; width: 100%; top: 0; z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.navbar.scrolled { padding: 10px 0; box-shadow: 0 2px 15px rgba(0,0,0,0.1); }

.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.4rem; font-weight: 700; color: var(--dark-brown); }
.logo span { color: var(--primary-brown); }

.nav-links a {
    color: var(--text-color); margin: 0 15px; font-weight: 500;
    transition: 0.3s; position: relative; font-size: 0.95rem;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--primary-brown); transition: width 0.3s;
}
.nav-links a:hover::after, .nav-links a.active-link::after { width: 100%; }
.nav-links a:hover, .nav-links a.active-link { color: var(--primary-brown); }

.btn-login {
    background-color: var(--primary-brown); color: var(--white);
    border: none; padding: 8px 20px; border-radius: 25px;
    cursor: pointer; font-weight: 600; transition: 0.3s; font-size: 0.9rem;
}
.btn-login:hover { background-color: var(--dark-brown); transform: translateY(-2px); }

/* HERO SECTION */
.hero {
    height: 100vh;
    background: url('https://source.unsplash.com/1600x900/?landscape,mountain') no-repeat center/cover;
    position: relative; display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--white); background-attachment: fixed;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(62, 39, 35, 0.6), rgba(62, 39, 35, 0.8));
}
.hero-content { position: relative; z-index: 1; max-width: 700px; padding: 20px; animation: fadeInUp 1s ease; }
.hero-content h1 { font-size: 2.8rem; margin-bottom: 15px; }
.hero-content p { font-size: 1.1rem; margin-bottom: 25px; opacity: 0.9; }

.btn-cta {
    background: var(--primary-brown); color: var(--white);
    border: none; padding: 12px 30px; font-size: 1rem; border-radius: 30px;
    cursor: pointer; transition: 0.3s; border: 2px solid var(--primary-brown);
}
.btn-cta:hover { background: transparent; border-color: var(--white); transform: scale(1.05); }

/* SECTIONS */
.section { 
    padding: 80px 0; scroll-margin-top: 70px;
    opacity: 0; transform: translateY(30px); transition: all 0.6s ease-out;
}
.section.visible { opacity: 1; transform: translateY(0); }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 10px; }

/* CARDS */
.grid-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px; justify-content: center; padding: 10px 0;
}
.card {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow); transition: all 0.3s ease;
    border: 1px solid #F0F0F0; max-width: 320px; margin: 0 auto; width: 100%;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 10px 25px rgba(139, 69, 19, 0.15); }
.card-img { height: 180px; position: relative; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-img img { transform: scale(1.1); }

.badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(139, 69, 19, 0.9); color: var(--white);
    padding: 4px 12px; border-radius: 20px; font-size: 0.75rem;
}
.card-body { padding: 18px; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--dark-brown); }
.price { font-size: 1.1rem; font-weight: 700; color: var(--primary-brown); margin-bottom: 12px; }

.specs { margin-bottom: 15px; font-size: 0.85rem; list-style: none; color: #666; }
.specs li { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.sensor-text {
    font-weight: 600; color: var(--primary-brown); background: rgba(139, 69, 19, 0.1);
    padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; cursor: pointer;
}

.btn-card {
    width: 100%; padding: 10px; background: var(--dark-brown); color: var(--white);
    border: none; border-radius: 6px; cursor: pointer; transition: 0.3s; font-size: 0.9rem;
}
.btn-card:hover { background: var(--primary-brown); }
.btn-card.outline { background: transparent; border: 1px solid var(--primary-brown); color: var(--primary-brown); }
.btn-card.outline:hover { background: var(--primary-brown); color: var(--white); }

/* PROFILE & FOOTER */
.profile-img { height: 220px; }
.job-title { font-size: 0.9rem; color: #888; margin-bottom: 10px; }
.stats { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; }
.stat-item { display: flex; flex-direction: column; }
.stat-item strong { font-size: 1.1rem; color: var(--primary-brown); }

.quote-box { margin-bottom: 40px; }
.quote-text { margin: 20px 0; font-style: italic; color: var(--dark-brown); }
.social-links a {
    display: inline-flex; width: 40px; height: 40px;
    background: var(--primary-brown); color: var(--white); border-radius: 50%;
    justify-content: center; align-items: center; margin: 0 10px; transition: 0.3s;
}
.social-links a:hover { transform: scale(1.1); background: var(--dark-brown); }
footer { background: var(--dark-brown); color: var(--light-brown); padding: 15px 0; text-align: center; font-size: 0.9rem; }

/* MODAL & FORM STYLES (DIPERBAIKI) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center;
    z-index: 2000; backdrop-filter: blur(5px);
}
.modal-content {
    background: #FFFFFF; width: 90%; max-width: 400px; padding: 30px;
    border-radius: 16px; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease-out;
}
.close-modal {
    position: absolute; top: 15px; right: 20px; font-size: 28px;
    color: #999; cursor: pointer; line-height: 1;
}
.close-modal:hover { color: #8B4513; }

.auth-tabs { display: flex; margin-bottom: 25px; border-bottom: 2px solid #EEE; }
.tab-btn {
    flex: 1; padding: 12px; background: none; border: none; font-size: 16px;
    font-weight: 600; color: #999; cursor: pointer; transition: 0.3s;
}
.tab-btn.active { color: #8B4513; border-bottom: 3px solid #8B4513; }

/* FIX: Mencegah Form Menumpuk */
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn 0.4s; }

.form-header { text-align: center; margin-bottom: 20px; }
.form-header h3 { color: #5D4037; margin-bottom: 5px; }
.form-header p { color: #888; font-size: 0.9rem; }

.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; color: #5D4037; font-weight: 500; font-size: 0.9rem; }
.form-group input {
    width: 100%; padding: 12px 15px; border: 1px solid #DDD;
    border-radius: 8px; font-size: 1rem; outline: none; background: #FAFAFA;
}
.form-group input:focus { border-color: #8B4513; background: #FFF; box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1); }

.btn-submit {
    width: 100%; padding: 14px; background: linear-gradient(135deg, #8B4513, #5D4037);
    color: white; border: none; border-radius: 8px; font-size: 1rem;
    font-weight: 600; cursor: pointer; margin-top: 10px; transition: transform 0.2s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3); }

/* ANIMATIONS */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--white); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s;
}/* --- DASHBOARD SPECIFIC STYLES (Tambahkan di paling bawah style.css) --- */

/* Navbar Dashboard (Lebih Gelap & Simpel) */
.dashboard-nav {
    background: var(--dark-brown);
    padding: 15px 0;
    color: var(--white);
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 35px; height: 35px;
    background: var(--light-brown);
    color: var(--dark-brown);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

.btn-logout {
    background: #c62828; /* Merah */
    padding: 6px 15px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.3s;
}
.btn-logout:hover { background: #b71c1c; }

/* Action Bar (Menu Cepat) */
.action-bar {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border: 1px solid #EEE;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: transform 0.2s;
}
.btn-action:hover { transform: translateY(-3px); }

.btn-sell { background: var(--primary-brown); }
.btn-worker { background: #2E7D32; /* Hijau */ }
.btn-edit { background: #424242; /* Abu Gelap */ }

/* Alert Box (Notifikasi) */
.alert-box {
    background: #FFF3CD;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #ffc107;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Teks Lokasi Asli (Tidak disensor) */
.location-real {
    color: var(--dark-brown);
    font-weight: 600;
    background: #EFEBE9;
    padding: 2px 8px;
    border-radius: 4px;
}
/* Update CSS ini di style.css */

/* Tambahkan class khusus untuk Modal yang lebar (Form Tanah) */
.modal-content.large-modal {
    max-width: 600px; /* Lebih lebar dari modal login biasa */
    max-height: 90vh; /* Agar tidak kepotong di layar kecil */
    overflow-y: auto; /* Bisa discroll jika form kepanjangan */
}

/* Pastikan input file terlihat rapi */
input[type="file"] {
    padding: 10px;
    background: #f1f1f1;
    border-radius: 8px;
    width: 100%;
}/* --- TAMBAHAN CSS SLIDER FOTO --- */
.card-img {
    position: relative;
    overflow: hidden;
}

/* Membungkus semua gambar */
.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Gambar Slide */
.slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Gambar yang sedang aktif (terlihat) */
.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Tombol Panah (Prev/Next) */
.slider-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-weight: bold;
    font-size: 18px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Di atas gambar */
    transition: 0.3s;
    user-select: none;
}

.slider-btn:hover {
    background-color: rgba(139, 69, 19, 0.8); /* Warna coklat saat hover */
}

.prev { left: 10px; }
.next { right: 10px; }

/* Indikator titik (opsional, agar tau ada berapa foto) */
.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
}
.dot.active { background: white; }