:root {
  --bg: #0f1419;
  --panel: #1a212b;
  --panel-2: #222c38;
  --border: #2c3845;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #2dd4bf;
  --accent-dim: #14776e;
  --green: #34d399;
  --red: #f87171;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Heebo", "Segoe UI", Arial, sans-serif;
  direction: rtl; line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.topbar {
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 14px 20px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.topbar .brand { font-weight: 700; font-size: 17px; color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar nav a { color: var(--muted); font-weight: 500; }
.topbar nav a:hover { color: var(--text); }

main { max-width: 760px; margin: 0 auto; padding: 22px 16px 70px; }
h1 { font-size: 23px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 14px; color: var(--accent); }
.sub { color: var(--muted); margin: 0 0 18px; }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; margin-bottom: 18px;
}

/* flashes */
.flash { padding: 12px 16px; border-radius: 9px; margin-bottom: 16px; font-weight: 500; }
.flash ul { margin: 8px 0 0; padding-inline-start: 20px; }
.flash.ok    { background: #0f3d33; color: #6ee7b7; border: 1px solid #155e4f; }
.flash.warn  { background: #3d340f; color: #fcd34d; border: 1px solid #5e4d15; }
.flash.error { background: #3d1212; color: #fca5a5; border: 1px solid #5e1d1d; }

/* forms */
label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=number], input[type=date], input[type=time],
input[type=password], select {
  width: 100%; padding: 12px 13px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; font-size: 16px; font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 150px; margin-bottom: 14px; }

.btn { display: inline-block; background: var(--accent); color: #06302b; font-weight: 700;
  padding: 12px 22px; border: none; border-radius: 9px; cursor: pointer; font-size: 16px;
  font-family: inherit; text-align: center; }
.btn:hover { background: #5eead4; text-decoration: none; }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: #2b3645; }
.btn.export { background: #1d3a36; color: var(--accent); border: 1px solid var(--accent-dim); }
.btn.danger { background: #3d1212; color: #fca5a5; border: 1px solid #7a1c1c; }
.btn.danger:hover { background: #4d1717; }
.submit-btn { width: 100%; padding: 15px; font-size: 17px; margin-top: 4px; }

/* events (dynamic rows) */
.event-row {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 11px;
  padding: 14px; margin-bottom: 12px;
}
.event-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.event-fields > div { flex: 1; min-width: 130px; }
.btn-remove {
  margin-top: 10px; background: transparent; color: var(--red); border: 1px solid #5e1d1d;
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-family: inherit; font-size: 14px;
}
.btn-remove:hover { background: #3d1212; }

/* thanks / login centered */
.center-panel { text-align: center; padding: 40px 22px; }
.center-panel.narrow { max-width: 380px; margin: 30px auto; text-align: right; }
.center-panel.narrow h1 { text-align: center; }
.big-check {
  width: 72px; height: 72px; line-height: 72px; margin: 0 auto 14px; border-radius: 50%;
  background: #0f3d33; color: #6ee7b7; font-size: 38px; font-weight: 700;
}

/* admin filters */
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filters > div { flex: 1; min-width: 150px; }
.filter-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tbody tr:hover { background: var(--panel-2); }
td.num, th.num { font-variant-numeric: tabular-nums; }
tr.total-row td { font-weight: 700; border-top: 2px solid var(--accent-dim); background: var(--panel-2); }
.club-name { font-weight: 600; }
.muted { color: var(--muted); }

/* key-value grid (detail) */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.kv { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.kv span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.kv b { font-size: 18px; }
