/* Ansel Forms console - white, grey, black, rounded, no gradients */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(../fonts/manrope-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(../fonts/manrope-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(../fonts/manrope-latin-700-normal.woff2) format("woff2"); }

:root {
  --af-black: #0a0a0a;
  --af-ink: #3f3f46;
  --af-muted: #52525b;
  --af-line: #e4e4e7;
  --af-line-strong: #d4d4d8;
  --af-bg: #f4f4f5;
  --af-white: #ffffff;
  --af-locked: #ebebed;
  --af-radius: 14px;
  --bs-body-font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--af-black);
  --bs-body-bg: var(--af-bg);
  --bs-link-color: var(--af-black);
  --bs-link-hover-color: var(--af-ink);
  --bs-border-radius: 10px;
}
body { background: var(--af-bg); color: var(--af-black); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--af-black); }
a:hover { color: var(--af-ink); }
.af-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.af-main { flex: 1 0 auto; padding-top: 32px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 32px; }
.af-muted { color: var(--af-muted); }
.af-h1 { font-size: 30px; font-weight: 700; margin: 0; }
.af-h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.af-h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.af-label { font-size: 14px; font-weight: 600; }
.af-stack { display: flex; flex-direction: column; gap: 16px; }
.af-page-head { display: flex; flex-direction: column; gap: 6px; }

/* top bar */
.af-topbar { background: var(--af-black); color: var(--af-white); }
.af-topbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.af-logo { color: var(--af-white); text-decoration: none; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.af-logo:hover { color: var(--af-white); }
.af-logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--af-white); color: var(--af-black); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.af-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.af-nav-link { color: var(--af-white); text-decoration: none; padding: 8px 4px; }
.af-nav-link:hover { color: var(--af-line); }
.af-plan-pill { padding: 4px 12px; border: 1px solid #52525b; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.af-plan-pill-admin { background: var(--af-white); color: var(--af-black); border-color: var(--af-white); font-weight: 700; }

/* buttons */
.af-btn-dark, .af-btn-light, .af-btn-outline, .af-btn-outline-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 10px; text-decoration: none; cursor: pointer; min-height: 44px; border: 1px solid transparent;
}
.af-btn-dark { background: var(--af-black); color: var(--af-white); }
.af-btn-dark:hover { background: #27272a; color: var(--af-white); }
.af-btn-dark:disabled { background: #a1a1aa; cursor: not-allowed; }
.af-btn-light { background: var(--af-white); color: var(--af-black); font-weight: 700; min-height: 38px; padding: 8px 14px; }
.af-btn-light:hover { background: var(--af-line); color: var(--af-black); }
.af-btn-outline { background: transparent; color: var(--af-white); border-color: #52525b; min-height: 38px; padding: 7px 14px; }
.af-btn-outline:hover { border-color: var(--af-white); }
.af-btn-outline-dark { background: var(--af-white); color: var(--af-black); border-color: var(--af-line-strong); }
.af-btn-outline-dark:hover { border-color: var(--af-black); }
.af-link-btn { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--af-black); text-decoration: underline; cursor: pointer; }
.af-link-btn:hover { color: var(--af-ink); }
.af-danger { color: #b91c1c !important; }

/* cards */
.af-card { background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); padding: 28px; }
.af-narrow { width: 100%; max-width: 440px; margin: 24px auto 0; }
.af-two-col { display: flex; flex-wrap: wrap; gap: 24px; }
.af-two-col > * { flex: 1 1 420px; min-width: 0; }

/* sections and tiles */
.af-section { display: flex; flex-direction: column; gap: 16px; }
.af-section-boxed { background: var(--af-white); border: 1px solid var(--af-black); border-radius: 16px; padding: 24px; }
.af-section-head { display: flex; align-items: center; gap: 12px; }
.af-section-head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--af-muted); }
.af-section-boxed .af-section-head h2 { color: var(--af-black); font-weight: 700; }
.af-rule { flex: 1; height: 1px; background: var(--af-line-strong); }
.af-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.af-tile { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); text-decoration: none; color: var(--af-black); min-height: 132px; }
.af-tile:hover { border-color: var(--af-black); color: var(--af-black); }
.af-section-boxed .af-tile { background: var(--af-bg); }
.af-tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.af-tile-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--af-bg); display: inline-flex; align-items: center; justify-content: center; }
.af-section-boxed .af-tile-icon { background: var(--af-white); }
.af-tile-title { font-size: 16px; font-weight: 600; }
.af-tile-desc { font-size: 13px; color: var(--af-muted); }
.af-tile-locked { background: var(--af-locked); border: 1px dashed #b4b4ba; color: var(--af-ink); }
.af-tile-locked .af-tile-icon { background: #e0e0e3; color: var(--af-muted); }
.af-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--af-black); color: var(--af-white); letter-spacing: .04em; white-space: nowrap; }
.af-pill-sm { font-size: 10px; padding: 2px 7px; }

/* brand setup */
.af-brand-setup { border-color: var(--af-black); }
.af-inline { display: flex; flex-wrap: wrap; gap: 10px; }
.af-inline .form-control { flex: 1 1 260px; min-height: 44px; }
.af-status { font-weight: 600; }
.af-status-pending { color: #92400e; }
.af-status-rejected { color: #b91c1c; }
.af-status-active { color: #166534; }

/* lists and tables */
.af-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.af-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; background: var(--af-line); border-radius: 12px; }
.af-filter a { font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--af-ink); }
.af-filter a.active { background: var(--af-white); color: var(--af-black); font-weight: 600; }
.af-table-box { background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); overflow-x: auto; }
.af-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.af-table th { text-align: left; color: var(--af-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: 14px 20px; }
.af-table td { padding: 14px 20px; border-top: 1px solid var(--af-line); vertical-align: middle; }
.af-empty { text-align: center; color: var(--af-muted); padding: 40px 20px !important; }
.af-type { padding: 3px 10px; border-radius: 999px; background: var(--af-bg); font-size: 12px; font-weight: 600; }
.af-actions { white-space: nowrap; }
.af-actions > * { margin-left: 14px; font-size: 13px; font-weight: 600; }
.af-disabled { color: #71717a; text-decoration: none; cursor: default; }
.af-inline-sm { display: flex; align-items: center; gap: 8px; }
.af-inline-sm .form-select { width: auto; }

/* forms */
.af-form-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.af-form-row > div { flex: 1 1 200px; }
.af-form-row > .af-form-row-btn { flex: 0 0 auto; }
.af-search { display: flex; gap: 10px; flex-wrap: wrap; }
.af-search .form-control { flex: 1 1 280px; min-height: 44px; }
.af-code-input { font-size: 28px; letter-spacing: .4em; text-align: center; }
.af-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-control, .form-select { border-color: var(--af-line-strong); background-color: var(--af-white); }
.form-control:disabled { background-color: var(--af-bg); }
code { color: var(--af-ink); }
.form-control:focus, .form-select:focus { border-color: var(--af-black); box-shadow: 0 0 0 3px rgba(10,10,10,.12); }

/* chips */
.af-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.af-chips li { display: inline-flex; align-items: center; gap: 4px; background: var(--af-bg); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; }
.af-chips form { margin: 0; }
.af-chip-x { border: 0; background: transparent; font-size: 16px; line-height: 1; width: 28px; height: 28px; border-radius: 999px; cursor: pointer; color: var(--af-muted); }
.af-chip-x:hover { background: var(--af-line); color: var(--af-black); }

/* support button and footer */
.af-support { position: fixed; right: 24px; bottom: 24px; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--af-black); color: var(--af-white); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.18); z-index: 1000; }
.af-support:hover { color: var(--af-white); background: #27272a; }
.af-footer { color: var(--af-muted); font-size: 13px; padding-top: 16px; padding-bottom: 24px; }

@media (max-width: 575px) {
  .af-wrap { padding-left: 16px; padding-right: 16px; }
  .af-card { padding: 20px; }
  .af-support span { display: none; }
}

/* ---------- phase 3: forms, builder, responses ---------- */
.af-btn-sm { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.af-new-card { width: 100%; max-width: 640px; margin: 0 auto; }
.af-style-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.af-style-opt { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--af-line-strong); border-radius: var(--af-radius); cursor: pointer; }
.btn-check:checked + .af-style-opt { border: 2px solid var(--af-black); padding: 15px; }
.btn-check:focus-visible + .af-style-opt { outline: 3px solid rgba(10,10,10,.3); }
.af-style-art { height: 110px; border-radius: 10px; background: var(--af-bg); padding: 14px; display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.af-style-art i { display: block; height: 7px; width: 45%; background: #a1a1aa; border-radius: 4px; }
.af-style-art b { display: block; height: 16px; background: var(--af-white); border: 1px solid var(--af-line-strong); border-radius: 6px; }
.af-style-art em { display: block; height: 16px; width: 34%; background: var(--af-black); border-radius: 6px; }
.af-style-art-card { align-items: center; justify-content: center; }
.af-style-art-card > span { width: 78%; background: var(--af-white); border: 1px solid var(--af-line-strong); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.af-style-art-card em { align-self: flex-end; }
.af-copy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.af-code-line { flex: 1 1 260px; background: var(--af-bg); padding: 10px 12px; border-radius: 10px; word-break: break-all; }
.af-pre { background: var(--af-black); color: #e4e4e7; padding: 16px; border-radius: 12px; font-size: 13px; overflow-x: auto; }
.af-pre code { color: inherit; }
.af-pager { display: flex; gap: 16px; align-items: center; justify-content: center; }
.af-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.af-answers { display: grid; grid-template-columns: minmax(140px, 1fr) 3fr; gap: 12px 24px; margin: 0; }
.af-answers dt { font-weight: 600; color: var(--af-muted); }
.af-answers dd { margin: 0; word-break: break-word; }
@media (max-width: 575px) { .af-answers { grid-template-columns: 1fr; } .af-answers dd { margin-bottom: 8px; } }

/* builder */
.af-main:has(.af-builder) { max-width: 1440px; padding-bottom: 32px; }
.af-builder { display: flex; flex-direction: column; gap: 16px; }
.af-bld-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); padding: 10px 12px; position: sticky; top: 8px; z-index: 20; }
.af-bld-title { flex: 1 1 220px; max-width: 420px; font-weight: 600; min-height: 44px; }
.af-bld-spacer { flex: 1 1 auto; }
.af-bld-state { font-size: 13px; color: var(--af-muted); }
.af-bld-cols { display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.af-bld-tools, .af-bld-props { background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); padding: 16px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.af-bld-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--af-muted); margin: 14px 0 6px; }
.af-bld-group-title:first-of-type { margin-top: 0; }
.af-bld-tool { display: block; width: 100%; text-align: left; font: inherit; font-size: 14px; background: var(--af-white); border: 1px solid var(--af-line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; cursor: grab; }
.af-bld-tool:hover { border-color: var(--af-black); }
.af-bld-canvas { min-width: 0; }
.af-bld-paper { background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); padding: 24px; min-height: 420px; }
.af-bld-empty { text-align: center; color: var(--af-muted); padding: 60px 20px; border: 2px dashed var(--af-line-strong); border-radius: 12px; margin-bottom: 16px; }
.af-bld-card { border: 1px dashed var(--af-line-strong); border-radius: 12px; padding: 10px 12px 14px; background: #fafafa; cursor: pointer; height: 100%; }
.af-bld-card:hover, .af-bld-card.drop { border-color: var(--af-black); background: var(--af-white); }
.af-bld-card.active { border: 2px solid var(--af-black); background: var(--af-white); padding: 9px 11px 13px; }
.af-bld-card:focus-visible { outline: 3px solid rgba(10,10,10,.3); }
.af-bld-cardbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.af-bld-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--af-muted); }
.af-bld-ctrls { display: inline-flex; gap: 4px; }
.af-bld-ctrls button, .af-bld-mini { width: 30px; height: 30px; border: 1px solid var(--af-line); background: var(--af-white); border-radius: 7px; font-size: 13px; line-height: 1; cursor: pointer; }
.af-bld-ctrls button:hover, .af-bld-mini:hover { border-color: var(--af-black); }
.af-bld-ctrls button:disabled, .af-bld-mini:disabled { opacity: .35; cursor: default; }
.af-bld-h { font-size: 22px; font-weight: 700; }
.af-bld-p { color: var(--af-ink); white-space: pre-line; }
.af-bld-label { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.af-bld-flag { font-weight: 500; color: var(--af-muted); font-size: 12px; }
.af-bld-help { font-size: 12px; color: var(--af-muted); margin-bottom: 4px; }
.af-bld-input { border: 1px solid var(--af-line-strong); border-radius: 8px; min-height: 38px; padding: 8px 10px; color: #a1a1aa; font-size: 13px; background: var(--af-white); }
.af-bld-input.tall { min-height: 70px; }
.af-bld-opts { display: flex; flex-direction: column; gap: 4px; }
.af-bld-opt { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.af-bld-opt img { height: 28px; border-radius: 4px; }
.af-bld-correct { font-weight: 700; color: #166534; }
.af-bld-dot { width: 14px; height: 14px; border: 1px solid #a1a1aa; border-radius: 999px; display: inline-block; }
.af-bld-dot.sq { border-radius: 3px; }
.af-bld-stars { color: #d4d4d8; font-size: 22px; letter-spacing: 2px; }
.af-bld-scale { display: flex; flex-wrap: wrap; gap: 4px; }
.af-bld-scale span { min-width: 28px; height: 28px; border: 1px solid var(--af-line-strong); border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.af-bld-ph { color: var(--af-muted); font-size: 13px; padding: 14px; border: 1px dashed var(--af-line-strong); border-radius: 8px; text-align: center; }
.af-bld-img { max-width: 100%; border-radius: 8px; }
.af-bld-qimg { max-height: 90px; border-radius: 6px; margin-bottom: 6px; }
.af-bld-link { text-decoration: underline; font-weight: 600; }
.af-bld-submit { margin-top: 24px; display: flex; justify-content: flex-end; }
.af-bld-btn { background: var(--af-black); color: var(--af-white); border-radius: 10px; padding: 10px 22px; font-weight: 600; font-size: 14px; }
.af-bld-prop { margin-bottom: 14px; }
.af-bld-sep { border-top: 1px solid var(--af-line); margin: 16px 0; }
.af-bld-box { border: 1px solid var(--af-line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.af-bld-item { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.af-bld-item .form-control { flex: 1; }
.af-bld-correctbox { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.af-bld-optimg { margin: -2px 0 10px; padding-left: 8px; border-left: 2px solid var(--af-line); }
.af-bld-thumb { max-width: 100%; max-height: 120px; border-radius: 8px; display: block; margin-bottom: 8px; }
.af-bld-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; max-height: 220px; overflow-y: auto; }
.af-bld-gal-item { border: 1px solid var(--af-line); border-radius: 8px; padding: 2px; background: var(--af-white); cursor: pointer; }
.af-bld-gal-item:hover { border-color: var(--af-black); }
.af-bld-gal-item img { width: 100%; height: 64px; object-fit: cover; border-radius: 6px; }
.af-bld-maprow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.af-colors { display: flex; flex-wrap: wrap; gap: 16px; }
.af-colors label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.af-colors input[type="color"] { width: 44px; height: 36px; border: 1px solid var(--af-line-strong); border-radius: 8px; padding: 2px; background: var(--af-white); }
.af-imgw-25 { width: 25%; } .af-imgw-50 { width: 50%; } .af-imgw-75 { width: 75%; } .af-imgw-100 { width: 100%; }
a.disabled { pointer-events: none; opacity: .45; }
@media (max-width: 1100px) {
  .af-bld-cols { grid-template-columns: 1fr; }
  .af-bld-tools, .af-bld-props { position: static; max-height: none; }
  .af-bld-tools #bld-tools { display: flex; flex-wrap: wrap; gap: 6px; }
  .af-bld-tool { width: auto; margin: 0; }
  .af-bld-group-title { width: 100%; }
}
body:has(.af-builder) .af-support { display: none; }

/* ---------- templates ---------- */
.af-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.af-tpl-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); }
.af-tpl-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.af-tpl-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.af-tpl-actions form { display: inline; }
.af-num-sm { width: 90px; }

/* certificate designer */
.af-cert-designer { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.af-cert-preview { line-height: 0; border: 1px solid var(--af-line); border-radius: 10px; overflow: hidden; cursor: crosshair; }
.af-cert-svg { width: 100%; height: auto; display: block; }
.af-cert-items { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.af-cert-item { border: 1px solid var(--af-line-strong); background: var(--af-white); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.af-cert-item.active { background: var(--af-black); color: var(--af-white); border-color: var(--af-black); }
.af-cert-row { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 8px; }
@media (max-width: 991px) { .af-cert-designer { grid-template-columns: 1fr; } }
.af-check-col { width: 36px; }

/* my files */
.af-storage { gap: 8px; display: flex; flex-direction: column; }
.af-meter { width: 100%; height: 10px; border-radius: 999px; overflow: hidden; appearance: none; border: 0; background: var(--af-line); }
.af-meter::-webkit-progress-bar { background: var(--af-line); border-radius: 999px; }
.af-meter::-webkit-progress-value { background: var(--af-black); border-radius: 999px; }
.af-meter::-moz-progress-bar { background: var(--af-black); border-radius: 999px; }
.af-files-head { width: 100%; }
.af-files-head td { padding: 0 0 12px; }
.af-img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.af-img-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); cursor: pointer; font-size: 12px; }
.af-img-card:has(input:checked) { border: 2px solid var(--af-black); padding: 9px; }
.af-img-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--af-bg); border-radius: 8px; }
.af-img-check { position: absolute; top: 16px; left: 16px; z-index: 1; }
.af-img-meta { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.af-img-use { line-height: 1.3; }
.af-in-use { color: #92400e; }
.af-footer a { color: inherit; }
.af-footer-by { margin-top: 4px; font-size: 12px; }
.af-pre-wrap { position: relative; }
.af-pre-copy { position: absolute; top: 10px; right: 10px; }

/* app builder */
.af-ab-canvas { display: flex; justify-content: center; }
.af-phone { width: 390px; max-width: 100%; border: 10px solid #0a0a0a; border-radius: 42px; background: #0a0a0a; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.af-phone-screen { background: var(--a-bg); border-radius: 32px; min-height: 680px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 28px 16px; }
.af-phone-screen .row { --bs-gutter-x: 12px; }
.af-ab-block { position: relative; border-radius: 12px; outline: 1px dashed transparent; outline-offset: 4px; cursor: pointer; }
.af-ab-block:hover { outline-color: rgba(37,99,235,.5); }
.af-ab-block.active { outline: 2px solid #2563eb; }
.af-ab-bar { position: absolute; top: -16px; right: 2px; z-index: 2; display: flex; gap: 3px; }
.af-ab-btn { width: 26px; height: 26px; border: 1px solid var(--af-line-strong); background: #fff; border-radius: 7px; font-size: 13px; line-height: 1; padding: 0; }
.af-ab-btn:disabled { opacity: .35; }
.af-ab-icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.af-ab-icon { display: inline-flex; align-items: center; justify-content: center; height: 36px; border: 1px solid var(--af-line); background: #fff; border-radius: 8px; font-size: 11px; }
.af-ab-icon.active { border: 2px solid var(--af-black); }
.af-app-icon-prev { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--af-line); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: var(--af-bg); flex: none; }
.af-app-icon-prev img { width: 100%; height: 100%; object-fit: cover; }
.af-qr { width: 280px; max-width: 100%; height: auto; border: 1px solid var(--af-line); border-radius: 12px; image-rendering: pixelated; }
body:has(.af-app-builder) .af-support { display: none; }
.af-style-art-app { align-items: center; justify-content: center; }
.af-style-art-app > span { width: 64px; height: 100%; border: 3px solid #0a0a0a; border-radius: 12px; background: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px 6px; align-content: start; }
.af-style-art-app b { display: block; height: 20px; border-radius: 5px; background: #d4d4d8; }
.af-logo img { height: 30px; width: auto; display: block; }
.af-login-logo { height: 40px; width: auto; display: block; margin-bottom: 18px; }
.af-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.af-stats .af-card { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.af-stats strong { font-size: 22px; }

/* email builder */
.af-eb-subject { display: grid; grid-template-columns: auto 1fr 220px; gap: 10px; align-items: center; background: var(--af-white); border: 1px solid var(--af-line); border-radius: var(--af-radius); padding: 12px 16px; }
.af-eb-canvas { background: var(--e-bg, #f4f4f5); border-radius: var(--af-radius); padding: 24px 12px; }
.af-eb-mail { max-width: 600px; margin: 0 auto; background: var(--e-card, #fff); color: var(--e-text, #18181b); border-radius: 14px; padding: 28px; font-family: Arial, Helvetica, sans-serif; min-height: 300px; }
.af-eb-block { position: relative; border-radius: 8px; outline: 1px dashed transparent; outline-offset: 4px; cursor: pointer; margin-bottom: 14px; }
.af-eb-block:hover { outline-color: rgba(37,99,235,.5); }
.af-eb-block.active { outline: 2px solid #2563eb; }
.af-eb-h-lg { font-size: 25px; font-weight: bold; line-height: 1.25; margin: 0; }
.af-eb-h-md { font-size: 19px; font-weight: bold; line-height: 1.25; margin: 0; }
.af-eb-text { font-size: 15px; line-height: 1.6; margin: 0; white-space: pre-wrap; }
.af-eb-btn { display: inline-block; padding: 12px 24px; border-radius: 10px; font-weight: bold; font-size: 15px; background: var(--e-primary, #0a0a0a); color: var(--e-card, #fff); }
.af-eb-rate { display: flex; flex-wrap: wrap; gap: 6px; }
.af-eb-rate span { border: 1px solid #d4d4d8; border-radius: 8px; padding: 7px 11px; font-weight: bold; font-size: 14px; }
.af-eb-ans div { border-top: 1px solid #e4e4e7; padding: 8px 0; font-size: 14px; }
.af-eb-ans small { display: block; color: #71717a; font-size: 12px; }
.af-eb-img { max-width: 100%; height: auto; border-radius: 6px; }
.af-eb-var { background: #eef2ff; color: #3730a3; border-radius: 4px; padding: 0 3px; font-size: .92em; }
.af-send-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--af-line); border-radius: 10px; padding: 10px 12px; }
.af-send-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
body:has(.af-email-builder) .af-support { display: none; }
@media (max-width: 767px) { .af-eb-subject { grid-template-columns: 1fr; } }
.af-dt { width: auto; }
.af-contacts { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.af-group-list { display: flex; flex-direction: column; gap: 2px; }
.af-group-list a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--af-ink); font-size: 14px; }
.af-group-list a.active { background: var(--af-black); color: var(--af-white); }
.af-group-list a.active .af-muted { color: rgba(255,255,255,.7) !important; }
@media (max-width: 767px) { .af-contacts { grid-template-columns: 1fr; } }

/* analytics */
.af-chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.af-legend { font-size: 13px; color: var(--af-muted); display: inline-flex; align-items: center; gap: 6px; }
.af-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.af-lg-views { background: #d4d4d8; } .af-lg-resp { background: #0a0a0a; margin-left: 8px; }
.af-bars { display: flex; flex-direction: column; gap: 6px; }
.af-bar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.af-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-bar meter { width: 100%; height: 12px; }
.af-bar meter::-webkit-meter-bar { background: var(--af-line); border: 0; border-radius: 6px; height: 12px; }
.af-bar meter::-webkit-meter-optimum-value { background: var(--af-black); border-radius: 6px; }
.af-bar meter::-moz-meter-bar { background: var(--af-black); border-radius: 6px; }
.af-bar-num { text-align: right; white-space: nowrap; }
.af-q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.af-matrix-sum td, .af-matrix-sum th { font-size: 12px; padding: 6px 8px; }
.af-tpl-pic { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--af-line); background: var(--af-bg); display: block; }
.af-tpl-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--af-line); flex: none; }
