:root {
  --primary: #2d5016; /* Native bush green */
  --primary-light: #4a7b2a;
  --accent: #c85a3c; /* Terracotta */
  --accent-light: #e07856;
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #2a2a2a;
  --text-light: #5a5a5a;
  --border: #e0ddd8;
  --shadow: rgba(45, 80, 22, 0.08);
}

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

body {
  font-family: 'Crimson Pro', 'Georgia', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Outfit', 'Helvetica Neue', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 12px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: '⌂';
  font-size: 1.8rem;
  color: var(--accent);
}

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

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--primary);
}

nav a:hover::after {
  width: 100%;
}

/* Main content */
main {
  padding: 3rem 0;
  animation: fadeIn 0.6s ease-out 0.2s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  font-family: 'Outfit', sans-serif;
}

.btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

.btn-secondary {
  background: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent-light);
}

.btn-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Crimson Pro', serif;
  transition: border-color 0.2s ease;
  background: var(--surface);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}

thead {
  background: var(--primary);
  color: white;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

tbody tr:hover {
  background: #f5f4f2;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Toggle switch */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: #ddd;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.toggle.active {
  background: var(--primary);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle.active::after {
  transform: translateX(30px);
}

/* Footer */
footer {
  background: var(--primary);
  color: white;
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

footer p {
  opacity: 0.9;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.success-message {
  background: #d4edda;
  border: 2px solid #28a745;
  color: #155724;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.error-message {
  background: #f8d7da;
  border: 2px solid #dc3545;
  color: #721c24;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 0.75rem 0.5rem;
  }
}

/* Loading spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
