/* Light blue background, black bold text, red accents */
:root {
  --bg: #d6ebf7;
  --bg-gradient-top: #e7f4fb;
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.75);
  --accent: #c1121f;
  --accent-dark: #9b0e18;
  --panel: rgba(255, 255, 255, 0.78);
  --border: #c1121f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.4), transparent 40%),
    linear-gradient(180deg, rgba(231, 244, 251, 0.65) 0%, rgba(214, 235, 247, 0.65) 45%, rgba(207, 230, 244, 0.65) 100%),
    url('/static/pickleball-bg.png');
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: top left, center, top left;
  background-size: auto, auto, 512px 512px;
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
}

a {
  color: var(--accent);
}

.container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

h1,
h2,
h3 {
  font-weight: 800;
  color: var(--text);
}

.accent-rule {
  height: 3px;
  width: 100%;
  background: var(--accent);
  border: none;
  margin: 1rem 0;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.muted {
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 700;
}

label span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.35rem;
  font: inherit;
  font-weight: 600;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

input[disabled] {
  background: #f3f3f3;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 0.35rem;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: #000;
}

.btn-secondary:hover {
  background: #000;
  color: #fff;
}

.btn-secondary.is-active,
.btn-primary.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.flash-wrap {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 0.35rem;
  border: 2px solid var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.flash.success {
  background: #fff;
  color: var(--text);
}

.flash.error,
.flash.warning {
  background: rgba(193, 18, 31, 0.08);
  color: var(--accent-dark);
}

.home-choices {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .home-choices {
    grid-template-columns: 1fr 1fr;
  }
}

.choice-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 11rem;
  padding: 1.5rem;
  text-align: center;
  background: var(--panel);
  border: 4px solid var(--accent);
  border-radius: 0.75rem;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
}

.choice-card:hover {
  background: #fff;
}

.dashboard-list {
  display: grid;
  gap: 1rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.center-head {
  text-align: center;
  margin-bottom: 2rem;
}

.center-head .accent-rule {
  max-width: 8rem;
  margin-left: auto;
  margin-right: auto;
}

.brand-tag {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 800;
}

.manage-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .manage-header {
    grid-template-columns: minmax(8rem, 11rem) 1fr;
    align-items: start;
  }
}

.manage-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.manage-listbox {
  min-height: 8rem;
  max-height: 12rem;
  overflow-y: auto;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.35rem;
  background: #fff;
  padding: 0.35rem;
}

.manage-item {
  padding: 0.45rem 0.6rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
}

.manage-item:hover {
  background: rgba(193, 18, 31, 0.08);
}

.manage-item.is-selected {
  background: var(--accent);
  color: #fff;
}

.manage-empty {
  padding: 0.6rem;
  margin: 0;
  font-size: 0.9rem;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-small {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

button.btn:disabled,
button.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

button.btn:disabled:hover,
button.btn[disabled]:hover {
  background: transparent;
  color: var(--text);
}

button.btn-primary:disabled:hover,
button.btn-primary[disabled]:hover {
  background: var(--accent);
  color: #fff;
}

.dashboard-list .panel h2 {
  margin-top: 0;
}

.inline-create {
  margin: -0.35rem 0 1rem;
  padding: 0.75rem;
  border: 2px dashed rgba(193, 18, 31, 0.35);
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.65);
}

.inline-create label {
  margin-bottom: 0.65rem;
}

.inline-create .btn {
  margin-top: 0.15rem;
}
