/* Arab Templates — AI Template Fusion Lab */
.atf-section { max-width: 1380px; margin: 22px auto 0; padding: 0 26px; position: relative; z-index: 3; }
.atf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.atf-kicker { display: inline-flex; align-items: center; gap: 7px; color: #E7C76D; font-size: 9.5px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.atf-kicker::before { content: ""; width: 18px; height: 1px; background: #D4AF37; }
.atf-head h2 { margin: 4px 0 0; font-size: clamp(18px, 2.3vw, 27px); letter-spacing: -.02em; }
.atf-head p { margin: 4px 0 0; color: var(--muted, #93A4BC); font-size: 11px; line-height: 1.75; max-width: 700px; }
.atf-count { font-size: 10px; font-weight: 900; color: #E7C76D; background: rgba(212, 175, 55, .1); border: 1px solid rgba(212, 175, 55, .32); border-radius: 99px; padding: 5px 11px; white-space: nowrap; }

.atf-build {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line, rgba(197, 160, 89, .24));
  border-radius: 16px;
  padding: 14px;
  background: var(--panel, #16213A);
}
.atf-pick { display: grid; gap: 5px; min-width: 0; }
.atf-pick label { font-size: 9px; font-weight: 900; color: var(--gold2, #E4C88A); letter-spacing: .06em; }
.atf-pick select {
  width: 100%;
  border: 1px solid var(--line, rgba(197, 160, 89, .28));
  background: var(--bg, #0F172A);
  color: var(--text, #F3F7FD);
  border-radius: 10px;
  padding: 9px 10px;
  font: 700 11px/1.4 system-ui, Tahoma, sans-serif;
  outline: 0;
}
.atf-plus { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(197, 160, 89, .14); color: var(--gold, #C5A059); font-weight: 900; margin-bottom: 3px; }
.atf-go {
  border: 1px solid var(--gold, #C5A059);
  background: var(--gold, #C5A059);
  color: #0F172A;
  border-radius: 10px;
  padding: 10px 16px;
  font: 900 10.5px/1.4 system-ui, Tahoma, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.atf-go:hover { filter: brightness(1.06); }
.atf-hint { margin: 7px 2px 0; font-size: 9px; color: var(--muted, #93A4BC); }
.atf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.atf-card { border: 1px solid var(--line, rgba(197, 160, 89, .2)); border-radius: 11px; padding: 9px 11px; background: color-mix(in srgb, var(--panel, #16213A) 88%, transparent); }
.atf-card small { display: block; font-size: 8.5px; color: var(--gold2, #E4C88A); font-weight: 900; }
.atf-card b { display: block; font-size: 11px; margin-top: 2px; }
.atf-card span { display: block; font-size: 9px; color: var(--muted, #93A4BC); margin-top: 2px; }

/* dual workspace overlay */
.atf-modal { position: fixed; inset: 0; z-index: 9750; display: none; flex-direction: column; background: #060B14; color: #E9F1FB; }
.atf-modal.on { display: flex; }
html[data-at-theme="light"] .atf-modal { background: #F7FAFC; color: #0F172A; }
.atf-mhead { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(148, 163, 184, .22); flex-wrap: wrap; }
.atf-mhead b { font-size: 11px; }
.atf-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.atf-tab { border: 1px solid rgba(148, 163, 184, .28); background: transparent; color: inherit; border-radius: 8px; padding: 5px 9px; font: 800 9px/1.5 system-ui, Tahoma, sans-serif; cursor: pointer; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atf-tab.on { border-color: #C5A059; background: rgba(197, 160, 89, .14); color: #F2D99B; }
html[data-at-theme="light"] .atf-tab.on { color: #7C5717; }
.atf-modes { margin-inline-start: auto; display: flex; gap: 4px; }
.atf-mbtn { border: 1px solid rgba(148, 163, 184, .3); background: transparent; color: inherit; border-radius: 8px; padding: 5px 9px; font: 800 9px/1.5 inherit; cursor: pointer; }
.atf-mbtn.on { border-color: #C5A059; color: #F2D99B; }
html[data-at-theme="light"] .atf-mbtn.on { color: #7C5717; }
.atf-mclose { border: 1px solid rgba(239, 68, 68, .45); background: transparent; color: #FCA5A5; border-radius: 8px; width: 28px; height: 26px; cursor: pointer; font-size: 12px; }
.atf-body { flex: 1; min-height: 0; display: flex; gap: 6px; padding: 6px; }
.atf-pane { flex: 1; min-width: 0; border: 1px solid rgba(148, 163, 184, .2); border-radius: 10px; overflow: hidden; background: #0B1424; display: flex; flex-direction: column; }
.atf-pane.off { display: none; }
.atf-pane-top { display: flex; align-items: center; gap: 6px; padding: 5px 8px; font-size: 8.5px; font-weight: 900; color: #93A4BC; border-bottom: 1px solid rgba(148, 163, 184, .16); }
.atf-pane-top a { margin-inline-start: auto; color: #E7C76D; text-decoration: none; font-size: 8.5px; }
.atf-pane iframe { flex: 1; width: 100%; border: 0; background: #0B1424; }
.atf-modal.swap .atf-pane { flex: 1; }
@media (max-width: 760px) {
  .atf-build { grid-template-columns: 1fr; }
  .atf-plus { display: none; }
  .atf-go { width: 100%; }
  .atf-cards { grid-template-columns: 1fr; }
  .atf-body { flex-direction: column; }
}
