/* URL Builder tab (url-builder.js) — uses the hub's tokens from index.html */
.ub-panel { margin-bottom: 20px; }
.ub-body { padding: 18px 20px 16px; }
.ub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.ub-grid.ub-aff { grid-template-columns: repeat(2, 1fr); margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
@media (max-width: 900px) { .ub-grid, .ub-grid.ub-aff { grid-template-columns: 1fr; } }
.ub-field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; font-family: var(--mono); }
.ub-field label b { color: var(--neg); }
.ub-field input, .ub-field select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-family: var(--mono); font-size: 13px; }
.ub-field input + input, .ub-field select + input { margin-top: 8px; }
.ub-field input:focus, .ub-field select:focus { outline: none; border-color: var(--ink); }
.ub-field input::placeholder { color: var(--faint); }
.ub-note { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.55; max-width: 88ch; }
.ub-note code, .ub-url { font-family: var(--mono); }
.ub-note code { background: var(--line2); border-radius: 5px; padding: 1px 5px; font-size: 11.5px; color: var(--ink); }
.ub-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.ub-hint { font-size: 12.5px; padding: 6px 12px; border-radius: 20px; color: #0e7d63; background: #dcf5ec; }
.ub-hint.warn { color: #8a5a12; background: #fdf0d8; }
.ub-btn { background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 7px 12px; font: 600 12.5px var(--sans); cursor: pointer; white-space: nowrap; }
.ub-btn:hover { border-color: var(--ink); }
.ub-btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.ub-btn.copied { background: var(--live); border-color: var(--live); color: #fff; }
.ub-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.ub-sel { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.ub-sel span { font-weight: 500; color: var(--faint); font-family: var(--mono); font-size: 11.5px; }
.ub-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ub-row { display: grid; grid-template-columns: 18px 190px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--line2); }
.ub-row:last-child { border-bottom: none; }
.ub-row input { width: 15px; height: 15px; accent-color: var(--ink); }
.ub-name { font-size: 13px; font-weight: 600; min-width: 0; }
.ub-name small { display: block; font: 500 10.5px var(--mono); color: var(--faint); margin-top: 2px; overflow-wrap: anywhere; }
.ub-adtag { display: inline-block; margin-top: 4px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #8a5a12; background: #fdf0d8; border-radius: 20px; padding: 1px 7px; }
.ub-adtag[hidden] { display: none; }
.ub-name .bdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.ub-url { font-size: 12px; color: var(--muted); background: var(--line2); border-radius: 7px; padding: 7px 10px; overflow-x: auto; white-space: nowrap; }
.ub-url .t-utm { color: #0e7d63; }
.ub-url .t-aff { color: #b0562a; }
.ub-row.off .ub-name, .ub-row.off .ub-url { opacity: 0.45; }
@media (max-width: 720px) {
  .ub-row { grid-template-columns: 18px minmax(0, 1fr); padding: 11px 16px; }
  .ub-row .ub-url, .ub-row .ub-btn { grid-column: 1 / -1; }
}

/* Email Images tab (email-images.js) — reuses the ub-* form styles above */
.ub-grid.ei-new { grid-template-columns: 1fr 2fr; }
.ei-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.ei-img { width: 100%; max-height: 220px; object-fit: contain; border: 1px solid var(--line); border-radius: 9px; background: var(--line2); }
.ei-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.ei-row { display: flex; gap: 8px; align-items: center; }
.ei-row > :first-child { flex: 1; min-width: 0; }
.ei-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ei-del { color: var(--neg); }
@media (max-width: 900px) { .ub-grid.ei-new, .ei-body { grid-template-columns: 1fr; } }
