/* ── BORSA Sport Public CSS ─────────────────────────────────────────── */
:root {
  --bs-blue:        #003580;
  --bs-blue-light:  #0047AD;
  --bs-blue-pale:   #E8F0FB;
  --bs-yellow:      #F5C400;
  --bs-yellow-dark: #C49A00;
  --bs-yellow-pale: #FFFBE6;
  --bs-red:         #C0392B;
  --bs-red-pale:    #fde8e8;
  --bs-green:       #1e7e34;
  --bs-green-pale:  #d4edda;
  --bs-border:      #dee2e6;
  --bs-text:        #1a1a2e;
  --bs-muted:       #6c757d;
}

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

.bs-page-wrap { max-width: 480px; margin: 0 auto; padding: 16px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ── Logo banner ──────────────────────────────────────────────────── */
.bs-logo-banner { text-align: center; margin-bottom: 22px; }
.bs-logo-text { font-size: 24px; font-weight: 800; color: var(--bs-blue); letter-spacing: 1px; }
.bs-logo-text span { color: var(--bs-yellow-dark); }
.bs-logo-sub { font-size: 12px; color: var(--bs-muted); margin-top: 2px; }

/* ── Inputs & buttons ─────────────────────────────────────────────── */
.bs-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--bs-border);
  border-radius: 8px;
  font-size: 15px;
  margin-top: 4px;
  background: #fff;
  color: var(--bs-text);
  transition: border-color 0.15s;
}
.bs-input:focus { border-color: var(--bs-blue); outline: none; box-shadow: 0 0 0 3px rgba(0,53,128,0.08); }
.bs-input-sm { font-size: 13px; padding: 7px 10px; }

.bs-btn {
  display: inline-block;
  padding: 12px 20px;
  background: var(--bs-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.08s;
  text-align: center;
}
.bs-btn:hover   { background: var(--bs-blue-light); color: #fff; }
.bs-btn:active  { transform: scale(0.98); }
.bs-btn-full    { width: 100%; display: block; }
.bs-btn-outline { background: transparent; border: 1.5px solid var(--bs-blue); color: var(--bs-blue); }
.bs-btn-outline:hover { background: var(--bs-blue-pale); color: var(--bs-blue); }
.bs-btn-danger  { background: var(--bs-red); }
.bs-btn-danger:hover { background: #a93226; }
.bs-btn-xs      { display: inline-block; padding: 4px 10px; font-size: 12px; border-radius: 5px; background: var(--bs-blue-pale); color: var(--bs-blue); border: 1px solid #c5d8f4; cursor: pointer; text-decoration: none; font-weight: 500; }
.bs-btn-xs:hover { background: var(--bs-blue); color: #fff; }
.bs-btn-xs.bs-btn-danger { background: var(--bs-red-pale); color: var(--bs-red); border-color: #f5c6c6; }
.bs-btn-xs.bs-btn-danger:hover { background: var(--bs-red); color: #fff; }

.bs-field-label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 4px; margin-top: 12px; }

/* ── Notices ──────────────────────────────────────────────────────── */
.bs-notice { padding: 10px 14px; border-radius: 7px; font-size: 13px; margin-top: 10px; }
.bs-notice-error   { background: var(--bs-red-pale);   color: #721c24; border: 1px solid #f5c6c6; }
.bs-notice-success { background: var(--bs-green-pale); color: #155724; border: 1px solid #c3e6cb; }

/* ── Card search box ──────────────────────────────────────────────── */
.bs-card-search-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.bs-card-search-box {
  background: #fff;
  border: 1px solid var(--bs-border);
  border-radius: 14px;
  padding: 28px 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

/* ── ═══════════════════════════════════════════════════════════════ */
/*    DIGITAL CARD — the anti-fraud card                              */
/* ═══════════════════════════════════════════════════════════════════ */
.bs-digital-card {
  background: var(--bs-blue);
  border-radius: 18px;
  padding: 22px 20px 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,53,128,0.35);
  user-select: none;
}

/* Decorative circles */
.bs-digital-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(245,196,0,0.12);
  pointer-events: none;
}
.bs-digital-card::after {
  content: '';
  position: absolute;
  bottom: -50px; left: 20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(245,196,0,0.07);
  pointer-events: none;
}

/* Card header */
.bs-dc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

/* ── SPINNING BORSA LOGO (anti-screenshot) ── */
.bs-dc-logo-wrap {
  width: 44px; height: 44px;
  flex-shrink: 0;
  position: relative;
}
.bs-dc-logo-spin {
  width: 44px; height: 44px;
  animation: bs-spin 4s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes bs-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.bs-dc-brand-name {
  font-size: 14px; font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--bs-yellow);
}
.bs-dc-brand-sub { font-size: 11px; opacity: 0.7; }

.bs-dc-status-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 10px;
  letter-spacing: 0.5px;
}
.bs-dc-status-active   { background: rgba(30,126,52,0.3); color: #a6f5b8; border: 1px solid rgba(30,126,52,0.5); }
.bs-dc-status-revoked  { background: rgba(192,57,43,0.3);  color: #ffb3ae; border: 1px solid rgba(192,57,43,0.5); }
.bs-dc-status-inactive { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.2); }

/* Member info */
.bs-dc-member { margin-bottom: 14px; }
.bs-dc-name   { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; line-height: 1.2; }
.bs-dc-sport  { font-size: 12px; opacity: 0.65; margin-top: 2px; }

/* ID stripe */
.bs-dc-id-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.bs-dc-stripe   { flex: 1; height: 1px; background: rgba(245,196,0,0.3); }
.bs-dc-id       { font-family: 'Courier New', monospace; font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,0.85); }

/* Points bar */
.bs-dc-points-wrap  { margin-bottom: 16px; }
.bs-dc-points-label { display: flex; justify-content: space-between; font-size: 11px; opacity: 0.7; margin-bottom: 5px; }
.bs-dc-bar-track    { height: 6px; background: rgba(255,255,255,0.15); border-radius: 3px; overflow: hidden; }
.bs-dc-bar-fill     { height: 100%; background: var(--bs-yellow); border-radius: 3px; transition: width 0.8s ease; }
.bs-dc-bar-sub      { font-size: 10px; opacity: 0.55; margin-top: 4px; text-align: right; }

/* ── LIVE FOOTER (anti-fraud) ────────────────────────────────────── */
/*    The clock updates every second — a screenshot shows frozen time */
.bs-dc-live-footer {
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.bs-dc-live-indicator { display: flex; align-items: center; gap: 5px; }
.bs-dc-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bs-yellow);
  animation: bs-pulse 1.2s ease-in-out infinite;
}
@keyframes bs-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}
.bs-dc-live-label  { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--bs-yellow); }
.bs-dc-clock       { font-size: 18px; font-weight: 700; font-family: 'Courier New', monospace; letter-spacing: 2px; color: #fff; margin-left: auto; }
.bs-dc-date        { font-size: 11px; opacity: 0.6; font-family: 'Courier New', monospace; }
.bs-dc-validity    { font-size: 11px; opacity: 0.5; text-align: right; }

/* Revoked overlay */
.bs-dc-revoked {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.75);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
}
.bs-dc-revoked-box { text-align: center; padding: 20px; }
.bs-dc-revoked-icon { font-size: 36px; color: var(--bs-red); margin-bottom: 8px; }
.bs-dc-revoked-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.bs-dc-revoked-msg { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.5; }

/* ── Scan form ────────────────────────────────────────────────────── */
.bs-scan-venue-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bs-blue);
  border-radius: 10px;
  margin-bottom: 18px;
}
.bs-scan-venue-icon { font-size: 22px; color: var(--bs-yellow); }
.bs-scan-venue-name { font-size: 16px; font-weight: 700; color: #fff; }
.bs-scan-venue-address { font-size: 11px; color: rgba(255,255,255,0.6); }
.bs-scan-instruction { font-size: 13px; color: var(--bs-muted); margin-bottom: 4px; }

.bs-scan-success-box { background: #fff; border: 1px solid var(--bs-border); border-radius: 14px; padding: 28px 24px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.bs-scan-success-check { width: 52px; height: 52px; border-radius: 50%; background: var(--bs-green-pale); display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--bs-green); margin: 0 auto 12px; }
.bs-scan-success-title { font-size: 18px; font-weight: 700; color: var(--bs-text); margin-bottom: 4px; }
.bs-scan-success-sub   { font-size: 13px; color: var(--bs-muted); margin-bottom: 14px; }
.bs-scan-points-card   { background: var(--bs-yellow-pale); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.bs-scan-pts-label     { font-size: 12px; color: var(--bs-muted); }
.bs-scan-pts-val       { font-size: 36px; font-weight: 800; color: var(--bs-blue); line-height: 1.1; }
.bs-scan-pts-sub       { font-size: 12px; color: var(--bs-muted); margin-top: 2px; }

.bs-scan-unlocked {
  background: var(--bs-yellow-pale); border: 1.5px solid var(--bs-yellow);
  border-radius: 8px; padding: 10px 14px; margin-top: 10px;
  display: flex; align-items: center; gap: 8px; text-align: left;
  font-size: 13px; font-weight: 600; color: var(--bs-yellow-dark);
}
.bs-scan-unlocked-icon { font-size: 18px; flex-shrink: 0; }

.bs-scan-revoked-box {
  background: #fff; border: 1px solid var(--bs-border); border-radius: 14px; padding: 28px 24px; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
.bs-scan-revoked-icon  { font-size: 36px; color: var(--bs-red); margin-bottom: 8px; }
.bs-scan-revoked-title { font-size: 18px; font-weight: 700; color: var(--bs-red); margin-bottom: 6px; }
.bs-scan-revoked-msg   { font-size: 13px; color: var(--bs-muted); line-height: 1.5; }

/* ── Portal shared ────────────────────────────────────────────────── */
.bs-portal { max-width: 900px; }
.bs-portal-header {
  background: var(--bs-blue);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.bs-portal-title { font-size: 16px; font-weight: 700; color: #fff; flex: 1; }
.bs-portal-badge { display: inline-block; background: var(--bs-yellow); color: var(--bs-blue); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }
.bs-portal-user  { font-size: 12px; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 8px; }

.bs-portal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.bs-pstat { background: #fff; border: 1px solid var(--bs-border); border-radius: 10px; padding: 14px; text-align: center; }
.bs-pstat-yellow { background: var(--bs-yellow-pale); border-color: var(--bs-yellow); }
.bs-pstat-val    { font-size: 24px; font-weight: 700; color: var(--bs-blue); line-height: 1; }
.bs-pstat-yellow .bs-pstat-val { color: var(--bs-yellow-dark); }
.bs-pstat-lbl    { font-size: 11px; color: var(--bs-muted); margin-top: 3px; }

.bs-portal-actions { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }

.bs-table-wrap { overflow-x: auto; }
.bs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bs-table th { padding: 8px 12px; text-align: left; font-size: 11px; font-weight: 700; color: #555; background: #f8f9fa; border-bottom: 2px solid var(--bs-border); white-space: nowrap; }
.bs-table td { padding: 9px 12px; border-bottom: 1px solid var(--bs-border); vertical-align: middle; }
.bs-table tr:last-child td { border-bottom: none; }
.bs-table-empty { text-align: center; color: var(--bs-muted); padding: 24px !important; }

.bs-code { font-family: monospace; font-size: 12px; background: #f0f2f5; padding: 2px 5px; border-radius: 3px; }
.bs-code-sm { font-size: 11px; }

/* Badges */
.bs-badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.bs-badge-green  { background: var(--bs-green-pale); color: #155724; }
.bs-badge-red    { background: var(--bs-red-pale);   color: #721c24; }
.bs-badge-gray   { background: #e9ecef; color: #495057; }

/* Links */
.bs-link { color: var(--bs-blue); text-decoration: none; font-size: 12px; }
.bs-link-small { font-size: 11px; opacity: 0.8; }
.bs-link:hover { text-decoration: underline; }

/* Portal two col */
.bs-portal-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .bs-portal-two-col { grid-template-columns: 1fr; } }

/* Portal section */
.bs-portal-section { background: #fff; border: 1px solid var(--bs-border); border-radius: 10px; padding: 16px; }
.bs-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bs-section-title  { font-size: 14px; font-weight: 700; color: var(--bs-blue); }

/* QR item */
.bs-qr-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bs-border); }
.bs-qr-item:last-child { border-bottom: none; }
.bs-qr-info { flex: 1; }
.bs-qr-label { font-size: 13px; font-weight: 600; }
.bs-qr-actions { display: flex; gap: 6px; }

/* Reward item */
.bs-reward-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bs-border); }
.bs-reward-item:last-child { border-bottom: none; }
.bs-reward-pts { background: var(--bs-blue); color: var(--bs-yellow); font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 6px; white-space: nowrap; min-width: 60px; text-align: center; }
.bs-reward-pts span { font-size: 10px; font-weight: 400; opacity: 0.8; }
.bs-reward-info { flex: 1; }
.bs-reward-name { font-size: 13px; font-weight: 600; }
.bs-reward-desc { font-size: 11px; color: var(--bs-muted); }

/* Modal */
.bs-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.bs-modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  width: 100%; max-width: 420px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.bs-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.bs-modal-title  { font-size: 16px; font-weight: 700; color: var(--bs-blue); }
.bs-modal-close  { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--bs-muted); padding: 2px 6px; border-radius: 4px; }
.bs-modal-close:hover { background: #f0f0f0; }
.bs-modal-footer { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Portal login */
.bs-portal-login { text-align: center; padding: 40px 20px; }
.bs-portal-login p { margin-bottom: 14px; color: var(--bs-muted); }

/* Toast */
.bs-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bs-blue); color: #fff;
  padding: 12px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 99999; white-space: nowrap;
  animation: bs-toast-in 0.25s ease;
}
@keyframes bs-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Responsive */
@media (max-width: 480px) {
  .bs-digital-card { padding: 18px 16px 14px; }
  .bs-dc-name { font-size: 17px; }
  .bs-dc-clock { font-size: 15px; }
  .bs-portal-header { padding: 12px 14px; }
  .bs-portal-title { font-size: 14px; }
}
