.ads-opt { --opt-border:rgba(148,163,184,.15); color:#e2e8f0; min-width:0; padding-bottom:16px; }
.ads-opt[hidden],.ads-opt [hidden] { display:none!important; }
.ads-opt__header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ads-opt h2 { font-size:20px; line-height:1.3; font-weight:750; margin:0; }
.ads-opt h3 { font-size:14px; line-height:1.35; font-weight:700; margin:0 0 5px; }
.ads-opt p { color:#94a3b8; font-size:12px; line-height:1.45; }
.ads-opt .ads-opt__eyebrow { color:#67d4ea; text-transform:uppercase; font-size:.7rem; font-weight:750; letter-spacing:.1em; }
.ads-opt__filters { display:flex; align-items:flex-end; flex-wrap:wrap; gap:8px 10px; padding:10px 0 6px; }
.ads-opt label { display:flex; flex-direction:column; gap:3px; color:#94a3b8; font-size:11.5px; font-weight:600; }
.ads-opt input,.ads-opt select { background:#111827; border:1px solid var(--opt-border); border-radius:6px; color:#e2e8f0; padding:5px 8px; font:inherit; min-height:30px; }
.ads-opt__filters select,.ads-opt__filters input[type="search"] { height:30px; font-size:12px; }
.ads-opt input:focus,.ads-opt select:focus,.ads-opt button:focus-visible { outline:2px solid #818cf8; outline-offset:3px; }
.ads-opt__search { flex:1; min-width:190px; }
.ads-opt__button { border:1px solid var(--opt-border); border-radius:6px; padding:5px 9px; min-height:28px; line-height:1.3; color:#cbd5e1; background:#182033; cursor:pointer; font-size:12px; font-weight:650; }
.ads-opt__button:hover { background:#263049; }
.ads-opt__button:disabled { opacity:.45; cursor:wait; }
.ads-opt__button.is-active,.ads-opt__button--primary { color:#e0e7ff; border-color:#6366f1; background:rgba(99,102,241,.2); }
.ads-opt__tabs,.ads-opt__actions { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.ads-opt__summary { display:grid; grid-template-columns:repeat(var(--ads-opt-summary-columns,3),minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.ads-opt__summary article { border:1px solid var(--opt-border); border-radius:8px; padding:8px 10px; background:#101625; }
.ads-opt__summary strong { display:block; font-size:18px; line-height:1.25; margin:3px 0 0; font-variant-numeric:tabular-nums; }
.ads-opt__summary strong.ads-opt__not-loaded { font-size:12px; color:#94a3b8; font-weight:500; }
.ads-opt__summary span,.ads-opt small { color:#94a3b8; font-size:11px; }
.ads-opt__summary .ads-opt__summary-partial { display:inline-block; color:#fbbf24; margin-left:6px; }
.ads-opt__panel { border:1px solid var(--opt-border); border-radius:9px; padding:10px; background:#0e1422; }
.ads-opt__table-wrap { overflow:auto; margin-top:8px; max-height:580px; }
.ads-opt table { width:100%; border-collapse:collapse; font-size:12px; }
.ads-opt th { color:#94a3b8; text-align:left; font-size:11px; background:#151e2e; position:sticky; top:0; z-index:1; }
.ads-opt td,.ads-opt th { padding:6px 8px; border-bottom:1px solid var(--opt-border); }
.ads-opt .ads-opt__table-wrap td { font-size:12px; line-height:1.3; }
.ads-opt .ads-opt__table-wrap th { font-size:11px; line-height:1.3; }
.ads-opt th button { color:inherit; border:0; background:none; cursor:pointer; font:inherit; white-space:nowrap; padding:0; }
.ads-opt td small { display:block; margin-top:2px; line-height:1.25; }
.ads-opt td:first-child { min-width:200px; }
.ads-opt tr:hover td { background:rgba(99,102,241,.035); }
.ads-opt .ads-opt__number { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.ads-opt__badge { display:inline-block; border-radius:4px; padding:3px 5px; font-size:10.5px; line-height:1.25; color:#cbd5e1; background:#253044; white-space:nowrap; }
.ads-opt__badge--alert { color:#fbbf24; background:rgba(251,191,36,.1); }
.ads-opt__badge--ok { color:#6ee7b7; background:rgba(16,185,129,.1); }
.ads-opt__profit-button { font:inherit; font-weight:700; color:inherit; background:none; border:0; border-bottom:1px dashed currentColor; padding:1px 0; cursor:pointer; }
.ads-opt__profit--positive { color:#6ee7b7; }
.ads-opt__profit--negative { color:#fca5a5; }
.ads-opt__profit--zero { color:#e2e8f0; }
.ads-opt__profit--unavailable { color:#94a3b8; }
.ads-opt__profit-status { margin-top:6px; padding:6px 10px; border-left:3px solid #67d4ea; background:rgba(103,212,234,.05); }
.ads-opt__profit-status.is-error { border-left-color:#fca5a5; }
.ads-opt__product-actions { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.ads-opt__product-actions .ads-opt__button { font-size:11px; min-height:26px; padding:4px 7px; }
.ads-opt .ads-opt__product-name { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; max-width:260px; }
.ads-opt .ads-opt__product-row > td:last-child small { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; max-width:180px; }
.ads-opt__expand { color:#a5b4fc; }
.ads-opt .ads-opt__campaign-child > td { padding:0 8px 8px; background:#0a1220; }
.ads-opt__campaigns { border:1px solid #334155; border-left:3px solid #818cf8; border-radius:0 0 6px 6px; padding:10px; }
.ads-opt__campaigns h4 { margin:0 0 5px; font-size:13px; line-height:1.3; }
.ads-opt__campaigns p { max-width:1000px; margin:4px 0; font-size:11.5px; line-height:1.35; }
.ads-opt__campaign-table { overflow:auto; }
.ads-opt .ads-opt__campaign-table th { position:static; }
.ads-opt .ads-opt__campaign-table td:first-child { min-width:200px; max-width:320px; white-space:normal; overflow-wrap:anywhere; }
.ads-opt__setting-button { display:inline-flex; align-items:center; gap:4px; font:inherit; font-weight:650; color:#93c5fd; background:rgba(59,130,246,.09); border:1px solid rgba(96,165,250,.35); border-radius:5px; padding:4px 6px; min-height:28px; cursor:pointer; }
.ads-opt__setting-button:hover { background:rgba(59,130,246,.2); border-color:#60a5fa; }
.ads-opt__setting-button:focus-visible { outline:2px solid #93c5fd; outline-offset:2px; }
.ads-opt__associated-products { margin:5px 0; padding-left:12px; font-size:11px; line-height:1.3; color:#cbd5e1; }
.ads-opt__campaign-visibility { display:flex; align-items:center; gap:8px; margin:5px 0; font-size:11.5px; color:#94a3b8; }
.ads-opt__campaign-visibility .ads-opt__button { padding:3px 8px; min-height:24px; font-size:11px; }
.ads-opt__campaign-products { margin-top:5px; }
.ads-opt__campaign-products > summary { display:inline-flex; align-items:center; list-style:none; min-height:24px; padding:3px 6px; font-size:11px; color:#a5b4fc; }
.ads-opt__campaign-products > summary::-webkit-details-marker { display:none; }
.ads-opt__campaign-products > summary:focus-visible { outline:2px solid #818cf8; outline-offset:2px; }
.ads-opt__campaign-products .ads-opt__sku-hide,.ads-opt__campaign-products[open] .ads-opt__sku-show { display:none; }
.ads-opt__campaign-products[open] .ads-opt__sku-hide { display:inline; }
.ads-opt__campaign-actions { min-width:120px; }
.ads-opt__campaign-actions .ads-opt__button { margin:3px 3px 3px 0; }
.ads-opt .ads-opt__campaign-actions small { white-space:normal; max-width:240px; }
.ads-opt__empty { padding:30px!important; text-align:center; color:#94a3b8; }
.ads-opt__status { min-height:1.4em; margin:0 0 5px; overflow:visible; overflow-wrap:anywhere; }
.ads-opt__load-state { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-height:50px; }
.ads-opt__loading-dot { width:9px; height:9px; flex:none; border-radius:50%; background:#818cf8; animation:ads-opt-pulse 1.4s ease-in-out infinite; }
@keyframes ads-opt-pulse { 50% { opacity:.3; } }
@media(prefers-reduced-motion:reduce) { .ads-opt__loading-dot { animation:none; } }
.ads-opt__status.is-error,#ads-opt-edit-status.is-error { color:#fca5a5; }
.ads-opt__budget-input { width:105px; }
.ads-opt__notice { padding:14px 16px; border-left:3px solid #818cf8; background:rgba(99,102,241,.08); margin-top:16px; }
.ads-opt__dialog { position:fixed; inset:0; margin:auto; width:min(700px,calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; border:1px solid #475569; border-radius:16px; padding:26px; background:#111827; color:#e2e8f0; }
.ads-opt__dialog::backdrop { background:rgba(2,6,23,.75); }
.ads-opt__dialog h3 { overflow-wrap:anywhere; font-size:18px; margin-bottom:8px; }
.ads-opt__dialog p { font-size:13px; line-height:1.55; }
.ads-opt__dialog label { font-size:12.5px; gap:7px; }
.ads-opt__dialog input,.ads-opt__dialog select { min-height:40px; padding:10px 12px; font-size:13px; }
.ads-opt__dialog .ads-opt__button { min-height:36px; padding:8px 12px; font-size:12.5px; }
.ads-opt__edit-pair { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:12px 0; border-bottom:1px solid var(--opt-border); }
.ads-opt__edit-pair label { min-width:0; margin:0; }
.ads-opt__edit-pair input,.ads-opt__edit-pair select { width:100%; }
.ads-opt__edit-pair output { display:flex; align-items:center; min-height:40px; padding:10px 12px; border:1px solid var(--opt-border); border-radius:9px; background:#0b1220; color:#e2e8f0; font-size:.9rem; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ads-opt__config-status.is-error { color:#fca5a5; }
.ads-opt__dialog .ads-opt__actions { justify-content:flex-end; margin-bottom:0; }
@media(max-width:520px) { .ads-opt__dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 20px); padding:18px; } .ads-opt__edit-pair { grid-template-columns:1fr; gap:12px; } .ads-opt__dialog .ads-opt__actions .ads-opt__button { flex:1 1 auto; } }
.ads-change-events { margin-top:12px; font-size:.78rem; color:#a5b4fc; }
.ads-change-events__list { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; padding:0; list-style:none; }
.ads-change-events li { background:rgba(99,102,241,.08); border:1px solid rgba(99,102,241,.2); border-radius:7px; padding:7px 10px; }
.ads-change-events__event { display:flex; gap:8px; }
.ads-change-events__flag { color:#fbbf24; font-size:1.2rem; }
.ads-change-events__meta,.ads-change-events__note { color:#94a3b8; }
@media(max-width:800px) { .ads-opt__summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .ads-opt__panel { padding:8px; } .ads-opt__filters label { flex:1; } .ads-opt__tabs .ads-opt__button { flex:1 1 40%; } }
#ads-opt-profit-tooltip[hidden] { display:none!important; }
.ads-opt__profit-tooltip { position:fixed; z-index:10000; box-sizing:border-box; width:min(360px,calc(100vw - 16px)); max-height:calc(100dvh - 16px); overflow:auto; margin:0; padding:12px; border:1px solid #475569; border-radius:8px; background:#111827; color:#e2e8f0; box-shadow:0 10px 30px rgba(0,0,0,.45); font:12px/1.4 Arial,sans-serif; }
.ads-opt__profit-tooltip h4 { margin:0; font-size:13px; font-weight:700; line-height:1.35; overflow-wrap:anywhere; color:#e2e8f0; }
.ads-opt__profit-tooltip p { margin:4px 0; color:#94a3b8; font-size:11.5px; line-height:1.4; }
.ads-opt__profit-tooltip dl { margin:8px 0; }
.ads-opt__profit-tooltip dl > div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:3px 0; }
.ads-opt__profit-tooltip dt,.ads-opt__profit-tooltip dd { margin:0; }
.ads-opt__profit-tooltip dd { white-space:nowrap; text-align:right; font-variant-numeric:tabular-nums; }
.ads-opt__profit-tooltip .ads-opt__profit-tooltip-result { border-top:1px solid #475569; margin-top:5px; padding-top:6px; font-weight:700; }
.ads-opt__profit-tooltip .ads-opt__profit-tooltip-note { color:#94a3b8; font-size:11.5px; }
