@import url("https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap");

:root {
  --bg: #f6f5f0;
  --ink: #1b2b24;
  --ink-soft: #55645c;
  --surface: #ffffff;
  --border: #e0e2d9;
  --green: #2f5233;
  --green-dark: #203a25;
  --lime: #c4d82e;
  --clay: #d9643a;
  --clay-soft: #f6e3da;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 43, 36, 0.06), 0 8px 24px rgba(27, 43, 36, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

a { color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  background: var(--green);
  color: #fff;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn.secondary:hover { background: #fff; border-color: var(--ink-soft); }
.btn.danger { background: var(--clay); }
.btn.danger:hover { background: #b74f2c; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

input, select {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus-visible, select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field { margin-bottom: 16px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand h1 { font-size: 22px; }
.brand span { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--ink-soft); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}
.badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--clay-soft);
  color: var(--clay);
}
.badge.club { background: #e7edda; color: var(--green); }

.court-mark {
  position: absolute;
  right: -60px;
  top: -40px;
  width: 420px;
  height: 260px;
  opacity: 0.08;
  pointer-events: none;
}

.login-wrap {
  min-height: calc(100vh - 0px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.login-card h1 { font-size: 28px; margin-bottom: 4px; }
.login-card .eyebrow { margin-bottom: 10px; display: block; }
.login-error {
  background: var(--clay-soft);
  color: #8f3d1f;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.login-error.show { display: block; }

.portal { max-width: 960px; margin: 0 auto; padding: 40px 28px; }
.portal h2 { font-size: 26px; margin-bottom: 6px; }
.portal .eyebrow { margin-bottom: 24px; display: block; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.tool-card:hover { border-color: var(--green); transform: translateY(-2px); }
.tool-card:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.tool-card .mark {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.tool-card .mark svg { width: 18px; height: 18px; stroke: #fff; }
.tool-card h3 { font-size: 19px; }
.tool-card p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.loading { color: var(--ink-soft); font-size: 14px; padding: 40px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
}
