:root {
    --primary: #0f766e; /* Teal/Green */
    --secondary: #0f172a; /* Dark Blue */
    --accent: #2dd4bf; /* Light Teal */
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #334155;
    --danger: #ef4444;
}

* { box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
body { margin: 0; background: var(--bg); color: var(--text); }

/* Layout */
.navbar { background: var(--secondary); color: var(--white); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.navbar h1 { margin: 0; font-size: 1.5rem; }
.nav-links button { background: none; border: 1px solid var(--accent); color: var(--accent); padding: 0.5rem 1rem; cursor: pointer; border-radius: 4px; margin-left: 10px; }
.nav-links button:hover { background: var(--accent); color: var(--secondary); }

.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.section { display: none; } /* Hidden by default, toggled via JS */
.section.active { display: block; }

/* Forms */
.auth-box { max-width: 400px; margin: 5rem auto; background: var(--white); padding: 2rem; border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
input, select, textarea { width: 100%; padding: 0.8rem; margin-bottom: 1rem; border: 1px solid #cbd5e1; border-radius: 4px; }
button.btn-primary { width: 100%; padding: 0.8rem; background: var(--primary); color: var(--white); border: none; border-radius: 4px; cursor: pointer; font-weight: bold; }
button.btn-primary:hover { opacity: 0.9; }

/* Marketplace Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: transform 0.2s; }
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; height: 180px; object-fit: cover; background: #e2e8f0; }
.card-body { padding: 1rem; }
.card-price { color: var(--primary); font-weight: bold; font-size: 1.2rem; }
.badge { background: #e0f2fe; color: #0369a1; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; }

/* Dashboard Tables */
table { width: 100%; border-collapse: collapse; background: var(--white); margin-top: 1rem; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
th { background: #f1f5f9; }
.status-pending { color: orange; }
.status-completed { color: green; }

/* Chat */
.chat-window { border: 1px solid #ccc; height: 300px; overflow-y: scroll; padding: 1rem; background: #fff; margin-bottom: 1rem;}
.msg { padding: 0.5rem; margin-bottom: 0.5rem; border-radius: 4px; max-width: 80%; }
.msg.me { background: var(--primary); color: white; margin-left: auto; }
.msg.them { background: #e2e8f0; }

/* Stats (Admin) */
.stats-row { display: flex; gap: 1rem; margin-bottom: 2rem; }
.stat-card { flex: 1; background: var(--white); padding: 1.5rem; border-radius: 8px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.stat-number { font-size: 2rem; font-weight: bold; color: var(--primary); }
