:root {
  --brand-primary: #2563eb;
  --brand-secondary: #1e293b;
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--brand-secondary); line-height: 1.25; }
h1 { font-size: 1.75rem; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; margin: 1.75rem 0 0.75rem; }

a { color: var(--brand-primary); }
a:hover { text-decoration: none; }

p.hint { color: var(--color-text-muted); font-size: 0.85rem; margin: 0.25rem 0 0; }

/* Header / nav */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2rem;
  background: var(--brand-secondary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.site-header .brand { font-weight: 700; font-size: 1.1rem; }
.brand-link { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.brand-logo { height: 32px; max-width: 160px; object-fit: contain; display: block; }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.site-header nav a, .site-header nav .link-button {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.925rem;
  transition: color 0.15s ease;
}
.site-header nav a:hover, .site-header nav .link-button:hover { color: #fff; }
.site-header nav .current-user { color: rgba(255, 255, 255, 0.6); font-size: 0.875rem; }

/* Layout */
.container { max-width: 960px; margin: 2rem auto; padding: 0 1.25rem 3rem; }

/* Buttons */
.link-button { background: none; border: none; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; color: inherit; }
.inline-form { display: inline; }

button[type="submit"] {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
button[type="submit"]:hover { opacity: 0.9; }

/* Flash messages */
.flashes { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.flash { padding: 0.7rem 1rem; margin-bottom: 0.5rem; border-radius: var(--radius); font-size: 0.925rem; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error { background: #fee2e2; color: #991b1b; }

/* Forms */
form label { display: block; margin-top: 1rem; font-weight: 600; font-size: 0.9rem; }
form label:first-child { margin-top: 0; }
form label.checkbox-label { font-weight: normal; }
form input[type=text], form input[type=email], form input[type=password],
form input[type=number], form input[type=url], form textarea, form select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-top: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}
form input:focus, form textarea:focus, form select:focus {
  outline: none;
  border-color: var(--brand-primary);
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
table th, table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--color-border); font-size: 0.925rem; }
table th { color: var(--color-text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; background: #fafafa; }
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover { background: #fafbfc; }

/* Public site */
.page-menu { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.page-list { list-style: none; padding: 0; }
.page-list li { margin-bottom: 0.5rem; }

@media (max-width: 640px) {
  .site-header { padding: 0.75rem 1.25rem; }
  .container { margin: 1.25rem auto; }
}

/* Contact forms */
.contact-form { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow-sm); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

