:root {
  --green-dark: #1b4332;
  --green-mid: #2d6a4f;
  --green-light: #52b788;
  --green-pale: #d8f3dc;
  --green-bg: #f0faf4;
  --text: #1a1a1a;
  --text-light: #555;
  --white: #fff;
  --red: #d32f2f;
  --red-bg: #fdecea;
  --orange: #e65100;
  --border: #d0d7de;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--green-bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  background: var(--green-dark);
  color: var(--white);
  padding: 0;
}
header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}
header nav a {
  color: var(--green-pale);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
}
header nav a:hover {
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.card h2 {
  color: var(--green-dark);
  margin-bottom: 16px;
  font-size: 1.3rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 48px 20px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: var(--white);
  border-radius: 12px;
  margin-bottom: 24px;
}
.hero h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 8px;
}
.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.info-item {
  background: var(--green-pale);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}
.info-item .label {
  font-size: 0.85rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 4px;
}
.info-item .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-dark);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.badge-green {
  background: var(--green-pale);
  color: var(--green-dark);
}
.badge-red {
  background: var(--red-bg);
  color: var(--red);
}
.badge-orange {
  background: #fff3e0;
  color: var(--orange);
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.form-group .hint {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 4px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--white);
  box-sizing: border-box;
  line-height: 1.4;
}
select {
  height: 44px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-light);
}
textarea {
  resize: vertical;
  min-height: 80px;
}

input[type="file"] {
  padding: 10px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  background: #fafafa;
}
input[type="file"]:hover {
  border-color: var(--green-light);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
}
.checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--green-mid);
}
.checkbox-group label {
  font-weight: 400;
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary {
  background: var(--green-mid);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--green-dark);
}
.btn-secondary {
  background: var(--green-pale);
  color: var(--green-dark);
}
.btn-secondary:hover {
  background: #b7e4c7;
}
.btn-danger {
  background: var(--red);
  color: var(--white);
}
.btn-danger:hover {
  background: #b71c1c;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn-block {
  display: block;
  width: 100%;
}

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #f5c6cb;
}
.alert-success {
  background: var(--green-pale);
  color: var(--green-dark);
  border: 1px solid #b7e4c7;
}

/* Terms box */
.terms-box {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.9rem;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

/* Section divider */
.section-title {
  font-size: 1.1rem;
  color: var(--green-mid);
  border-bottom: 2px solid var(--green-pale);
  padding-bottom: 8px;
  margin: 28px 0 18px;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  background: var(--green-dark);
  color: var(--white);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
tr:hover {
  background: var(--green-bg);
}
td .toggle-btn {
  cursor: pointer;
  font-size: 1.2rem;
  border: none;
  background: none;
  padding: 2px 6px;
}

/* Table checkboxes */
.table-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--green-mid);
}

/* Disk space bar */
.disk-bar-container {
  flex: 1;
  height: 16px;
  background: #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.disk-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 8px;
  transition: width 0.5s ease, background 0.3s;
}

/* Stats bar */
.stats-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--white);
  border-radius: 10px;
  padding: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green-mid);
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Admin toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Confirmation page */
.confirmation-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 16px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.modal {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal h3 {
  margin-bottom: 16px;
  color: var(--green-dark);
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  header .header-inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  header nav a {
    margin: 0 10px;
  }
  .hero h2 {
    font-size: 1.5rem;
  }
  .stats-bar {
    flex-direction: column;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .container, .container-wide {
    padding: 12px;
  }
  .card {
    padding: 18px;
  }
  th, td {
    padding: 8px 6px;
    font-size: 0.82rem;
  }
}
