:root {
  --green: #2e7d32;
  --green-dark: #1b5e20;
  --green-light: #e8f5e9;
  --blue: #1976d2;
  --blue-light: #bbdefb;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --text: #333333;
  --border: #e0e0e0;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--white);
  overflow-x: hidden;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background-color: var(--green);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: -0.5px;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

nav a:hover,
nav a:focus {
  border-bottom: 2px solid white;
  opacity: 0.9;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  nav#main-nav {
    position: fixed;
    top: 60px;
    left: 0;
    background: var(--green);
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }
  nav#main-nav.active {
    height: 320px;
  }
  nav#main-nav ul {
    flex-direction: column;
    padding: 1.2rem 0;
  }
  nav#main-nav li {
    margin: 0;
    text-align: center;
  }
  nav#main-nav a {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
  }
  nav#main-nav a:last-child {
    border-bottom: none;
  }
}

/* ===== HERO SECTION ===== */
.hero {
  background-color: var(--blue);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-size: 1.1rem;
  opacity: 0.95;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
  margin: 2rem 0;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

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

.card-content {
  padding: 1.4rem;
}

.card h3 {
  color: var(--green);
  margin-bottom: 0.6rem;
  font-size: 1.3rem;
}

.card p {
  color: #555;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  background-color: var(--green);
  color: white;
  padding: 0.65rem 1.4rem;
  text-decoration: none;
  border-radius: 6px;
  margin-top: 0.8rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--green-dark);
  transform: translateY(-1px);
}

/* Blue button variant */
.btn.blue {
  background-color: var(--blue);
}

.btn.blue:hover {
  background-color: #1565c0;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--green);
  color: white;
  text-align: center;
  padding: 1.8rem 1.5rem;
  margin-top: 3.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== ADMIN STYLES ===== */
.login-form,
.admin-form {
  background: var(--light-gray);
  padding: 2.2rem;
  border-radius: 12px;
  max-width: 700px;
  margin: 2.5rem auto;
  box-shadow: var(--shadow);
}

.login-form {
  max-width: 450px;
}

.admin-form h2,
.login-form h2 {
  margin-bottom: 1.4rem;
  color: var(--green-dark);
  font-size: 1.6rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  padding: 0.8rem;
  margin: 0.5rem 0 1.2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.admin-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Table Styles (Admin) */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.2rem;
}

table th,
table td {
  padding: 0.9rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table th {
  background-color: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
}

/* ===== INSTALL BANNER ===== */
#install-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green);
  color: white;
  padding: 14px 20px;
  text-align: center;
  z-index: 10000;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
  font-size: 15px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { bottom: -60px; opacity: 0; }
  to { bottom: 0; opacity: 1; }
}

#install-banner button {
  margin-left: 12px;
  padding: 6px 14px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
}

#install-btn {
  background: white;
  color: var(--green);
}

#close-install {
  background: transparent;
  color: white;
  font-size: 20px;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
  }
  #install-banner {
    padding: 12px 15px;
    font-size: 14px;
  }
  #install-banner button {
    padding: 5px 12px;
    margin-left: 8px;
  }
}

/* ===== ADMIN LOGIN FLOATING BUTTON ===== */
a[href='admin/login.php'] {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--blue);
  color: white;
  padding: 10px 16px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 9000;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

a[href='admin/login.php']:hover {
  background: #1565c0;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
  a[href='admin/login.php'] {
    bottom: 70px; /* Above install banner */
  }
}