/* styles.css — Global Food Drive Initiative */

:root {
  --primary: #0f766e;
  --secondary: #14b8a6;
  --accent: #22c55e;
  --dark: #0f172a;
  --light: #f8fafc;
  --muted: #64748b;
  --danger: #dc2626;
  --card: #ffffff;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #f0fdfa, #ffffff);
  color: var(--dark);
  line-height: 1.6;
}

/* --------------------
   GLOBAL ELEMENTS
-------------------- */

a {
  text-decoration: none;
  color: var(--primary);
}

a:hover {
  color: var(--secondary);
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.small-btn {
  padding: 7px 14px;
  font-size: 14px;
}

.danger-btn {
  background: linear-gradient(135deg, #b91c1c, var(--danger));
}

.submit-btn {
  width: 100%;
  margin-top: 10px;
}

/* --------------------
   HEADERS
-------------------- */

header {
  background: white;
  border-bottom: 1px solid var(--border);
}

.main-header {
  padding: 25px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header h1 {
  font-size: 26px;
  color: var(--primary);
}

.main-header nav a {
  margin-left: 18px;
  font-weight: 600;
}

.sub-header {
  padding: 20px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sub-header h1 {
  font-size: 24px;
}

/* --------------------
   SECTIONS
-------------------- */

section {
  padding: 60px 8%;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero h2 {
  font-size: 42px;
  line-height: 1.2;
}

.hero p {
  margin: 20px 0;
  font-size: 18px;
  color: var(--muted);
}

.hero .btn {
  margin-right: 12px;
}

/* --------------------
   FORMS
-------------------- */

.form-section {
  max-width: 520px;
  margin: auto;
}

.reg-form {
  background: var(--card);
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.reg-form h2 {
  margin-bottom: 20px;
}

.reg-form label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
}

.reg-form input,
.reg-form select {
  width: 100%;
  padding: 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 6px;
}

.reg-form input:focus {
  outline: none;
  border-color: var(--primary);
}

/* --------------------
   ALERTS
-------------------- */

.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: 600;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

/* --------------------
   DASHBOARD
-------------------- */

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.dash-card {
  background: var(--card);
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.dash-card h3 {
  margin-bottom: 12px;
  color: var(--primary);
}

.dash-card p {
  font-size: 15px;
  margin-bottom: 6px;
}

.full-width {
  grid-column: 1 / -1;
}

.downline-list {
  padding-left: 20px;
}

/* --------------------
   TABLES
-------------------- */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
 table td {
  padding: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
}

table th {
  background: #f1f5f9;
}

/* --------------------
   RESPONSIVE
-------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .main-header,
  .sub-header {
    flex-direction: column;
    gap: 15px;
  }
}
