/* Arab Templates — 1-Click Brand Bar + Morning CEO Briefing (template pages) */
.atbs-bar {
  position: relative;
  z-index: 60;
  border-bottom: 1px solid rgba(197, 160, 89, .22);
  background: linear-gradient(90deg, rgba(15, 23, 42, .97), rgba(22, 33, 58, .97));
  color: #EAF1FB;
  font: 700 10px/1.4 system-ui, Tahoma, sans-serif;
}
html[data-at-theme="light"] .atbs-bar { background: #FFFDF8; color: #16233A; border-color: rgba(120, 92, 40, .22); }
.atbs-inner { max-width: 1180px; margin: 0 auto; padding: 6px 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.atbs-k { display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 900; letter-spacing: .06em; color: #E7C76D; white-space: nowrap; }
html[data-at-theme="light"] .atbs-k { color: #7C5717; }
.atbs-name {
  flex: 1 1 150px;
  min-width: 120px;
  max-width: 240px;
  border: 1px solid rgba(197, 160, 89, .3);
  background: rgba(255, 255, 255, .04);
  color: inherit;
  border-radius: 7px;
  padding: 5px 8px;
  font: 800 10px/1.4 inherit;
  outline: 0;
}
html[data-at-theme="light"] .atbs-name { background: #fff; }
.atbs-name:focus { border-color: #C5A059; box-shadow: 0 0 0 2px rgba(197, 160, 89, .18); }
.atbs-file { position: relative; overflow: hidden; display: inline-flex; }
.atbs-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.atbs-file span, .atbs-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(197, 160, 89, .34);
  background: rgba(197, 160, 89, .1);
  color: #F2D99B;
  border-radius: 7px;
  padding: 5px 8px;
  font: 900 8.5px/1.5 inherit;
  cursor: pointer;
  white-space: nowrap;
}
html[data-at-theme="light"] .atbs-file span,
html[data-at-theme="light"] .atbs-btn { color: #7C5717; }
.atbs-file span:hover, .atbs-btn:hover { background: rgba(197, 160, 89, .2); }
.atbs-btn.rec { border-color: rgba(52, 211, 153, .6); color: #6EE7B7; background: rgba(52, 211, 153, .1); animation: atbsPulse 1.2s infinite; }
html[data-at-theme="light"] .atbs-btn.rec { color: #047857; }
@keyframes atbsPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .35); } 50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, .07); } }
.atbs-color { width: 28px; height: 26px; border: 1px solid rgba(148, 163, 184, .35); border-radius: 6px; padding: 1px; background: transparent; cursor: pointer; }
.atbs-x { margin-inline-start: auto; border: 1px solid rgba(148, 163, 184, .28); background: transparent; color: inherit; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 10px; }
.atbs-pill {
  position: fixed;
  inset-inline-start: 8px;
  top: 64px;
  z-index: 60;
  border: 1px solid rgba(197, 160, 89, .45);
  background: #0F172A;
  color: #F2D99B;
  border-radius: 99px;
  padding: 5px 9px;
  font: 900 9px/1.4 system-ui, Tahoma, sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
html[data-at-theme="light"] .atbs-pill { background: #FFFDF8; color: #7C5717; }

/* branded header + print report header */
.at-brand img { width: 100%; height: 100%; object-fit: contain; display: block; }
#atBrandPrint { display: none; }

/* morning briefing card */
.atbf-card {
  position: fixed;
  inset-inline-start: 14px;
  bottom: 14px;
  z-index: 9520;
  width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(197, 160, 89, .4);
  border-radius: 13px;
  background: linear-gradient(165deg, #121D31, #0A1220);
  color: #EAF1FB;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .45);
  font: 500 11px/1.7 system-ui, Tahoma, sans-serif;
  padding: 10px 11px;
  display: none;
}
.atbf-card.on { display: block; }
html[data-at-theme="light"] .atbf-card { background: #FFFDF9; color: #16233A; border-color: rgba(120, 92, 40, .3); }
.atbf-top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.atbf-top b { font-size: 10.5px; }
.atbf-top button { margin-inline-start: auto; border: 1px solid rgba(148, 163, 184, .3); background: transparent; color: inherit; border-radius: 6px; width: 22px; height: 21px; cursor: pointer; font-size: 10px; }
.atbf-card ul { margin: 0; padding-inline-start: 15px; display: grid; gap: 2px; }
.atbf-card li { font-size: 9.5px; }
.atbf-card li b { color: #F2D99B; }
html[data-at-theme="light"] .atbf-card li b { color: #7C5717; }
.atbf-actions { display: flex; gap: 5px; margin-top: 6px; }
.atbf-actions button { border: 1px solid rgba(197, 160, 89, .4); background: rgba(197, 160, 89, .12); color: #F2D99B; border-radius: 6px; padding: 3px 7px; font: 900 8px/1.5 inherit; cursor: pointer; }
html[data-at-theme="light"] .atbf-actions button { color: #7C5717; }

@media print {
  .atbs-bar, .atbs-pill, .atbf-card { display: none !important; }
  #atBrandPrint {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0 0 10px;
    margin: 0 0 14px;
    border-bottom: 2px solid #C5A059;
  }
  #atBrandPrint img { width: 40px; height: 40px; object-fit: contain; }
  #atBrandPrint .bp-name { font: 900 15px/1.3 Tahoma, sans-serif; color: #0F172A; }
  #atBrandPrint .bp-sub { font: 700 9px/1.5 Tahoma, sans-serif; color: #475569; }
  #atBrandPrint .bp-meta { margin-inline-start: auto; text-align: end; font: 700 8.5px/1.5 Tahoma, sans-serif; color: #475569; }
}
@media (max-width: 620px) {
  .atbs-inner { padding: 5px 8px; gap: 4px; }
  .atbs-name { flex: 1 1 100%; max-width: none; order: 5; }
  .atbs-k { font-size: 8px; }
  .atbs-btn, .atbs-file span { padding: 4px 6px; font-size: 8px; }
}

.atbs-brandline { display: flex; align-items: center; gap: 6px; font: 900 9px/1.5 Tahoma, system-ui, sans-serif; color: #C5A059; letter-spacing: .02em; margin-bottom: 3px; }
html[data-at-theme="light"] .atbs-brandline { color: #7C5717; }
.atbs-brandline img { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.atbs-brandline i { width: 9px; height: 9px; border-radius: 3px; display: block; }
.atbs-brandline + * { margin-top: 0; }
