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

body {
  font-family: Georgia, serif;
  color: #2c2c2c;
  background: #f9f7f2;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(26, 92, 42, 0.08) 35px, rgba(26, 92, 42, 0.08) 37px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(46, 139, 71, 0.06) 35px, rgba(46, 139, 71, 0.06) 37px);
}

/* NAV */
nav {
  background: #1a5c2a;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav .logo {
  color: #f0e68c;
  font-size: 1.3rem;
  font-weight: bold;
  padding: 1rem 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1rem;
  display: block;
  border-radius: 4px;
  transition: background 0.2s;
}

nav ul li a:hover,
nav ul li a.active { background: #2e8b47; }

nav .nav-user {
  color: #cde8d0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

nav .nav-user button {
  background: transparent;
  border: 1px solid #cde8d0;
  color: #cde8d0;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

nav .nav-user button:hover {
  background: #cde8d0;
  color: #1a5c2a;
}

/* LOGIN PAGE */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a5c2a 0%, #2e8b47 100%);
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,0.05) 35px, rgba(255,255,255,0.05) 37px),
    repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,0.04) 35px, rgba(255,255,255,0.04) 37px),
    linear-gradient(135deg, #1a5c2a 0%, #2e8b47 100%);
}

.login-box {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  text-align: center;
}

.login-box img { height: 70px; margin-bottom: 1rem; }
.login-box h1 { color: #1a5c2a; font-size: 1.5rem; margin-bottom: 0.3rem; }
.login-box p  { color: #666; font-size: 0.9rem; margin-bottom: 2rem; }

.form-group {
  text-align: left;
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #2e8b47;
}

.btn {
  display: inline-block;
  background: #1a5c2a;
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  text-align: center;
}

.btn:hover { background: #2e8b47; }

.error-msg {
  background: #fde8e8;
  color: #c0392b;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
}

/* MAIN CONTENT */
main {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.page-title {
  font-size: 2rem;
  color: #1a5c2a;
  border-bottom: 3px solid #f0e68c;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

/* DASHBOARD STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-top: 4px solid #2e8b47;
  text-align: center;
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #1a5c2a;
}

.stat-card .stat-label {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

/* SECTION BLOCKS */
.section-block {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-block h2 {
  color: #1a5c2a;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* TABLE */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #1a5c2a;
  color: white;
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.9rem;
}

td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.9rem;
}

tr:nth-child(even) td { background: #f4f9f5; }
tr:hover td { background: #e8f5ec; }

/* BADGES */
.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge-paid         { background: #d4edda; color: #155724; }
.badge-unpaid       { background: #fde8e8; color: #c0392b; }
.badge-trial        { background: #fff3cd; color: #856404; }
.badge-active       { background: #d4edda; color: #155724; }
.badge-inactive     { background: #e2e3e5; color: #383d41; }
.badge-regular      { background: #d1ecf1; color: #0c5460; }
.badge-renewed      { background: #d4edda; color: #155724; }
.badge-intends-to-renew { background: #d1ecf1; color: #0c5460; }
.badge-not-renewing { background: #e2e3e5; color: #383d41; }
.badge-family       { background: #d1ecf1; color: #0c5460; }
.badge-adult        { background: #e2d9f3; color: #4a235a; }
.badge-junior       { background: #fde8d8; color: #7d3c00; }

/* ACTION BUTTONS */
.btn-sm {
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-sm:hover { opacity: 0.8; }
.btn-edit   { background: #d1ecf1; color: #0c5460; }
.btn-delete { background: #fde8e8; color: #c0392b; }
.btn-add    { background: #1a5c2a; color: white; padding: 0.5rem 1rem; border-radius: 6px; border: none; cursor: pointer; font-size: 0.9rem; }
.btn-add:hover { background: #2e8b47; }

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  margin: auto;
}

.modal h2 { color: #1a5c2a; margin-bottom: 1.5rem; }

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-cancel {
  background: #e0e0e0;
  color: #444;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: white;
}

select:focus { outline: none; border-color: #2e8b47; }

/* FEES PAGE */
.fees-summary {
  background: linear-gradient(135deg, #1a5c2a, #2e8b47);
  color: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  text-align: center;
}

.fees-summary .fee-item strong {
  display: block;
  font-size: 1.8rem;
}

.fees-summary .fee-item span {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* FOOTER */
footer {
  background: #1a5c2a;
  color: #cde8d0;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

footer a { color: inherit; }
footer p + p { margin-top: 0.5rem; }
