:root {
  --green:     #1b5e20;
  --green-mid: #2e7d32;
  --green-lt:  #e8f5e9;
  --accent:    #4caf50;
  --text:      #212121;
  --muted:     #757575;
  --border:    #e0e0e0;
  --bg:        #f5f5f5;
  --white:     #ffffff;
  --danger:    #c62828;
  --warn:      #f57f17;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  background: var(--green);
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.site-header .brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #fff;
  text-decoration: none;
}
.site-header nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
  transition: color .15s;
}
.site-header nav a:hover { color: #fff; }

/* ── Layout ── */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 16px;
}

/* ── Card ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  background: var(--green);
  color: #fff;
  padding: 18px 24px;
}
.card-header h2 { font-size: 17px; font-weight: 600; }
.card-header p  { font-size: 13px; opacity: .8; margin-top: 3px; }
.card-body { padding: 24px; }

/* ── Mecz / game header ── */
.game-card { margin-bottom: 32px; }
.game-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Sektory / sectors grid ── */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.sector-tile {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sector-tile:hover:not(.sold-out) {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(76,175,80,.18);
}
.sector-tile.sold-out {
  opacity: .55;
  cursor: not-allowed;
}
.sector-tile .sector-name { font-size: 16px; font-weight: 700; }
.sector-tile .sector-entry { font-size: 12px; color: var(--muted); }
.sector-tile .sector-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--green-mid);
  margin-top: 4px;
}
.sector-tile .sector-price-reduced { font-size: 13px; color: var(--muted); }

/* ── Availability bar ── */
.avail-bar-wrap { background: #eee; border-radius: 4px; height: 5px; margin-top: 6px; }
.avail-bar      { height: 5px; border-radius: 4px; transition: width .3s; }
.avail-ok       { background: var(--accent); }
.avail-warn     { background: #ff9800; }
.avail-danger   { background: #f44336; }
.avail-text     { font-size: 11px; color: var(--muted); margin-top: 3px; }
.badge-sold-out {
  display: inline-block;
  background: #eee;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* ── Formularz ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group label .hint {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
  appearance: auto;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76,175,80,.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--green-mid);
  color: #fff;
  box-shadow: 0 2px 8px rgba(46,125,50,.3);
}
.btn-primary:hover { background: var(--green); }
.btn-secondary {
  background: #fff;
  color: var(--green-mid);
  border: 2px solid var(--green-mid);
}
.btn-secondary:hover { background: var(--green-lt); }
.btn-full { width: 100%; }

/* ── Order summary box ── */
.order-summary {
  background: var(--green-lt);
  border: 1.5px solid #c8e6c9;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
  font-size: 14px;
}
.order-summary h3 { font-size: 15px; margin-bottom: 10px; color: var(--green); }
.order-summary .row { display: flex; justify-content: space-between; padding: 4px 0; }
.order-summary .total {
  border-top: 1px solid #c8e6c9;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 17px;
  font-weight: 700;
}

/* ── Alert messages ── */
.alert {
  border-radius: 7px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-success { background: var(--green-lt); border-left: 4px solid var(--accent);  color: var(--green); }
.alert-error   { background: #ffebee;          border-left: 4px solid var(--danger);  color: var(--danger); }
.alert-warn    { background: #fff8e1;           border-left: 4px solid var(--warn);    color: #5d4037; }
.alert-info    { background: #e3f2fd;           border-left: 4px solid #1976d2;        color: #0d47a1; }

/* ── Thank-you page ── */
.status-icon { font-size: 56px; text-align: center; margin-bottom: 16px; }
.order-id-box {
  background: #f5f5f5;
  border-radius: 7px;
  padding: 14px 18px;
  text-align: center;
  margin: 16px 0;
}
.order-id-box .label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.order-id-box .value { font-size: 22px; font-weight: 700; font-family: monospace; letter-spacing: 1px; }

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .sectors-grid { grid-template-columns: 1fr; }
  .form-row     { grid-template-columns: 1fr; }
  .site-header  { padding: 0 14px; }
  .card-body    { padding: 16px; }
}
