#abTestView { padding: 20px 16px 40px; color: #182439; background: #f7f9fb; min-height: 70vh; }
body .appHeader:has(#abTestTab) { grid-template-columns: 120px minmax(0,1fr) minmax(260px,320px); }
body .appHeader:has(#abTestTab) .tabButton { padding-left: 12px; padding-right: 12px; white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1700px) {
  body .appHeader:has(#abTestTab) { grid-template-columns: 120px minmax(0,1fr); gap: 4px 16px; padding-top: 8px; padding-bottom: 6px; }
  body .appHeader:has(#abTestTab) .tabs { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; justify-content: flex-start; min-width: 0; width: 100%; }
  body .appHeader:has(#abTestTab) .accountArea { grid-column: 2; grid-row: 1; }
  body .appHeader:has(#abTestTab) #accountLabel { max-width: 240px; }
}
@media (max-width: 600px) {
  body .appHeader:has(#abTestTab) { grid-template-columns: 100px minmax(0,1fr); padding-left: 12px; padding-right: 12px; gap: 4px 8px; }
  body .appHeader:has(#abTestTab) .tabButton { padding-left: 8px; padding-right: 8px; font-size: 13px; }
  body .appHeader:has(#abTestTab) #accountLabel { max-width: 95px; }
  body .appHeader:has(#abTestTab) .accountArea { gap: 4px; }
}
#abTestView * { box-sizing: border-box; letter-spacing: 0; }
#abTestView #abSetup { display: block; width: 100%; max-width: none; margin: 0; padding: 0; }
#abTestView h1 { font-size: 26px; margin: 0; }
#abTestView h2 { font-size: 18px; margin: 0 0 16px; }
#abTestView button, #abTestView input, #abTestView select { font-family: inherit; font-size: 14px; }
#abTestView button { min-height: 38px; border-radius: 6px; padding: 8px 14px; white-space: normal; }
#abTestView button.secondary { color: #1859ac; background: #fff; border: 1px solid #bcccdc; }
#abTestView button:disabled { opacity: .5; cursor: default; }
#abTestView input:not([type=file]), #abTestView select { width: 100%; border: 1px solid #aebed0; border-radius: 5px; background: white; color: #182439; min-height: 40px; padding: 8px 10px; }
#abTestView label { display: grid; gap: 7px; color: #425368; font-size: 13px; }
#abTestView small { display: block; color: #637184; font-size: 12px; font-weight: 400; margin-top: 5px; }
.ab-top, .ab-section-head, .ab-detail-heading, .ab-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.ab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ab-muted { color: #647286; font-size: 13px; line-height: 1.5; }
.ab-error, .ab-notice { padding: 12px 16px; line-height: 1.5; border-left: 3px solid #b87512; background: #fff5df; color: #664818; font-size: 14px; overflow-wrap: anywhere; }
.ab-error { border-color: #c23344; background: #fff0f1; color: #a32335; }
.ab-section { padding: 24px 0; border-top: 1px solid #dbe3eb; }
.ab-section h2 { margin-bottom: 16px; }
.ab-steps { display: flex; gap: 28px; padding: 12px 0 20px; font-size: 14px; color: #778294; }
.ab-steps strong { color: #1859ac; }
.ab-search { max-width: 720px; }
.ab-product-results { max-height: 245px; overflow: auto; max-width: 900px; margin-top: 12px; border-bottom: 1px solid #dbe3eb; }
#abTestView .ab-product-result { display: flex; width: 100%; height: auto; min-height: 78px; text-align: left; gap: 14px; align-items: center; background: transparent; color: #182439; border: 0; border-radius: 0; border-bottom: 1px solid #e0e6ec; }
#abTestView .ab-product-result:hover { background: #e9f1fb; }
.ab-product-result img, .ab-product-line img { height: 60px; width: 48px; object-fit: contain; flex: 0 0 auto; }
.ab-product-result span { min-width: 0; overflow-wrap: anywhere; }
.ab-product-line { display: flex; gap: 14px; align-items: center; min-width: 0; max-width: 620px; }
.ab-product-line strong { font-size: 14px; overflow-wrap: anywhere; }
.ab-product-line h2 { font-size: 18px; margin: 0 0 6px !important; }
.ab-selected { margin-top: 18px; }
.ab-variants { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; max-width: 1150px; }
.ab-variant { min-width: 0; border: 1px solid #d4dee8; border-radius: 6px; background: white; overflow: hidden; }
.ab-variant > img { display: block; width: 100%; height: 170px; object-fit: contain; padding: 10px; background: #fff; }
.ab-variant > div { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 10px; font-size: 13px; border-top: 1px solid #e7ecf1; flex-wrap: wrap; }
#abTestView .ab-icon { min-height: 28px; width: 28px; height: 28px; padding: 0; font-size: 21px; }
.ab-upload { max-width: 400px; margin-top: 16px; }
.ab-upload input { max-width: 100%; }
.ab-fields { display: grid; grid-template-columns: 130px 260px 180px 180px; gap: 20px; max-width: 100%; }
.ab-footer { padding: 20px 0; border-top: 1px solid #dbe3eb; display: flex; justify-content: flex-end; }
.ab-campaign-label { max-width: 950px; margin-bottom: 18px; }
.ab-campaign-label select { text-overflow: ellipsis; }
.ab-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #dbe3eb; }
#abTestView .ab-table { width: 100%; min-width: 820px; border-collapse: collapse; table-layout: auto; font-size: 13px; }
#abTestView .ab-table th, #abTestView .ab-table td { text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid #dbe3eb; background: white; vertical-align: middle; color: #253247; }
#abTestView .ab-table thead th { color: #5a6b7e; background: #f0f4f8; font-weight: 600; white-space: nowrap; font-size: 12px; text-transform: none; }
#abTestView .ab-table td:first-child { max-width: 400px; }
#abTestView .ab-round-metrics { min-width: 1640px; }
#abTestView .ab-round-metrics td { white-space: nowrap; font-variant-numeric: tabular-nums; }
#abTestView .ab-round-metrics tr:nth-child(2n) td,
#abTestView .ab-round-metrics tr:nth-child(2n) th { border-bottom: 2px solid #b7c9da; }
.ab-status { padding: 4px 8px; border-radius: 4px; background: #e8edf3; color: #526176; font-size: 12px; white-space: nowrap; }
.ab-running, .ab-completed { color: #087153; background: #def4ec; }
.ab-applying, .ab-warming, .ab-restoring, .ab-starting { color: #135ec5; background: #e4edfe; }
.ab-attention, .ab-failed { color: #b12f40; background: #ffeaee; }
.ab-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; padding: 20px 0 26px; margin: 22px 0; border-top: 1px solid #dbe3eb; border-bottom: 1px solid #dbe3eb; }
.ab-summary strong { display: block; margin-top: 8px; font-size: 18px; overflow-wrap: anywhere; }
.ab-leading { border-color: #139773; }
.ab-variant meter { display: block; width: calc(100% - 20px); margin: 0 10px 10px; height: 12px; accent-color: #149675; }
.ab-empty { padding: 64px 0; border-top: 1px solid #dbe3eb; text-align: center; color: #778294; }
.ab-section time { color: #6e7c8e; margin-right: 14px; font-size: 12px; }
#abTestView .ab-danger { color: #b03142; }
@media (max-width: 1000px) {
  .ab-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ab-variants { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ab-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  #abTestView { padding: 16px 12px; }
  .ab-top, .ab-detail-heading { align-items: flex-start; flex-direction: column; }
  .ab-variants { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .ab-steps { gap: 14px; font-size: 12px; }
  .ab-fields { grid-template-columns: 1fr; gap: 14px; }
  .ab-summary { gap: 16px; }
  .ab-summary strong { font-size: 16px; }
}
