/* BNI Theme Colors */
.bni-red { color: #CC0000; }
.bg-bni { background-color: #CC0000; color: white; }
.bni-separator { border-top: 3px solid #CC0000; margin: 0; }

/* Buttons */
.btn-bni {
  border: 2px solid #CC0000;
  color: #CC0000;
  background: white;
  padding: 0.375rem 1rem;
  font-weight: 500;
}
.btn-bni:hover { background: #CC0000; color: white; }
.btn-bni-solid {
  background: #CC0000;
  color: white;
  border: 2px solid #CC0000;
  padding: 0.375rem 1rem;
  font-weight: 500;
}
.btn-bni-solid:hover { background: #a00000; color: white; border-color: #a00000; }

/* Dashboard stat cards */
.stat-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  background: white;
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #CC0000;
}

/* Table with BNI header */
.table-bni thead { background-color: #CC0000; color: white; }
.table-bni thead th { background-color: #CC0000; color: white; border: none; }

/* Auth cards */
.auth-card {
  max-width: 480px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background: white;
}

/* Grid styles - 9x9 mandala grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 2px;
  max-width: 900px;
  margin: 0 auto;
  background: #dee2e6;
  border: 2px solid #CC0000;
  border-radius: 0.5rem;
  overflow: hidden;
}

.grid-cell {
  background: white;
  padding: 6px;
  text-align: center;
  font-size: 0.75rem;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  word-break: break-word;
  line-height: 1.2;
}
.grid-cell:hover { background: #fff5f5; }

.grid-cell.center-cell {
  background: #CC0000;
  color: white;
  font-weight: bold;
  font-size: 0.85rem;
}
.grid-cell.inner-cell {
  background: #ffe6e6;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid #CC0000;
}
.grid-cell.inner-repeat {
  background: #ffe6e6;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid #CC0000;
}
.grid-cell.outer-cell {
  background: white;
}

/* Block separators - thicker lines between 3x3 blocks */
.grid-cell.block-right { border-right: 2px solid #CC0000; }
.grid-cell.block-bottom { border-bottom: 2px solid #CC0000; }

/* Grid cell editing */
.grid-cell input {
  width: 100%;
  border: 1px solid #CC0000;
  border-radius: 3px;
  text-align: center;
  font-size: 0.75rem;
  padding: 2px;
}

/* Badge styles */
.badge-dna { background: #CC0000; color: white; }
.badge-gold { background: #FFD700; color: #333; }
.badge-green { background: #28a745; color: white; }

/* Browse grid cards */
.member-grid-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s;
}
.member-grid-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Usage stats box in header */
.usage-stats {
  border: 1px solid #dee2e6;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Match result cards */
.match-card {
  border-left: 4px solid #CC0000;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  background: #fafafa;
  border-radius: 0 0.5rem 0.5rem 0;
}
.match-card.power-team { border-left-color: #28a745; }
.match-card.they-on-mine { border-left-color: #0d6efd; }

/* Loading spinner */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.spinner-bni {
  width: 3rem;
  height: 3rem;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #CC0000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .grid-cell { font-size: 0.6rem; min-height: 50px; padding: 3px; }
  .stat-number { font-size: 1.8rem; }
  h1 { font-size: 1.3rem; }
}
