:root {
  --brand: #204BB1;
  --brand-deep: #0B2C5E;
  --sky: #5BA3D9;
  --bg: #F5F8FD;
  --card: #fff;
  --border: rgba(32, 75, 177, 0.18);
  --text: #0B2C5E;
  --muted: #5B6B85;
  --ok: #059669;
  --danger: #DC2626;
  --opening: #EF4444;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Tajawal', sans-serif;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(32,75,177,0.12), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(239,68,68,0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.ba-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.ba-brand img { height: 36px; width: auto; display: block; }
.ba-back {
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.ba-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

.ba-hero {
  background: linear-gradient(135deg, #0f2f7a, #204BB1 55%, #3b82f6);
  color: #fff;
  border-radius: 22px;
  padding: 28px 24px;
  margin-bottom: 22px;
  box-shadow: 0 16px 40px rgba(11,44,94,0.22);
}
.ba-hero.opening {
  background: linear-gradient(135deg, #7f1d1d, #DC2626 45%, #F59E0B);
}
.ba-pill {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.85rem;
}
.ba-hero h1 { margin: 10px 0 8px; font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 900; }
.ba-hero p { margin: 0; opacity: 0.95; font-weight: 600; max-width: 640px; }
.ba-price-row { margin-top: 16px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ba-price-row strong { font-size: 2rem; font-weight: 900; }
.ba-price-row span { font-weight: 700; opacity: 0.9; }

.ba-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.ba-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(11,44,94,0.06);
}
.ba-card h2 {
  margin: 18px 0 12px;
  font-size: 1.05rem;
  color: var(--brand-deep);
  border-bottom: 2px solid #dbeafe;
  padding-bottom: 6px;
}
.ba-card h2:first-child { margin-top: 0; }

label {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--brand-deep);
}
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(32,75,177,0.25);
  border-color: var(--brand);
}

.ba-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ba-hint { color: var(--muted); font-size: 0.85rem; font-weight: 600; margin: 0 0 10px; }
.ba-map, .ba-preview-map {
  height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.ba-preview-map { height: 220px; }

.ba-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.ba-thumbs img, .ba-receipt-preview img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.ba-receipt-preview img { width: 100%; max-width: 280px; height: auto; max-height: 180px; }

.ba-banks {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.ba-bank {
  background: #F8FAFF;
  border: 1px dashed rgba(32,75,177,0.35);
  border-radius: 14px;
  padding: 12px 14px;
}
.ba-bank strong { display: block; margin-bottom: 4px; }
.ba-bank code {
  display: block;
  direction: ltr;
  text-align: left;
  font-size: 0.85rem;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  margin-top: 4px;
  border: 1px solid #e2e8f0;
}

.ba-submit {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #163A8C, #204BB1 50%, #5BA3D9);
  color: #fff;
  font: inherit;
  font-weight: 900;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(32,75,177,0.28);
}
.ba-submit:disabled { opacity: 0.6; cursor: wait; }
body.opening-mode .ba-submit {
  background: linear-gradient(135deg, #7f1d1d, #DC2626 50%, #F59E0B);
  box-shadow: 0 12px 28px rgba(220,38,38,0.28);
}

.ba-status {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.92rem;
}
.ba-status.ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.ba-status.err { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.ba-aside { position: sticky; top: 78px; }
.ba-preview-map-wrap { position: relative; margin-bottom: 14px; }
.ba-pin-float {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -100%);
  width: min(180px, 70%);
  background: #fff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  border: 2px solid #fff;
  text-align: center;
  z-index: 5;
  pointer-events: none;
}
body.opening-mode .ba-pin-float {
  border-color: #FCA5A5;
  box-shadow: 0 0 0 6px rgba(239,68,68,0.18), 0 16px 32px rgba(220,38,38,0.25);
  animation: ba-pulse 1.6s ease-in-out infinite;
}
@keyframes ba-pulse {
  0%, 100% { transform: translate(-50%, -100%) scale(1); }
  50% { transform: translate(-50%, -100%) scale(1.04); }
}
.ba-pin-float img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  background: #e2e8f0;
  display: block;
}
.ba-pin-float img[src=""] { display: none; }
.ba-pin-float span {
  display: inline-block;
  margin-top: 6px;
  background: #204BB1;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}
body.opening-mode .ba-pin-float span { background: #DC2626; }
.ba-pin-float strong { display: block; margin-top: 4px; font-size: 0.82rem; }

.ba-explore-banner {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
  border-radius: 14px;
  overflow: hidden;
  padding: 10px;
}
.ba-explore-banner img {
  width: 88px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #334155;
}
.ba-explore-banner span {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}
.ba-explore-banner strong { display: block; margin-top: 4px; font-size: 0.92rem; }
.ba-explore-banner p { margin: 2px 0 0; font-size: 0.78rem; opacity: 0.9; }
.ba-explore-preview.hidden { display: none; }

.ba-channels {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ba-channels li {
  background: #EEF4FF;
  color: var(--brand-deep);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}
body.opening-mode .ba-channels li { background: #FEE2E2; color: #991B1B; }

@media (max-width: 900px) {
  .ba-grid { grid-template-columns: 1fr; }
  .ba-aside { position: static; }
  .ba-row { grid-template-columns: 1fr; }
}
