:root {
  --color-primary: #5b7c99;
  --color-primary-dark: #3d5a73;
  --color-accent: #e8a87c;
  --color-accent-light: #f9dcc4;
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #2d3436;
  --color-text-muted: #636e72;
  --color-border: #e0dcd6;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-danger: #e74c3c;
  --color-info: #3498db;
  --shadow-sm: 0 2px 8px rgba(45, 52, 54, 0.06);
  --shadow-md: 0 8px 24px rgba(45, 52, 54, 0.1);
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  display: block;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-text);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: white;
}

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

.btn-accent:hover {
  background: #d4956a;
  color: var(--color-text);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: white;
  color: var(--color-primary-dark);
}

.hero .btn-primary:hover {
  background: var(--color-accent-light);
}

.hero .btn-outline {
  border-color: white;
  color: white;
}

.hero .btn-outline:hover {
  background: white;
  color: var(--color-primary-dark);
}

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

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 3rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--color-border);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--color-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Forms */
.form-page {
  padding: 3rem 0 5rem;
}

.form-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.form-card.wide {
  max-width: 680px;
}

.form-card h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary-dark);
}

.form-card .subtitle {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(91, 124, 153, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  margin-top: 1.5rem;
}

.form-actions .btn {
  width: 100%;
}

.form-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Child entries */
.children-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.children-section h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
}

.child-entry {
  display: grid;
  grid-template-columns: 1fr 100px auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.child-entry .btn-remove {
  background: none;
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.child-entry .btn-remove:hover {
  background: var(--color-danger);
  color: white;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Dashboard */
.dashboard-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: 2.5rem 0;
}

.dashboard-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.dashboard-header p {
  opacity: 0.9;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.dashboard-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 2rem;
}

.dashboard-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Child checkboxes */
.child-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.child-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.child-checkbox:hover {
  background: var(--color-bg);
}

.child-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.child-checkbox.checked {
  border-color: var(--color-primary);
  background: rgba(91, 124, 153, 0.08);
}

/* Requests table */
.requests-section {
  grid-column: 1 / -1;
}

.requests-table {
  width: 100%;
  border-collapse: collapse;
}

.requests-table th,
.requests-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.requests-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.requests-table tbody tr:hover {
  background: var(--color-bg);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-scheduled {
  background: #cce5ff;
  color: #004085;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0;
  text-align: center;
  margin-top: auto;
}

.site-footer a {
  color: var(--color-accent-light);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  list-style: none;
}

/* CTA section */
.cta-section {
  background: var(--color-accent-light);
  padding: 3rem 1.5rem;
  text-align: center;
}

.cta-section h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary-dark);
}

.cta-section p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .child-entry {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 1.5rem;
  }

  .requests-table {
    display: block;
    overflow-x: auto;
  }

  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
}