@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #047857; /* Emerald 700 */
    --primary-dark: #064e3b; /* Emerald 900 */
    --accent: #fbbf24; /* Amber 400 */
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #10b981;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg-light); color: var(--text-dark); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; }

/* NAVBAR RESPONSIVE */
header { background: var(--primary); color: var(--white); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-md); }
.nav-container { max-width: 1280px; margin: 0 auto; padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 500; transition: var(--transition); padding: 0.5rem 1rem; border-radius: 8px; }
.nav-links a:hover { background: rgba(255,255,255,0.1); color: var(--accent); }
.btn-login { background: var(--accent); color: var(--primary-dark) !important; font-weight: 700 !important; }
.btn-login:hover { background: #f59e0b; transform: translateY(-2px); }

/* MOBILE MENU TOGGLE */
.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* HERO SECTION */
.hero { background: linear-gradient(to right, var(--primary-dark), var(--primary)); color: var(--white); padding: 6rem 5%; text-align: center; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 2rem; opacity: 0.9; font-weight: 300; }
.btn-outline { border: 2px solid var(--accent); color: var(--accent); padding: 0.75rem 2rem; border-radius: 50px; font-weight: 600; display: inline-block; transition: var(--transition); }
.btn-outline:hover { background: var(--accent); color: var(--primary-dark); }

/* LAYOUT & GRIDS */
.container { max-width: 1280px; margin: 4rem auto; padding: 0 5%; flex: 1; width: 100%; }
.section-title { text-align: center; font-size: 2rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 3rem; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

/* CARDS */
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid var(--border); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.card-img { height: 200px; width: 100%; object-fit: cover; }
.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-dark); }
.card-text { color: var(--text-muted); margin-bottom: 1.5rem; flex: 1; }
.badge { display: inline-block; padding: 0.25rem 0.75rem; background: var(--bg-light); color: var(--primary); border-radius: 50px; font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem; }

/* FORMS & TABLES */
.form-group { margin-bottom: 1.5rem; position: relative; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.form-control { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; transition: var(--transition); background: var(--white); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.2); }
.btn-submit { width: 100%; padding: 1rem; background: var(--primary); color: var(--white); border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-submit:hover { background: var(--primary-dark); }

.table-responsive { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f1f5f9; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.85rem; }
tr:hover td { background: #f8fafc; }

/* ADMIN LAYOUT */
.admin-wrapper { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; min-height: 70vh; }
.sidebar { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); height: max-content; }
.sidebar a { display: block; padding: 0.75rem 1rem; color: var(--text-muted); font-weight: 500; border-radius: 8px; margin-bottom: 0.5rem; transition: var(--transition); }
.sidebar a:hover, .sidebar a.active { background: #ecfdf5; color: var(--primary); }
.sidebar a.text-danger:hover { background: #fef2f2; color: var(--danger); }

/* TOAST NOTIFICATIONS */
.toast { position: fixed; top: 20px; right: 20px; padding: 1rem 1.5rem; background: var(--white); border-left: 5px solid var(--success); box-shadow: var(--shadow-lg); border-radius: 8px; z-index: 9999; animation: slideIn 0.5s forwards, fadeOut 0.5s 3s forwards; font-weight: 500; }
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }

footer { background: var(--text-dark); color: #94a3b8; text-align: center; padding: 2rem 5%; margin-top: auto; }

/* MEDIA QUERIES (MOBILE FIXES) */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-links { display: none; width: 100%; flex-direction: column; position: absolute; top: 100%; left: 0; background: var(--primary); padding: 1rem 5%; box-shadow: var(--shadow-md); }
    .nav-links.show { display: flex; }
    .nav-links a { width: 100%; text-align: center; }
    .admin-wrapper { grid-template-columns: 1fr; }
    .hero { padding: 4rem 5%; }
}