
:root {
  --pad: 12px;
  --gap: 10px;
  --radius: 10px;
  --muted: #666;
  --bg: #f6f7fb;
  --card: #fff;
  --border: #e6e8ef;
  --primary: #2b7cff;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  background: var(--bg);
  color: #222;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 950px;
  margin: 0 auto;
  padding: 24px;
}

h1 { font-size: 22px; margin: 0 0 16px; }

nav {
  display: flex;
  gap: var(--gap);
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
nav a, nav form button {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  transition: background 0.2s, color 0.2s;
}
nav a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
nav .spacer { flex: 1 1 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
  margin-bottom: 16px;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px; border-bottom: 1px solid #eee; text-align: left; }
thead th { background: #fafbfe; }

.btn {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

form.inline { display: inline; }

label { display: block; margin-bottom: 8px; font-weight: 500; color: #222; }
input, select, textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
}

/* Grid system */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.col-12 { grid-column: span 12; }
.col-6  { grid-column: span 6; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
/* force a block to start on its own full-width row */
.row-full { grid-column: 1 / -1; }

/* Small screens: stack everything */
@media (max-width: 720px) {
  .col-6, .col-4, .col-3, .col-12, .row-full { grid-column: 1 / -1; }
}

/* Alerts / notices */
.alert {
  padding: 10px;
  background: #ffe9e9;
  border: 1px solid #ffbcbc;
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.notice { color: var(--muted); font-size: 12px; }

footer { margin-top: 24px; color: var(--muted); font-size: 12px; }

/* --- existing styles can stay --- */

.form-stack { display: block; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}

.profile-link {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  color: #333;
  text-decoration: none;
}
.profile-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Two-up rows that always fill the full width */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;  /* two equal columns */
  gap: 12px;
  width: 100%;
}

.pair .half {
  min-width: 0;                   /* allow shrink without overflow */
}

.pair .half > * {
  width: 100%;                    /* label/input/select stretch */
}

/* Stack on small screens */
@media (max-width: 720px) {
  .pair {
    grid-template-columns: 1fr;   /* one column on narrow viewports */
  }
}



