:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #1c2733;
  --muted: #5d6b7a;
  --brand: #0d4b8c;     /* Greek-blue */
  --brand-dark: #093567;
  --accent: #1a7f5a;
  --danger: #b23b3b;
  --border: #e1e6ec;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 32, 56, .08), 0 8px 24px rgba(16, 32, 56, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.container { width: min(960px, 92vw); margin: 0 auto; }

/* Header / footer */
.site-header {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; gap: 16px;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand-sub { display: block; font-weight: 400; opacity: .85; font-size: .82rem; }
.site-nav a { color: #fff; text-decoration: none; margin-left: 18px; opacity: .9; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }
.site-footer {
  margin-top: 48px; padding: 24px 0; color: var(--muted);
  border-top: 1px solid var(--border); font-size: .85rem;
}

/* Cards / layout */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin: 20px 0;
}
.page-title { margin: 28px 0 4px; font-size: 1.6rem; }
.page-subtitle { color: var(--muted); margin: 0 0 8px; }
.section-title { font-size: 1.1rem; margin: 0 0 16px; color: var(--brand-dark); }

/* Forms */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field select, input.input, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 1rem; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,75,140,.15);
}
.field.checkbox { flex-direction: row; align-items: center; gap: 10px; }
.field.checkbox label { font-weight: 500; color: var(--ink); }
.help { font-size: .8rem; color: var(--muted); }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 4px 0 0; font-size: .85rem; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; }
.alert-error { background: #fbe9e9; color: var(--danger); border: 1px solid #f0c9c9; }
.alert-info { background: #e9f1fb; color: var(--brand-dark); border: 1px solid #c9ddf0; }

/* Buttons */
.btn {
  display: inline-block; border: none; cursor: pointer; font-size: 1rem;
  padding: 11px 20px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn-link { background: #eef3f9; color: var(--brand-dark); }
.btn-danger-ghost { background: transparent; color: var(--danger); border: 1px solid #e7bcbc; padding: 6px 12px; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; }

/* Child cards */
.child-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 16px 0; background: #fbfcfe; position: relative; }
.child-card .child-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.child-card .child-head h3 { margin: 0; font-size: 1rem; color: var(--brand-dark); }

/* Tables (dashboard) */
table.data { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
table.data tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill-ok { background: #e3f3ec; color: var(--accent); }
.pill-full { background: #fbe9e9; color: var(--danger); }

/* Misc */
.school-list { list-style: none; padding: 0; }
.school-list li { margin: 10px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.big-check { font-size: 3rem; color: var(--accent); }
