:root {
  --bg: #120a3e;
  --bg2: #1a1152;
  --panel: #211b63;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #ffc83d;
  --gold-deep: #f0a500;
  --text: #f4f1ff;
  --muted: #b9b0e6;
  --green: #22c55e;
  --red: #e53935;
  --radius: 16px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(160deg, var(--bg2), var(--bg));
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.error {
  color: #ff8a80;
}

/* the KELİMO tiles */
.brand {
  display: flex;
  gap: 4px;
  padding: 18px 16px;
}
.brand .t {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-weight: 900;
  color: #1a0e00;
}
.brand.big {
  justify-content: center;
  padding: 0 0 12px;
}
.brand.big .t {
  width: 44px;
  height: 44px;
  font-size: 22px;
  border-radius: 10px;
}
.t.g {
  background: #22c55e;
}
.t.a {
  background: #f5b400;
}
.t.s {
  background: #6b6f88;
  color: #fff;
}
.t.r {
  background: #e53935;
  color: #fff;
}

/* sign-in */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid rgba(255, 200, 61, 0.4);
  border-radius: 22px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.login-card h1 {
  margin: 4px 0 6px;
  font-size: 22px;
}
#google-button {
  display: flex;
  justify-content: center;
  margin: 18px 0 8px;
}

/* layout */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.side {
  background: rgba(10, 6, 40, 0.55);
  border-right: 1px solid var(--line);
}
nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}
nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}
nav a.on {
  background: rgba(255, 200, 61, 0.12);
  border-left-color: var(--gold);
  color: var(--gold);
  font-weight: 700;
}
nav a.soon {
  color: var(--muted);
  opacity: 0.6;
}
nav .group {
  padding: 16px 18px 6px;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--gold);
  font-weight: 800;
}
.main {
  min-width: 0;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.game-pick {
  display: flex;
  align-items: center;
  gap: 8px;
}
.who {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page {
  padding: 24px;
  max-width: 980px;
}
.page h2 {
  margin: 0 0 4px;
  font-size: 24px;
}
.page > p.lead {
  margin: 0 0 20px;
  color: var(--muted);
}

/* cards and forms */
.card {
  background: var(--panel);
  border: 1px solid rgba(255, 200, 61, 0.28);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.card .desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13.5px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field label {
  font-weight: 700;
  font-size: 14px;
}
.field small {
  color: var(--muted);
  font-size: 12px;
}
input[type='number'],
input[type='text'],
select,
textarea {
  background: #140d48;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 0;
}
textarea {
  width: 100%;
  min-height: 160px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
}
.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.switch input {
  width: 42px;
  height: 24px;
  appearance: none;
  background: #3a3470;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
.switch input:checked {
  background: var(--green);
}
.switch input:checked::after {
  left: 21px;
}
.hours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hours label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.hours input {
  display: none;
}
.hours label.on {
  background: var(--gold);
  color: #1a0e00;
  font-weight: 800;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(var(--gold), var(--gold-deep));
  color: #1a0e00;
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}
.changed {
  color: var(--gold);
  font-size: 13px;
}
details summary {
  cursor: pointer;
  color: var(--muted);
  margin-top: 14px;
}

/* tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th,
td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.8px;
}
td code {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.soon-page {
  text-align: center;
  padding: 50px 20px;
}
.soon-page .big {
  font-size: 42px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #1a0e00;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.toast.bad {
  background: #ffcdd2;
}

/* phones */
@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  nav {
    display: flex;
    overflow-x: auto;
  }
  nav .group {
    display: none;
  }
  nav a {
    white-space: nowrap;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }
  nav a.on {
    border-bottom-color: var(--gold);
  }
  .page,
  .top {
    padding: 14px 16px;
  }
}
