/* Global Styles */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; margin: 0; background: #f6fff6; color:#222; }
.container { max-width:1100px; margin:20px auto; padding:15px; }
.navbar, nav { background:#2e8b57; color:#fff; padding:12px 18px; display:flex; justify-content:space-between; align-items:center; }
.navbar a, nav a { color:#fff; text-decoration:none; margin-left:12px; }
.brand { font-weight:700; font-size:18px; }
.menu { margin-top:12px; display:flex; gap:10px; flex-wrap:wrap; }
.card { background:#66bb6a; color:#fff; padding:12px 16px; border-radius:8px; text-decoration:none; display:inline-block; }

/* Header nav */
header.navbar .left { display:flex; align-items:center; gap:12px; }
nav ul { list-style:none; display:flex; gap:12px; margin:0; padding:0; align-items:center; }
nav ul li a { padding:8px 10px; border-radius:6px; display:inline-block; }
nav a.active, nav a:hover { background:#1b4332; }

/* Forms */
.form { background:#fff; padding:14px; border-radius:10px; box-shadow:0 2px 6px rgba(0,0,0,0.06); margin-bottom:20px; }
.form input, .form select, .form textarea, .form button { width:100%; padding:10px; margin:6px 0; border:1px solid #ddd; border-radius:6px; }
.form-row { display:flex; gap:8px; flex-wrap:wrap; }
.form-row .col { flex:1 1 200px; }

/* Dashboard cards */
.grid { display:flex; gap:12px; flex-wrap:wrap; margin-top:16px; }
.stat { flex:1 1 180px; background:#fff; padding:14px; border-radius:8px; box-shadow:0 2px 6px rgba(0,0,0,0.06); display:flex; align-items:center; gap:12px; }
.stat .icon { font-size:26px; padding:10px; background:#e6f6e6; border-radius:8px; color:#2e8b57; }
.stat .value { font-size:20px; font-weight:700; }
.stat .label { color:#666; font-size:13px; }

/* Tables */
.table { width:100%; border-collapse:collapse; background:#fff; border-radius:8px; overflow:hidden; box-shadow:0 2px 6px rgba(0,0,0,0.06); margin-top:12px; }
.table th, .table td { padding:10px; border-bottom:1px solid #eee; text-align:left; vertical-align:middle; }
.table th { background:#e6f6e6; color:#2e8b57; }
.table tr:nth-child(even) td { background:#fbfffb; }

/* Buttons */
.btn { display:inline-block; padding:8px 12px; border-radius:6px; text-decoration:none; color:#fff; }
.btn-edit { background:#2196f3; }
.btn-del { background:#ef5350; }
.btn-primary { background:#2e8b57; }

/* Footer */
.footer { text-align:center; color:#666; padding:14px 0; margin-top:20px; }

/* Responsive */
@media(max-width:900px){
  .form-row { flex-direction:column; }
  .grid { flex-direction:column; }
  nav ul { flex-direction:column; gap:8px; }
  .stat { justify-content:space-between; }
}
select {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}


/* ===== BASIC RESET FOR MOBILE RESPONSIVE ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 0;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ===== FORM ===== */
.form {
  margin-bottom: 30px;
}

.form h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row .col {
  flex: 1;
  min-width: 180px;
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-primary {
  background: #2e8b57 !important;
  color: #fff;
  justify-content: center;
}

.btn-edit {
  background: #007bff;
  color: #fff;
}

.btn-del {
  background: #dc3545;
  color: #fff;
}

/* ===== TABLE ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.table th,
.table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.table th {
  background: #f2f2f2;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  h3 {
    font-size: 1rem;
  }

  .form-row {
    flex-direction: column;
  }

  .table {
    font-size: 0.9rem;
  }

  /* Turn table into scrollable card for small screens */
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  textarea {
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  .form h3 {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 6px;
  }

  td:last-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
}


/* ====== NAVBAR ====== */
.navbar {
  background: #2e8b57;
  color: #fff;
  padding: 10px 15px;
  position: sticky;
  top: 0;
  z-index: 1000;
  position: relative;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 auto;
}

.logo {
  color: #fff;
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.nav-links a:hover {
  background: #1b4332;
}

.logout {
  background: #c62828;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ====== RESPONSIVE MENU ====== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #2e8b57;
    width: 100%;
    margin-top: 10px;
    border-radius: 6px;
    padding: 10px 0;
    position: absolute;
    z-index: 1;
    top: 17px;
    width: 38%;
    right: 0;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    padding: 10px;
    text-align: center;
  }
}
