/* VRDN Coordination Tool — shared styles */

:root {
  --ink: #1a1a1f;        /* primary text */
  --muted: #62626b;      /* secondary text */
  --paper: #ffffff;      /* inputs */
  --bg: #f3f3f5;         /* page background */
  --line: #d3d3d9;       /* borders */
  --accent: #1b4a30;     /* VRDN green — primary actions */
  --accent-dark: #102f1e;
  --ok: #1f8a4c;
  --warn: #b45309;
  --radius: 8px;
  --maxform: 540px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* ---- Top bar ---- */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand .logo { height: 28px; width: auto; display: block; }
.brandlink { display: flex; align-items: center; gap: 0.5rem; color: #fff; text-decoration: none; }

/* Shared nav controls (search box, leagues dropdown, links) */
.navctrls { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.topbar .navctrls input, .topbar .navctrls select {
  min-height: 38px; width: auto; padding: 0.3rem 0.5rem; font-size: 0.9rem;
  border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.topbar .navctrls input { width: 160px; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; }
  .topbar .navctrls { width: 100%; }
  .topbar .navctrls input { flex: 1; width: auto; }
}
.topbar a { color: #fff; text-decoration: none; }
.topbar .linkbtn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
}

/* ---- Layout ---- */
.wrap { max-width: var(--maxform); margin: 1.5rem auto; padding: 0 1rem; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
h1 { font-size: 1.5rem; margin: 0 0 0.25rem; }
.sub { color: var(--muted); margin: 0 0 1.5rem; }

/* ---- Forms ---- */
label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; }
.hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(27,74,48,0.35);
  border-color: var(--accent);
}

.checkgrid { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.checkrow {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.6rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}
.checkrow input { width: 22px; height: 22px; min-height: 0; flex: none; }
.checkrow label { margin: 0; font-weight: 500; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; width: 100%;
  min-height: 50px; margin-top: 1.5rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: 1.05rem; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn:focus { outline: 3px solid rgba(27,74,48,0.4); outline-offset: 2px; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--bg); }

/* ---- Messages ---- */
.msg { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius); display: none; }
.msg.show { display: block; }
.msg.error { background: #fdecef; color: #a8152f; border: 1px solid #f5c2cc; }
.msg.ok { background: #e9f7ef; color: #166534; border: 1px solid #b7e4c7; }

.foot { text-align: center; margin-top: 1.25rem; color: var(--muted); }
.foot a { color: var(--accent); font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }