body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.login-page {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.navbar-brand { font-size: 1.1rem; letter-spacing: 0.5px; }

.card { border-radius: 10px; }
.card-header {
  border-radius: 10px 10px 0 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.nav-tabs .nav-link         { color: #495057; font-weight: 500; }
.nav-tabs .nav-link.active  { color: #212529; font-weight: 600; }

.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.badge           { font-weight: 500; }
.btn-warning     { color: #212529; }
.input-group-text { background-color: #f8f9fa; }
.alert           { border-radius: 8px; }

/* ── Step badge ──────────────────────────────────────────────── */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffc107;
  color: #212529;
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 8px;
}

/* ── Number picker ───────────────────────────────────────────── */
.number-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.num-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.12s ease;
  user-select: none;
  line-height: 1;
  padding: 0;
}

.num-ball:hover:not(.at-max) {
  border-color: #ffc107;
  background: #fff9e6;
  transform: scale(1.08);
}

.num-ball.selected-main {
  background: #ffc107;
  border-color: #e0a800;
  color: #212529;
  box-shadow: 0 2px 8px rgba(255,193,7,.5);
  transform: scale(1.05);
}

.num-ball.selected-extra {
  background: #fd7e14;
  border-color: #dc6a0e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(253,126,20,.5);
  transform: scale(1.05);
}

.num-ball.at-max {
  opacity: 0.28;
  cursor: not-allowed;
}

.picker-counter {
  font-size: 0.85rem;
  color: #6c757d;
  background: #f8f9fa;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Display balls (dashboard modal) ─────────────────────────── */
.ball-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.ball-main {
  background: #ffc107;
  color: #212529;
  border-color: #e0a800;
}

.ball-extra {
  background: #fd7e14;
  color: #fff;
  border-color: #dc6a0e;
}

.ball-win {
  background: #e9ecef;
  color: #212529;
  border-color: #ced4da;
}

.ball-win-extra {
  background: #dee2e6;
  color: #212529;
  border-color: #ced4da;
}

.ball-display.ball-hit {
  background: #198754 !important;
  color: #fff !important;
  border-color: #198754 !important;
  box-shadow: 0 0 0 3px rgba(25,135,84,.35);
}

/* ── Upload area ─────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 10px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: #ffc107;
  background: #fff9e6;
}

/* ── Attachment thumbnail ─────────────────────────────────────── */
.attachment-thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.15s;
}
.attachment-thumb:hover { transform: scale(1.06); }

/* ── Superbingo grid (input) ─────────────────────────────────── */
.sb-grid-input {
  display: grid;
  grid-template-columns: repeat(5, 54px);
  gap: 5px;
}

.sb-cell {
  width: 54px;
  height: 54px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  background: #fff;
  padding: 0;
  transition: border-color 0.15s;
}
.sb-cell.frame-cell  { background: #e8f0fe; border-color: #9db8fb; }
.sb-cell.center-cell { background: #fff8e1; border-color: #ffc107; }
.sb-cell:focus { outline: none; border-color: #0d6efd; box-shadow: 0 0 0 3px rgba(13,110,253,.2); }
.sb-cell.filled { border-color: #198754; }

/* ── Superbingo grid (display in modal) ──────────────────────── */
.sb-display-grid {
  display: grid;
  grid-template-columns: repeat(5, 50px);
  gap: 4px;
}

.sb-display-cell {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 2px solid #dee2e6;
}
.sb-display-cell.frame  { background: #e8f0fe; border-color: #9db8fb; color: #1a56db; }
.sb-display-cell.center { background: #fff8e1; border-color: #ffc107; color: #856404; }
.sb-display-cell.matched {
  background: #198754 !important;
  color: #fff !important;
  border-color: #198754 !important;
  box-shadow: 0 0 0 3px rgba(25,135,84,.3);
}

.sb-display-cell.matched-center {
  background: #ffc107 !important;
  color: #212529 !important;
  border-color: #e0a800 !important;
}

.sb-display-cell.matched-frame {
  background: #0d6efd !important;
  color: #fff !important;
  border-color: #0a58ca !important;
}

.sb-legend {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 4px;
  border: 2px solid;
  vertical-align: middle;
}
.sb-legend.frame  { background: #e8f0fe; border-color: #9db8fb; }
.sb-legend.center { background: #fff8e1; border-color: #ffc107; }

/* Joker input cell */
.sb-cell.joker-cell {
  background: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
  font-size: 1.1rem;
}

/* Joker display — tikai teksts krāsojas, fons paliek bāzes stils */
.sb-display-cell.joker-center-partial { color: #856404 !important; font-weight: 900; font-size: 1.1rem; }
.sb-display-cell.joker-frame-partial  { color: #0a58ca !important; font-weight: 900; font-size: 1.1rem; }
.sb-display-cell.joker-complete       { color: #198754 !important; border-color: #198754 !important; font-weight: 900; font-size: 1.1rem; }
