:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #1f2933;
  --muted: #687586;
  --line: #d9e0e7;
  --accent: #1769aa;
  --accent-strong: #0f4f82;
  --sidebar: #18222f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  background: var(--sidebar);
  color: white;
  padding: 24px 18px;
}

.brand {
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 28px;
}

nav {
  display: grid;
  gap: 8px;
}

nav a,
nav button {
  width: 100%;
  display: block;
  color: #dce7f1;
  background: transparent;
  border: 0;
  text-align: left;
  font: inherit;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
}

nav a:hover,
nav button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.main {
  padding: 28px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

h2 {
  font-size: 18px;
}

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

.panel,
.login-panel,
.round-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.panel {
  overflow: hidden;
  margin-bottom: 18px;
}

.login-panel {
  max-width: 420px;
  padding: 24px;
}

.round-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.round-card {
  padding: 18px;
}

.session-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-head {
  padding: 14px 16px 0;
}

.session-links a,
.button,
button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

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

.danger {
  background: #b42318;
  border-color: #b42318;
  color: white;
}

.danger:hover {
  background: #8f1d14;
}

.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #eef2f6;
  color: #354252;
  font-size: 13px;
}

tr:last-child td {
  border-bottom: 0;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

input,
select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
  background: white;
}

.inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
}

.check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  color: var(--ink);
}

.sort-input {
  width: 82px;
}

.place-input {
  width: 82px;
}

.notice {
  padding: 12px 14px;
  border: 1px solid #badbcc;
  background: #e6f4ea;
  color: #155724;
  border-radius: 8px;
  margin-bottom: 16px;
}

@media (max-width: 780px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .main {
    padding: 18px;
  }

  .page-head {
    display: grid;
  }

  .panel {
    overflow-x: auto;
  }
}
