:root {
  --bg: #f4f7f9;
  --fg: #1f2933;
  --accent: #006d77;
  --panel: #ffffff;
  --error: #b00020;
  --ok: #1b7f3b;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--fg);
  background: linear-gradient(140deg, #e6f4f1, var(--bg));
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
}

.panel {
  background: var(--panel);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

h1 a {
  color: var(--accent);
  text-decoration: none;
}

form {
  display: grid;
  gap: 0.5rem;
}

.inline-form {
  display: inline-block;
}

input,
button {
  padding: 0.55rem;
  font-size: 1rem;
}

button,
.button-like {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  display: inline-block;
}

.button-like.secondary {
  background: #5d6a74;
}

.button-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.checkbox-row {
  display: block;
  margin-bottom: 0.35rem;
}

.sound-settings-form {
  margin-bottom: 0.6rem;
}

.actions {
  white-space: nowrap;
}

.danger {
  background: #a4161a;
}

.hidden {
  display: none;
}

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

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

.warning-box {
  border: 1px solid #d5a100;
  background: #fff7df;
  border-radius: 10px;
  padding: 0.7rem;
  margin-bottom: 0.7rem;
}

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

th,
td {
  border-bottom: 1px solid #e0e6ed;
  padding: 0.45rem;
  text-align: left;
  vertical-align: top;
}

#hotseat-timer {
  font-weight: bold;
}

#hotseat-mc-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.mc-option-btn {
  width: 100%;
}

#quiz-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 640px) {
  #hotseat-mc-options {
    grid-template-columns: 1fr;
  }
  #quiz-options {
    grid-template-columns: 1fr;
  }
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}
.site-nav__user {
  font-weight: 600;
}
.site-nav .inline-form {
  display: inline;
  margin: 0;
}
.link-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}

.flash-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: grid;
  gap: 0.5rem;
}
.flash {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  background: var(--panel);
  border-left: 4px solid var(--accent);
}
.flash--danger { border-left-color: var(--error); }
.flash--success { border-left-color: var(--ok); }
.flash--info { border-left-color: var(--accent); }

.stacked-form {
  display: grid;
  gap: 0.75rem;
  max-width: 420px;
}
.stacked-form label {
  display: grid;
  gap: 0.25rem;
  font-weight: 500;
}
.stacked-form input[type="email"],
.stacked-form input[type="text"],
.stacked-form input[type="password"] {
  padding: 0.5rem;
  border: 1px solid #c7d0d8;
  border-radius: 6px;
  font: inherit;
}
.stacked-form .checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.field-error {
  color: var(--error);
  font-size: 0.85rem;
}
.primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  justify-self: start;
}
.primary:hover { filter: brightness(1.05); }

.admin-users {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}
.admin-users th,
.admin-users td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #e5ecf1;
  text-align: left;
  font-size: 0.95rem;
}
.admin-users__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.btn-small {
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.btn-small:hover { background: #e6f4f1; }
.btn-small--danger {
  border-color: var(--error);
  color: var(--error);
}
.btn-small--danger:hover { background: #ffe5ea; }
.badge {
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
}
.badge--ok { background: #d3f0dd; color: #0b5e2a; }
.badge--pending { background: #fde3c1; color: #8a4600; }
.badge--private { background: #eceff1; color: #455a64; }
.badge--public { background: #d0e8ff; color: #0b4c7f; }
.badge--shared { background: #e5d8f0; color: #512a7a; }
.share-option { display: block; margin: 0.2rem 0; }
