/* Lightweight in-place patch styles.
   Intentionally keeps the site's existing app.css / superior.css / theme presets
   in charge of the global visual design. No repeating SVG, fixed background,
   global backdrop blur, or global card restyling is applied here. */

/* Popup banner: compact, readable, responsive, with a single restrained glass surface. */
#promoModal.modal {
  z-index: 500;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow-y: auto;
  background: rgba(4, 7, 13, .76);
}
#promoModal .modal-card {
  box-sizing: border-box;
  position: relative;
  width: min(520px, 100%);
  max-width: min(520px, calc(100vw - 28px));
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  margin: auto;
  padding: clamp(18px, 3.2vw, 25px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--jb-preset-line, var(--edge, rgba(213,173,93,.24)));
  border-radius: 18px;
  background: var(--panel, #121722);
  background: color-mix(in srgb, var(--panel, #121722) 94%, transparent);
  color: var(--text, #f7f8fb);
  box-shadow: 0 20px 48px rgba(0,0,0,.24);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: jb-popup-enter .18s ease-out both;
}
#promoModal .modal-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  line-height: 1;
  font-size: 21px;
}
#promoModal #popupImg {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: min(30vh, 280px);
  max-height: min(30dvh, 280px);
  margin: 0 0 16px;
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--line, rgba(255,255,255,.1));
  border-radius: 12px;
  background: var(--panel2, #191f2b);
}
#promoModal #popupTitle {
  margin: 0 38px 10px 0;
  font-size: clamp(20px, 4vw, 27px);
  font-weight: 850;
  line-height: 1.24;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
#promoModal #popupBody {
  display: block;
  max-width: 100%;
  margin: 0 0 18px;
  color: var(--muted, #98a2b2);
  font-size: clamp(14px, 2.4vw, 15px);
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: normal;
}
#promoModal #popupCta {
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
}
@keyframes jb-popup-enter {
  from { opacity: 0; transform: translateY(7px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
html[data-theme-preset="arctic-blue"] #promoModal .modal-card,
html[data-theme-preset="paper-clean"] #promoModal .modal-card,
html[data-theme="light"] #promoModal .modal-card {
  color: #172033;
  border-color: rgba(71,85,105,.2);
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 42px rgba(24,39,61,.18);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-theme-preset="arctic-blue"] #promoModal #popupBody,
html[data-theme-preset="paper-clean"] #promoModal #popupBody,
html[data-theme="light"] #promoModal #popupBody { color: #475569; }

/* Bulk operations and table selection. */
.bulk-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 12px 0; padding: 12px; border-radius: 12px;
  background: var(--panel2, rgba(90,120,155,.08));
  border: 1px solid var(--line, rgba(255,255,255,.1));
}
.bulk-toolbar .input, .bulk-toolbar .select { max-width: 260px; }
.bulk-cell { width: 38px; text-align: center; }
.bulk-cell input { width: 17px; height: 17px; accent-color: var(--primary, #237ac4); }
.bulk-selected-note { font-size: 12px; color: var(--muted, #98a2b2); }

/* Dashboard chart. */
.dashboard-chart { display: block; width: 100%; height: 270px; }
.dashboard-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted, #98a2b2); }
.dashboard-chart-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; background: var(--primary); }

/* Grouped/accordion sidebar navigation. No backdrop blur on the whole sidebar. */
.admin-menu-group {
  margin: 5px 0 9px; padding: 5px 0 8px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,.1));
}
.admin-menu-group[data-collapsed="true"] > .admin-menu-group-items { display: none !important; }
.admin-menu-group[data-collapsed="false"] > .admin-menu-group-items { display: block; }
.admin-menu-group-title {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted, #98a2b2); text-align: left; cursor: pointer;
  font: inherit; font-size: 10px; font-weight: 900; letter-spacing: .11em;
}
.admin-menu-group-title:hover { background: rgba(128,145,170,.08); }
.admin-menu-chevron { display: inline-block; opacity: .72; transition: transform .16s ease; }
.admin-menu-group[data-collapsed="true"] .admin-menu-chevron { transform: rotate(-90deg); }
.admin-menu-group-items { min-width: 0; padding: 3px 5px 5px; }
.admin-menu-group-items > .admin-menu-item { box-sizing: border-box; width: 100%; min-height: 38px; margin: 2px 0; padding: 9px 12px; border-radius: 9px; text-align: left; }
.admin-menu-group .admin-menu-item[data-count]::after {
  content: attr(data-count); float: right; min-width: 18px; padding: 1px 5px;
  border-radius: 99px; background: #ae3333; color: #fff; text-align: center; font-size: 10px; font-weight: 800;
}
.admin-menu-group button.active { border-color: rgba(211,174,91,.45); }
.admin-menu-group[hidden], .admin-menu-item[hidden] { display: none !important; }
.admin-menu-search:focus-within, .admin-nav-search:focus-within { outline: 2px solid rgba(195,158,80,.5); outline-offset: 2px; }
.admin-notify-control { position: relative; overflow: visible; }
.admin-notif-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center; border: 2px solid var(--bg, #111827); border-radius: 999px;
  background: #c43737; color: #fff; font-size: 10px; font-weight: 900;
}
.admin-notif-badge.hidden { display: none; }

@media (max-width: 640px) {
  #promoModal .modal-card { width: 100%; max-width: 100%; max-height: 86vh; max-height: 86dvh; padding: 17px; border-radius: 16px; }
  #promoModal #popupImg { max-height: 25vh; max-height: 25dvh; }
  #jbLivechatRoot { bottom: calc(126px + env(safe-area-inset-bottom)) !important; right: max(12px, env(safe-area-inset-right)); }
  .audio-control { bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 100100; }
  .dashboard-chart { height: 230px; }
  .bulk-toolbar > * { max-width: 100%; }
  .admin-menu-group-title { padding: 12px; }
  .admin-menu-group-items { padding-inline: 4px; }
  .admin-menu-group-items > .admin-menu-item { min-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  #promoModal .modal-card { animation: none; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* Accordion correction: one visible category at a time, visually distinct but lightweight. */
.admin-side { overflow-y: auto; overscroll-behavior: contain; }
.admin-menu { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 5px 0 14px; }
.admin-menu-group {
  box-sizing: border-box;
  min-width: 0;
  margin: 3px 0;
  padding: 3px;
  border: 1px solid var(--line, rgba(255,255,255,.09));
  border-radius: 12px;
  background: rgba(120,135,155,.035);
}
.admin-menu-group-title {
  min-height: 42px;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 9px;
  color: var(--text, #e8edf5);
  letter-spacing: .045em;
  font-size: 11px;
  line-height: 1.25;
}
.admin-menu-group-title[aria-expanded="true"] {
  background: rgba(181,146,72,.10);
  color: var(--text, #e8edf5);
}
.admin-menu-chevron { flex: 0 0 auto; font-size: 14px; }
.admin-menu-group-items {
  margin: 3px 2px 2px;
  padding: 4px 0 2px 7px;
  border-left: 1px solid var(--line, rgba(255,255,255,.1));
}
.admin-menu-group-items > .admin-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 39px;
  margin: 2px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}
.admin-menu-group .admin-menu-item.active {
  background: rgba(181,146,72,.12);
  border-color: rgba(181,146,72,.32);
  color: var(--text, #e8edf5);
}
html[data-theme="light"] .admin-menu-group { background: rgba(255,255,255,.42); border-color: rgba(60,75,95,.13); }
html[data-theme="light"] .admin-menu-group-title { color: #172033; }
html[data-theme="light"] .admin-menu-group-title[aria-expanded="true"] { background: rgba(164,119,35,.10); color: #172033; }
html[data-theme="light"] .admin-menu-group .admin-menu-item.active { background: rgba(164,119,35,.10); border-color: rgba(164,119,35,.25); color: #172033; }
@media (max-width: 640px) {
  .admin-menu-group { margin: 3px 0; }
  .admin-menu-group-title { min-height: 44px; padding: 12px; }
  .admin-menu-group-items > .admin-menu-item { min-height: 43px; }
}

/* Refined restrained storefront theme: card surfaces, deep navy, muted red/gold accents. */
.home-page .topbar{background:var(--panel, #151b25);border-bottom:1px solid var(--line,rgba(190,200,215,.16));box-shadow:0 4px 18px rgba(0,0,0,.12)}
.home-page .nav{gap:18px}
.home-page .brand{min-width:0}
.home-page .nav-links a{border:1px solid transparent;border-radius:10px;padding:9px 12px;transition:background .16s,border-color .16s}
.home-page .nav-links a:hover,.home-page .nav-links a:focus-visible{background:var(--panel2,rgba(150,160,180,.09));border-color:var(--line,rgba(190,200,215,.18));outline:none}
.home-page main .section{position:relative}
.home-page .section-title{margin-bottom:20px}
.home-page .section-title h2{letter-spacing:-.025em}
.home-page .card,.home-page .tool-side,.home-page .tool-main,.home-page .tool-wrap>.card,.home-page .flash-copy,.home-page .comment-form,.home-page .testimonial,.home-page .news-card{border:1px solid var(--line,rgba(190,200,215,.16));border-radius:18px;box-shadow:0 8px 24px rgba(0,0,0,.08)}
.home-page .tool-side,.home-page .tool-main{padding:clamp(15px,2.5vw,24px)}
.home-page .method-tab,.home-page .quick-link,.home-page .bottom-nav a{border-radius:12px}
.home-page .footer{border-top:1px solid var(--line,rgba(190,200,215,.18));background:var(--panel, #131923)}
.home-page .footer-grid>div{border:1px solid var(--line,rgba(190,200,215,.12));border-radius:16px;padding:18px;background:var(--panel2,rgba(150,160,180,.035))}
.home-page .footer-links a{display:flex;gap:10px;align-items:center;padding:9px 10px;border-radius:9px;text-decoration:none}
.home-page .footer-links a:hover{background:var(--panel,rgba(150,160,180,.08))}
#marketplaceBanner{display:block;width:100%;margin:0 0 22px;overflow:hidden;aspect-ratio:var(--market-banner-ratio,14/5);max-height:460px;border:1px solid var(--line,rgba(190,200,215,.2));border-radius:18px;background:var(--panel2,#181e29);box-shadow:0 8px 24px rgba(0,0,0,.12)}
#marketplaceBanner img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:var(--market-banner-ratio,14/5)}
#marketplaceBanner.hidden{display:none}
#promoModal .modal-card{position:relative;max-width:min(560px,calc(100vw - 28px));padding:clamp(18px,4vw,28px);border:1px solid var(--line,rgba(198,164,84,.45));border-radius:22px;background:var(--panel,#151b25);box-shadow:0 16px 40px rgba(0,0,0,.28);animation:jb-popup-enter .2s ease-out both}
#promoModal #popupImg{display:block;max-width:100%;max-height:45vh;aspect-ratio:3/2;object-fit:cover;border:1px solid var(--line,rgba(198,164,84,.24));border-radius:14px;background:var(--panel2,#202632)}
#promoModal #popupBody{padding:13px 14px;border:1px solid var(--line,rgba(198,164,84,.4));border-left:3px solid var(--accent,#c6a454);border-radius:12px;background:var(--panel2,rgba(140,150,165,.07));white-space:pre-line}
#promoModal #popupCta{min-height:46px;border:1px solid rgba(198,164,84,.4);border-radius:12px;font-weight:800;box-shadow:none}
#promoModal .modal-close{position:absolute;right:12px;top:12px;z-index:2;border:1px solid var(--line,rgba(190,200,215,.2));border-radius:11px}
.metric.dashboard-shortcut{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%;text-align:left;cursor:pointer;transition:transform .14s ease,border-color .14s ease,background .14s ease}
.metric.dashboard-shortcut:hover,.metric.dashboard-shortcut:focus-visible{transform:translateY(-2px);border-color:var(--accent,#c6a454);background:var(--panel2,rgba(150,160,180,.08));outline:2px solid transparent}
.metric.dashboard-shortcut .shortcut-hint{font-size:11px;color:var(--muted,#98a2b2);opacity:.78}
@media(max-width:680px){#marketplaceBanner{aspect-ratio:14/5;border-radius:13px;margin-bottom:16px}.home-page .footer-grid>div{padding:14px}.home-page .nav{gap:8px}}
