/* Organizer panel. Legacy variable NAMES (--bg, --panel, --ink, --muted, --line,
   --pitch, --sans) are kept so every content page not yet rewritten with bundle.css
   classes (tournaments.php, venues.php, team.php, match.php, announcements.php,
   sponsors.php) repaints with the real Saha palette/typography (loaded from
   tokens.css/bundle.css in layout.php) without a markup change — the same alias
   strategy used in apps/web/src/app/globals.css. */
:root {
  --bg: var(--night-000);
  --panel: var(--night-100);
  --muted: var(--ink-muted);
  --pitch: var(--gold);
  --danger: var(--loss);
  --ok: var(--win);
  --sans: var(--font-sans);
  /* --ink and --line are already named exactly like their Saha counterparts (tokens.css
     :root / [data-theme]), so no alias is needed for them. */
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
}
h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}
h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
}
h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 18px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
a {
  color: var(--pitch);
}
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 16px 48px;
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: auto;
  height: 24px;
}
.nav {
  display: flex;
  gap: 14px;
  align-items: center;
}
.muted {
  color: var(--muted);
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.narrow {
  max-width: 420px;
  margin: 40px auto;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.list .card {
  margin-bottom: 10px;
}
.plain {
  list-style: none;
  padding: 0;
  margin: 0;
}
.plain li {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.plain li:first-child {
  border-top: 0;
}
.fixture {
  display: flex;
  gap: 10px;
  align-items: center;
}
a.fixture {
  color: inherit;
  text-decoration: none;
  padding: 8px 0;
}
a.fixture:hover span:not(.muted) {
  text-decoration: underline;
}
.check {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
}
.code {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--muted);
  display: inline-block;
  min-width: 42px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}
input,
select {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--night-000);
  color: var(--ink);
}
input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
button,
.button {
  font: 600 14px var(--sans);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--pitch);
}
.inline {
  display: inline;
  margin: 0;
}
.flash {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.flash-success {
  border-color: var(--ok);
  color: var(--ok);
}
.flash-error {
  border-color: var(--danger);
  color: var(--danger);
}
@media (max-width: 460px) {
  .row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- App shell (SidebarNav, README "Organizatör paneli sırası") ---------- */
.sa-sidenav-shell {
  display: flex;
  min-height: 100vh;
}
.sa-sidenav-shell__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sa-sidenav-shell__bar {
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.sa-sidenav-shell__main .wrap {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0;
  padding: var(--space-6) var(--space-6) var(--space-16);
}
.sa-sidenav-shell__main .flash {
  margin: var(--space-4) var(--space-6) 0;
}
@media (max-width: 760px) {
  .sa-sidenav-shell {
    flex-direction: column;
  }
  .sa-sidenav {
    width: 100%;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }
  .sa-sidenav__list {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
  }
}

/* ---------- Auth shell (login, organization-select — no organization context yet) ---------- */
.authshell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-4);
}
.authshell__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 18px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.authshell__brand img {
  width: auto;
  height: 32px;
}
.authshell__card {
  width: 100%;
}
.authshell .flash {
  width: 100%;
  max-width: 420px;
}

/* Organization picker list (OrganizationSelectPage, multi-organization sign-in). */
.sa-orglist {
  margin: 0;
}
.sa-orglist__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--night-100);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sa-orglist__btn:hover {
  background: var(--night-200);
  border-color: var(--line-strong);
}
.sa-orglist__name {
  font-family: var(--font-display);
  font-weight: 700;
}
