@font-face {
  font-family: 'LidlFontCondPro';
  src: url('/fonts/LidlFontCondPro-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LidlFontCondPro';
  src: url('/fonts/LidlFontCondPro-Semibold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LidlFontCondPro';
  src: url('/fonts/LidlFontCondPro-Bold.woff2') format('woff2');
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --lidl-blue: #0050aa;
  --lidl-yellow: #fff000;
  --lidl-red: #e30613;
  --ink: #111827;
  --muted: #5b6575;
  --surface: #ffffff;
  --line: #d7dce5;
  --bg: #f2f5f9;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: 'LidlFontCondPro', Arial, Helvetica, sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 240, 0, 0.92), rgba(255, 240, 0, 0.78) 35%, rgba(0, 80, 170, 0.16) 35%),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--lidl-red);
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

select,
input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

.admin-shell,
.admin-login-shell {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.public-shell {
  width: min(100% - 16px, 540px);
  margin: 0 auto;
  padding: 10px 0 calc(24px + env(safe-area-inset-bottom));
}

.hero {
  padding: 12px 0 14px;
}

.sponsor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border: 3px solid var(--lidl-blue);
  border-radius: 6px;
  color: var(--lidl-blue);
  background: var(--lidl-yellow);
  font-weight: 800;
}

.sponsor-badge strong {
  padding: 4px 7px;
  color: var(--lidl-yellow);
  background: var(--lidl-blue);
  text-transform: uppercase;
}

.sponsor-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 7px 10px;
  border: 3px solid var(--lidl-blue);
  border-radius: 8px;
  color: var(--lidl-blue);
  background: #fff;
  font-weight: 900;
}

.sponsor-lockup img {
  width: 44px;
  height: 44px;
  display: block;
}

.eyebrow {
  margin: 14px 0 5px;
  color: var(--lidl-blue);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 460px;
  color: var(--lidl-blue);
  font-size: 2.3rem;
  line-height: 1;
}

h2 {
  font-size: 1.3rem;
}

.lead {
  max-width: 480px;
  margin: 10px 0 0;
  color: #1c2a3d;
  font-size: 1.08rem;
  line-height: 1.45;
}

.notice {
  margin: 0 0 18px;
  border-radius: 6px;
  padding: 13px 14px;
  font-weight: 700;
}

.notice-success {
  border: 2px solid #157347;
  background: #e7f7ef;
  color: #0c4f2e;
}

.notice-error {
  border: 2px solid var(--lidl-red);
  background: #fff0f1;
  color: #8f0710;
}

.current-vote {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  border: 2px solid #157347;
  border-radius: 8px;
  padding: 10px 12px;
  color: #0c4f2e;
  background: #e7f7ef;
  font-weight: 900;
}

.current-vote-label {
  color: #157347;
  font-size: 0.86rem;
}

.current-vote-choice {
  font-size: 1.1rem;
}

.current-vote-deadline {
  font-size: 0.88rem;
  font-weight: 700;
}

.vote-form {
  display: grid;
  gap: 12px;
}

.panel,
.login-card {
  border: 3px solid var(--lidl-blue);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
}

.public-shell .panel {
  padding: 12px;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.division-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.division-section + .division-section {
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.division-heading {
  display: grid;
  gap: 4px;
}

.division-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.group-panel {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.group-panel h3,
.ranking-block h3 {
  margin: 0;
  color: var(--lidl-blue);
  font-size: 1.05rem;
}

.team-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 120px;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px 10px 46px;
  background: #fff;
  font-weight: 800;
}

.team-card input {
  position: absolute;
  left: 14px;
  width: 20px;
  min-height: 20px;
}

.team-card:has(input:checked) {
  border-color: var(--lidl-red);
  outline: 3px solid rgba(227, 6, 19, 0.22);
}

.team-logo-slot,
.team-admin-logo {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--lidl-blue);
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 900;
}

.team-logo-slot:empty {
  display: none;
}

.team-logo-slot img,
.team-admin-logo img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 30px);
  max-height: calc(100% - 30px);
  object-fit: contain;
  object-position: center;
}

.team-card > span:last-child {
  min-width: 0;
  line-height: 1.15;
}

.vote-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: end;
  gap: 10px;
}

.vote-panel label {
  grid-column: 1 / -1;
  font-weight: 900;
}

.public-shell .vote-panel {
  margin: 0;
  padding: 12px;
}

.public-shell .vote-panel label {
  font-size: 0.86rem;
}

.public-shell .vote-panel select,
.public-shell .vote-panel button {
  min-height: 52px;
}

.public-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  padding: 16px 0 0;
  color: #1c2a3d;
  font-size: 0.92rem;
  font-weight: 800;
}

.public-footer a {
  color: var(--lidl-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.admin-login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-card {
  display: grid;
  width: min(430px, 100%);
  gap: 14px;
}

.login-card h1 {
  font-size: 2.2rem;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-header h1 {
  font-size: 3rem;
}

.button-secondary {
  min-width: 120px;
  color: var(--lidl-blue);
  background: var(--lidl-yellow);
  border: 2px solid var(--lidl-blue);
}

.admin-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border: 2px solid var(--lidl-blue);
  border-radius: 6px;
  color: var(--lidl-blue);
  background: #fff;
  font-weight: 900;
  text-decoration: none;
}

.admin-nav a[aria-current='page'] {
  color: #fff;
  background: var(--lidl-blue);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  border: 3px solid var(--lidl-blue);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.stat span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.stat strong {
  display: block;
  margin-top: 4px;
  color: var(--lidl-red);
  font-size: 2rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: #fff;
}

.admin-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.team-admin-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.settings-panel + .settings-panel {
  margin-top: 18px;
}

.settings-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.settings-form label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}

.danger-panel {
  border-color: var(--lidl-red);
}

.danger-panel button {
  background: var(--lidl-red);
}

.team-admin-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.team-admin-logo {
  width: 64px;
  height: 64px;
}

.team-admin-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.team-admin-fields label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}

.checkbox-label {
  grid-template-columns: 20px 1fr;
  align-items: center;
  min-height: 48px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #fff;
  background: var(--lidl-blue);
}

.ranking-block + .ranking-block {
  margin-top: 18px;
}

.empty-state {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 640px) {
  .admin-shell,
  .admin-login-shell {
    width: min(100% - 20px, 1100px);
    padding-top: 14px;
  }

  .public-shell {
    width: min(100% - 12px, 540px);
    padding-top: 8px;
  }

  h1 {
    font-size: 2.1rem;
  }

  .lead {
    font-size: 1rem;
  }

  .public-shell h2 {
    font-size: 1.15rem;
  }

  .division-heading p {
    font-size: 0.9rem;
  }

  .public-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-header h1 {
    font-size: 2.4rem;
  }

  .admin-nav,
  .admin-nav form,
  .admin-nav button,
  .admin-nav a {
    width: 100%;
  }

  .admin-nav a {
    justify-content: center;
  }

  .team-admin-row,
  .team-admin-fields,
  .settings-form {
    grid-template-columns: 1fr;
  }

  .team-admin-logo {
    width: 80px;
    height: 80px;
  }
}
