/* ============================================================
   Pipeline Buster v1.1 — Admin Styles
   Brand: bold teal accent (#00b4a0), dark slate (#1e2d3d)
   ============================================================ */

:root {
    --pb-primary   : #00b4a0;
    --pb-primary-d : #009688;
    --pb-dark      : #1e2d3d;
    --pb-light     : #f4f8fb;
    --pb-border    : #dde3ea;
    --pb-text      : #2c3e50;
    --pb-muted     : #7f8c9a;
    --pb-success   : #27ae60;
    --pb-warning   : #e67e22;
    --pb-yellow    : #f0c429;
    --pb-hero      : #0d4740;
    --pb-radius    : 8px;
    --pb-shadow    : 0 2px 12px rgba(0,0,0,.08);
}

/* ---- Wrap ---- */
.pb-wrap { max-width: 1400px; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }

/* ---- Header ---- */
.pb-header {
    background: var(--pb-dark);
    border-radius: var(--pb-radius);
    margin-bottom: 20px;
    padding: 0 24px;
}
.pb-header-inner {
    display: flex;
    align-items: center;
    padding: 16px 0 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.pb-brand { display: flex; align-items: center; gap: 14px; }
.pb-rocket { font-size: 32px; }
.pb-title  { color: #fff; font-size: 22px; margin: 0; font-weight: 700; line-height: 1.2; }
.pb-tagline { color: var(--pb-primary); margin: 2px 0 0; font-size: 13px; }

/* Mode row — own section below brand */
.pb-mode-row {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 0;
}
.pb-mode-label  { color: #aaa; font-size: 12px; margin-right: 2px; }
.pb-mode-desc   { color: #666; font-size: 12px; margin-left: 6px; }
.pb-mode-btn {
    padding: 5px 14px; border-radius: 20px; border: 1px solid #444;
    background: transparent; color: #aaa; cursor: pointer; font-size: 12px;
    transition: all .15s;
}
.pb-mode-btn.active { background: var(--pb-primary); border-color: var(--pb-primary); color: #fff; }
.pb-mode-btn:hover:not(.active) { border-color: #888; color: #fff; }
.pb-mode-row--locked .pb-mode-btn { opacity: 0.45; pointer-events: none; }

/* ---- Steps ---- */
.pb-steps {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px; padding: 0 4px;
}
.pb-step {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 16px; border-radius: 20px;
    font-size: 13px; font-weight: 600; color: var(--pb-muted);
    background: #f0f0f1; transition: all .2s;
}
.pb-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #ccc; color: #fff; font-size: 11px;
}
.pb-step.active { color: var(--pb-primary); background: #e6f7f5; }
.pb-step.active .pb-step-num { background: var(--pb-primary); }
.pb-step.done   { color: var(--pb-hero); background: #e6eeec; }
.pb-step.done .pb-step-num { background: var(--pb-hero); }
.pb-step-arrow  { color: #ccc; font-size: 18px; }

/* ---- Card ---- */
.pb-card {
    background: #fff; border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius); padding: 24px;
    margin-bottom: 16px; box-shadow: var(--pb-shadow);
}
.pb-card h2 {
    margin: 0 0 6px; font-size: 16px; color: var(--pb-dark);
    border-bottom: 2px solid var(--pb-primary);
    padding-bottom: 10px; margin-bottom: 18px;
    display: inline-block;
}
.pb-hint { color: var(--pb-muted); font-size: 13px; margin: -10px 0 16px; }

/* ---- Dropzone ---- */
.pb-dropzone {
    border: 2px dashed var(--pb-border); border-radius: var(--pb-radius);
    padding: 40px 24px; text-align: center; background: var(--pb-light);
    cursor: pointer; transition: border-color .2s, background .2s;
    margin-bottom: 12px;
}
.pb-dropzone:hover, .pb-dropzone.over {
    border-color: var(--pb-primary); background: #e6f7f5;
}
.pb-drop-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.pb-dropzone p { color: var(--pb-muted); margin: 0 0 14px; }
.pb-browse-btn {
    display: inline-block; padding: 8px 20px;
    background: var(--pb-primary); color: #fff; border: none;
    border-radius: 4px; cursor: pointer; font-size: 13px;
    font-weight: 600; transition: background .15s;
}
.pb-browse-btn:hover { background: var(--pb-primary-d); }
.pb-browse-btn.disabled {
    opacity: .45; cursor: not-allowed; pointer-events: none;
    background: var(--pb-muted);
}

/* ---- Size bar ---- */
.pb-size-bar {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--pb-muted);
    padding: 4px 2px; margin-bottom: 8px;
}

/* ---- Preview grid ---- */
.pb-preview-grid {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px;
}

/* ---- Image role legend ---- */
.pb-img-legend {
    display: flex; align-items: center; gap: 16px;
    font-size: 11px; color: var(--pb-muted); margin-bottom: 14px;
}
.pb-legend-item { display: flex; align-items: center; gap: 5px; }
.pb-legend-dot {
    display: inline-block; width: 9px; height: 9px;
    border-radius: 50%; flex-shrink: 0;
}
.pb-legend-dot--green  { background: var(--pb-hero); }
.pb-legend-dot--teal   { background: var(--pb-primary); }
.pb-legend-dot--yellow { background: var(--pb-yellow); }
.pb-thumb {
    position: relative; width: 100px; height: 100px;
    border-radius: 6px; overflow: hidden;
    border: 3px solid transparent; cursor: pointer;
    transition: border-color .15s; flex-shrink: 0;
}
.pb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-thumb:hover { border-color: var(--pb-primary); }
.pb-thumb.hero   { border-color: var(--pb-hero); }
.pb-thumb.howto  { border-color: var(--pb-primary); }
.pb-thumb.manual { border-color: var(--pb-yellow); }
/* Hero always overrides other position labels */
.pb-thumb.hero.howto,
.pb-thumb.hero.manual { border-color: var(--pb-hero); }

.pb-hero-label,
.pb-howto-label,
.pb-manual-label {
    display: none; position: absolute; bottom: 0; left: 0; right: 0;
    font-size: 10px; font-weight: 700; text-align: center;
    padding: 2px; text-transform: uppercase; letter-spacing: .5px; color: #fff;
}
.pb-hero-label   { background: rgba(13,71,64,.92); }
.pb-howto-label  { background: rgba(0,180,160,.88); }
.pb-manual-label { background: rgba(204,163,0,.90); color: #fff; }

.pb-thumb.hero   .pb-hero-label   { display: block; }
.pb-thumb.howto  .pb-howto-label  { display: block; }
.pb-thumb.manual .pb-manual-label { display: block; }
/* Hero overrides other labels */
.pb-thumb.hero.howto  .pb-howto-label,
.pb-thumb.hero.manual .pb-manual-label { display: none; }

.pb-remove-thumb {
    display: none; position: absolute; top: 3px; right: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(0,0,0,.6); color: #fff; border: none;
    font-size: 12px; cursor: pointer; line-height: 18px; text-align: center; padding: 0;
}
.pb-thumb:hover .pb-remove-thumb { display: block; }

/* ---- Generate options ---- */
.pb-options-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
    background: var(--pb-light); border-radius: var(--pb-radius);
    padding: 20px; margin-bottom: 16px; border: 1px solid var(--pb-border);
}
.pb-option-group > label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 10px; color: var(--pb-dark); }
.pb-pill-group { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pb-pill {
    padding: 5px 14px; border-radius: 20px; border: 1px solid var(--pb-border);
    background: #fff; color: var(--pb-text); font-size: 12px;
    cursor: pointer; transition: all .15s; font-weight: 500;
}
.pb-pill:hover  { border-color: var(--pb-primary); color: var(--pb-primary); }
.pb-pill.active { background: var(--pb-primary); border-color: var(--pb-primary); color: #fff; }
.pb-pill--locked { opacity: .55; cursor: default; border-style: dashed; }
.pb-pill--locked:hover { border-color: var(--pb-border); color: var(--pb-text); }
.pb-pill-badge { display: inline-block; font-size: 9px; font-weight: 700; background: var(--pb-muted); color: #fff; border-radius: 3px; padding: 1px 4px; margin-left: 5px; vertical-align: middle; letter-spacing: .3px; }
.pb-option-desc { font-size: 12px; color: var(--pb-muted); margin: 0; min-height: 16px; }
.pb-custom-style {
    margin-top: 8px; font-size: 13px;
    border: 1px solid var(--pb-border); border-radius: 4px; padding: 8px;
}

.pb-language-select {
    font-size: 13px; padding: 5px 8px;
    border: 1px solid var(--pb-border); border-radius: 4px;
    background: #fff; color: var(--pb-dark);
    min-width: 160px; cursor: pointer;
}

.pb-generate-bar {
    display: flex; justify-content: flex-end;
    padding-top: 12px;
}
.pb-hero-hint { font-size: 12px; color: var(--pb-muted); margin: 4px 0 14px; }

/* ---- Buttons ---- */
.pb-btn-primary {
    padding: 10px 24px; background: var(--pb-primary); color: #fff;
    border: none; border-radius: 5px; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background .15s; line-height: 1.4;
}
.pb-btn-primary:hover { background: var(--pb-primary-d); }
.pb-btn-primary:disabled { opacity: .5; cursor: default; }
.pb-btn-secondary {
    padding: 10px 20px; background: transparent; color: var(--pb-dark);
    border: 1px solid var(--pb-border); border-radius: 5px;
    font-size: 13px; cursor: pointer; transition: all .15s;
}
.pb-btn-secondary:hover { border-color: var(--pb-dark); }

/* ---- Processing ---- */
.pb-processing { text-align: center; padding: 24px 24px 48px; }
.pb-spinner-wrap { margin-bottom: 20px; }
.pb-spinner {
    display: inline-block; width: 44px; height: 44px;
    border: 4px solid var(--pb-border);
    border-top-color: var(--pb-primary);
    border-radius: 50%; animation: pb-spin 1s linear infinite;
}
@keyframes pb-spin { to { transform: rotate(360deg); } }
.pb-processing h3 { margin: 0 0 6px; font-size: 16px; color: var(--pb-dark); }
.pb-processing-sub { color: var(--pb-muted); font-size: 13px; margin: 0 0 20px; }
.pb-processing-bar {
    width: 200px; height: 4px; background: var(--pb-border);
    border-radius: 2px; overflow: hidden; margin: 0 auto;
}
.pb-processing-fill {
    height: 100%; background: var(--pb-primary); border-radius: 2px;
    animation: pb-pulse 2s ease-in-out infinite;
}
@keyframes pb-pulse { 0%,100%{width:15%} 50%{width:85%} }

/* ---- AI Summary (simple mode) ---- */
.pb-ai-summary {
    background: var(--pb-light); border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius); padding: 16px; margin: 16px 0;
}
.pb-ai-summary h4 {
    margin: 0 0 12px; font-size: 11px; text-transform: uppercase;
    letter-spacing: .6px; color: var(--pb-muted);
}
.pb-ai-block { margin-bottom: 10px; font-size: 13px; }
.pb-ai-block strong { display: block; color: var(--pb-dark); margin-bottom: 2px; }
.pb-ai-block p { margin: 0; color: var(--pb-muted); }
.pb-ai-note { border-left: 3px solid var(--pb-warning); padding-left: 10px; }
.pb-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Review grid (expert) ---- */
.pb-review-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 1100px) { .pb-review-grid { grid-template-columns: 1fr; } }

/* ---- Form fields ---- */
.pb-field { margin-bottom: 14px; }
.pb-field > label {
    display: block; font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: .4px;
    color: var(--pb-muted); margin-bottom: 5px;
}
.pb-field-row { display: flex; gap: 12px; margin-bottom: 14px; }
.pb-field-row .pb-field { flex: 1; margin-bottom: 0; }
.pb-short-field { width: 100% !important; }
.pb-char-count { font-size: 11px; color: var(--pb-muted); font-weight: normal; margin-left: 8px; }
.pb-char-count.over { color: #e74c3c; }

/* ---- Category picker ---- */
.pb-category-picker {
    display: flex; flex-wrap: wrap; gap: 6px;
    max-height: 140px; overflow-y: auto;
    border: 1px solid var(--pb-border); border-radius: 4px; padding: 10px;
}
.pb-category-picker label {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: normal; cursor: pointer;
    white-space: nowrap; padding: 3px 6px;
    border-radius: 3px; transition: background .1s;
}
.pb-category-picker label:hover { background: var(--pb-light); }

/* ---- Action bar ---- */
.pb-action-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius); padding: 14px 20px;
    box-shadow: var(--pb-shadow);
}
.pb-action-left { display: flex; align-items: center; gap: 12px; }
.pb-start-over-link {
    background: none; border: none; padding: 0;
    color: var(--pb-muted); font-size: 12px; cursor: pointer;
    text-decoration: underline; transition: color .15s;
}
.pb-start-over-link:hover { color: var(--pb-text); }

/* ---- Notice ---- */
.pb-notice {
    border-left: 4px solid #3498db; background: #eaf4fc;
    padding: 10px 14px; border-radius: 0 4px 4px 0;
    font-size: 13px; margin-top: 12px;
}
.pb-notice strong { display: block; margin-bottom: 4px; }

/* ---- Success ---- */
.pb-success-card { text-align: center; padding: 48px 24px; }
.pb-success-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--pb-success); color: #fff;
    font-size: 32px; margin-bottom: 16px;
}
.pb-success-card h2 { display: block; border: none; font-size: 22px; margin-bottom: 6px; }
.pb-success-status { color: var(--pb-muted); font-size: 14px; margin-bottom: 20px; }
.pb-success-links { margin: 0 0 28px; }
.pb-success-links a {
    display: inline-block; margin: 5px;
    padding: 8px 18px; border-radius: 4px;
    border: 1px solid var(--pb-primary); color: var(--pb-primary);
    text-decoration: none; font-size: 13px; transition: all .15s;
}
.pb-success-links a:hover { background: var(--pb-primary); color: #fff; }

/* ---- Input Mode tabs (Standard vs Guide Mode) ---- */
.pb-input-mode-row {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px; padding-bottom: 16px;
    border-bottom: 1px solid var(--pb-border);
    flex-wrap: wrap;
}
.pb-input-mode-label { font-weight: 700; font-size: 13px; color: var(--pb-dark); white-space: nowrap; }
.pb-input-mode-tabs  { display: flex; gap: 8px; }
.pb-input-tab {
    padding: 8px 18px; border-radius: 6px;
    border: 2px solid var(--pb-border);
    background: #fff; color: var(--pb-muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .15s;
}
.pb-input-tab:hover { border-color: var(--pb-primary); color: var(--pb-primary); }
.pb-input-tab.active {
    background: var(--pb-primary); border-color: var(--pb-primary);
    color: #fff;
}

/* ---- Guide Mode product selector ---- */
.pb-guide-product-wrap {
    background: #f0fbf9; border: 1px solid #b2e4dd;
    border-radius: var(--pb-radius); padding: 16px 18px;
    margin-bottom: 20px;
}
.pb-guide-product-label {
    display: block; font-weight: 700; font-size: 13px;
    color: var(--pb-dark); margin-bottom: 10px;
}
.pb-optional { font-weight: 400; color: var(--pb-muted); font-size: 12px; margin-left: 4px; }
.pb-product-search-wrap { position: relative; }
.pb-product-search-input {
    border: 1px solid var(--pb-border) !important;
    border-radius: 4px !important; padding: 8px 12px !important;
    font-size: 13px !important; background: #fff !important;
}
.pb-product-search-input:focus { border-color: var(--pb-primary) !important; outline: none; }
.pb-product-results {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
    background: #fff; border: 1px solid var(--pb-border);
    border-top: none; border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    max-height: 200px; overflow-y: auto;
}
.pb-product-result-item {
    padding: 9px 12px; font-size: 13px; cursor: pointer;
    border-bottom: 1px solid var(--pb-border); transition: background .1s;
}
.pb-product-result-item:last-child { border-bottom: none; }
.pb-product-result-item:hover { background: var(--pb-light); color: var(--pb-primary); }
.pb-product-selected {
    display: flex; align-items: center; gap: 8px;
    margin-top: 8px; padding: 7px 12px;
    background: #fff; border: 1px solid #b2e4dd;
    border-radius: 4px; font-size: 13px; font-weight: 600;
    color: var(--pb-dark);
}
.pb-product-clear {
    background: none; border: none; cursor: pointer;
    color: var(--pb-muted); font-size: 16px; line-height: 1;
    padding: 0 2px; transition: color .15s;
}
.pb-product-clear:hover { color: #e74c3c; }

/* ---- Template section ---- */
.pb-template-section {
    padding: 16px 0 4px;
    border-top: 1px solid var(--pb-border);
    margin-top: 4px;
}
.pb-template-label {
    display: block; font-weight: 700; font-size: 13px;
    color: var(--pb-dark); margin-bottom: 10px;
}

/* ---- Guide Mode review grid (single column) ---- */
.pb-guide-mode-grid { grid-template-columns: 1fr !important; }

/* ---- Guide Mode linked product badge (in How To card) ---- */
.pb-guide-product-badge {
    display: flex; align-items: center; gap: 8px;
    background: #f0fbf9; border: 1px solid #b2e4dd;
    border-radius: 4px; padding: 8px 12px;
    margin-bottom: 16px; font-size: 13px;
}
.pb-badge-label { color: var(--pb-muted); font-weight: 600; }
.pb-badge-name  { color: var(--pb-primary); font-weight: 700; }

/* ---- Upload progress bar ---- */
.pb-upload-progress { margin: 8px 0; text-align: center; }
.pb-upload-bar-wrap {
    height: 4px; background: var(--pb-border);
    border-radius: 2px; overflow: hidden; margin: 0 auto 4px; max-width: 520px;
}
.pb-upload-bar-fill {
    height: 100%; background: var(--pb-primary);
    border-radius: 2px; transition: width .2s;
    width: 0%;
}
#pb-upload-status { font-size: 12px; color: var(--pb-muted); margin: 0; }

/* ---- Page banner (always visible, top of page) ---- */
.pb-page-banner-wrap {
    text-align: center;
    padding: 20px 0 12px;
}
.pb-page-banner {
    display: inline-block;
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 6px;
    opacity: .92;
}

/* ---- Wait state banner (legacy — unused) ---- */
.pb-wait-banner {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin: 20px auto 40px;
    border-radius: 6px;
    opacity: .92;
}

/* ---- Template skeleton cards ---- */
.pb-template-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
@media (max-width: 900px) {
    .pb-template-cards { grid-template-columns: repeat(2, 1fr); }
}
.pb-template-card {
    border: 2px solid var(--pb-border);
    border-radius: var(--pb-radius);
    padding: 10px 10px 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    background: #fff;
    text-align: center;
    user-select: none;
}
.pb-template-card:hover { border-color: var(--pb-primary); }
.pb-template-card.active {
    border-color: var(--pb-primary);
    background: #e6f7f5;
}
.pb-tcard-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--pb-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.pb-tcard-desc {
    font-size: 10px;
    color: var(--pb-muted);
    margin-top: 7px;
    line-height: 1.3;
}
.pb-tcard-skeleton {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 2px;
}
.pb-skel {
    height: 6px;
    background: #dde3ea;
    border-radius: 3px;
    flex-shrink: 0;
}
.pb-template-card.active .pb-skel { background: #b2ddd7; }
.pb-sw100 { width: 100%; }
.pb-sw90  { width: 90%; }
.pb-sw80  { width: 80%; }
.pb-sw70  { width: 70%; }
.pb-sw65  { width: 65%; }
.pb-sw60  { width: 60%; }
.pb-sw55  { width: 55%; }
.pb-sw50  { width: 50%; }
.pb-sw45  { width: 45%; }
.pb-sw40  { width: 40%; }
.pb-sw35  { width: 35%; }
.pb-skel-icon {
    text-align: center;
    font-size: 16px;
    color: var(--pb-primary);
    margin-bottom: 3px;
    line-height: 1;
}
.pb-skel-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pb-skel-num-dot,
.pb-skel-bullet-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #c9d2db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}
.pb-template-card.active .pb-skel-num-dot,
.pb-template-card.active .pb-skel-bullet-dot { background: var(--pb-primary); }
.pb-skel-table-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin: 2px 0;
}
.pb-skel-table-mini span {
    height: 5px;
    background: #dde3ea;
    border-radius: 2px;
    display: block;
}
.pb-template-card.active .pb-skel-table-mini span { background: #b2ddd7; }
.pb-skel-title { height: 8px !important; }

/* ---- Template card preview (review panels) ---- */
.pb-tcard-review-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; color: var(--pb-muted); margin: 0 0 8px;
}
.pb-tcard-review {
    cursor: default !important;
    border-color: var(--pb-primary) !important;
    background: #e6f7f5 !important;
    margin-bottom: 18px;
    pointer-events: none;
}
.pb-tcard-review .pb-skel { background: #b2ddd7 !important; }
.pb-tcard-review .pb-skel-num-dot,
.pb-tcard-review .pb-skel-bullet-dot { background: var(--pb-primary) !important; }
.pb-tcard-review .pb-skel-table-mini span { background: #b2ddd7 !important; }
.pb-tcard-review .pb-skel-icon { color: var(--pb-primary); }

/* Template badge (Simple review) */
.pb-tbadge {
    display: inline-flex; align-items: center; gap: 5px;
    background: #e6f7f5; border: 1px solid #b2e4dd;
    border-radius: 20px; padding: 4px 12px;
    font-size: 12px; font-weight: 700; color: var(--pb-primary);
    margin-bottom: 14px;
}
#pb-template-badge { margin-bottom: 4px; }

/* ---- SEO traffic light dots ---- */
.pb-seo-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    background: #dde3ea;
    transition: background .2s;
}
.pb-seo-dot.pb-dot-red    { background: #e74c3c; }
.pb-seo-dot.pb-dot-orange { background: #e67e22; }
.pb-seo-dot.pb-dot-green  { background: #27ae60; }

/* ---- Tone Reference "or" label ---- */
.pb-tone-ref-or {
    font-size: 11px;
    color: var(--pb-muted);
    text-align: center;
    margin: 8px 0 6px;
    font-style: italic;
}

/* ---- Custom tone guard warning ---- */
.pb-custom-guard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff8e6;
    border: 1px solid #f0c040;
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--pb-text);
    line-height: 1.4;
}
.pb-guard-icon { font-size: 14px; margin-right: 3px; }
.pb-guard-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.pb-btn-sm { padding: 4px 12px !important; font-size: 11px !important; }

/* ---- Settings page ---- */
.pb-settings-wrap { max-width: 960px; }
.pb-settings-heading {
    display: flex; align-items: center; gap: 10px;
    font-size: 22px; margin-bottom: 20px;
}
.pb-logo-mark { font-size: 28px; }
.pb-version-tag { font-size: 12px; color: var(--pb-muted); font-weight: normal; }
.pb-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .pb-settings-grid { grid-template-columns: 1fr; } }
.pb-settings-card {
    background: #fff; border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius); padding: 20px; box-shadow: var(--pb-shadow);
}
.pb-settings-card h2 {
    font-size: 14px; margin: 0 0 16px; color: var(--pb-dark);
    border-bottom: 2px solid var(--pb-primary); padding-bottom: 8px;
    display: inline-block;
}
.pb-settings-submit { margin-top: 20px; }
.pb-key-saved { color: var(--pb-success); font-size: 13px; margin-left: 8px; font-weight: 600; }

/* ---- Quota strip ---- */
.pb-quota-strip {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--pb-light); border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius); padding: 8px 16px;
    margin-bottom: 12px; font-size: 12px;
}
.pb-quota-strip--low  { background: #fff8f0; border-color: #f5a623; }
.pb-quota-strip--full { background: #fff2f2; border-color: #e74c3c; }
.pb-quota-left { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pb-quota-label { color: var(--pb-text); font-weight: 500; }
.pb-quota-strip--full .pb-quota-label { color: #c0392b; font-weight: 700; }
.pb-quota-upgrade-link { color: var(--pb-primary); font-weight: 700; text-decoration: none; }
.pb-quota-upgrade-link:hover { text-decoration: underline; }
.pb-quota-track {
    flex: 1; max-width: 120px; height: 5px;
    background: var(--pb-border); border-radius: 3px; overflow: hidden;
}
.pb-quota-fill {
    height: 100%; background: var(--pb-primary);
    border-radius: 3px; transition: width .3s;
}
.pb-quota-strip--low  .pb-quota-fill { background: #f5a623; }
.pb-quota-strip--full .pb-quota-fill { background: #e74c3c; }

/* ---- Quota upgrade wall ---- */
.pb-quota-wall {
    text-align: center; padding: 56px 32px;
    max-width: 480px; margin: 40px auto;
}
.pb-quota-wall-icon { font-size: 48px; margin-bottom: 16px; }
.pb-quota-wall h2 { font-size: 22px; border: none; color: var(--pb-dark); margin-bottom: 12px; }
.pb-quota-wall p { color: var(--pb-muted); font-size: 14px; margin-bottom: 8px; }
.pb-quota-wall-sub { margin-bottom: 28px !important; }
.pb-quota-upgrade-btn {
    display: inline-block; padding: 13px 36px !important;
    font-size: 15px !important; font-weight: 700; margin-bottom: 20px;
}
.pb-quota-wall-later { margin-top: 4px; }
.pb-quota-later-btn {
    background: none; border: none; color: var(--pb-muted);
    font-size: 12px; cursor: pointer; text-decoration: underline;
    padding: 0;
}
.pb-quota-later-btn:hover { color: var(--pb-text); }

/* ---- Help & Docs page ---- */
.pb-help-wrap { max-width: 820px; margin: 0 auto 40px; }
.pb-help-title { font-size: 20px; color: var(--pb-dark); margin: 24px 0 4px; font-weight: 700; border: none; }
.pb-help-intro { color: var(--pb-muted); font-size: 13px; margin: 0 0 24px; }

.pb-help-section {
    background: #fff;
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius);
    margin-bottom: 10px;
    overflow: hidden;
}
.pb-help-summary {
    font-size: 14px; font-weight: 600; color: var(--pb-dark);
    padding: 14px 18px; cursor: pointer; list-style: none;
    display: flex; align-items: center; gap: 10px;
    user-select: none;
}
.pb-help-summary::-webkit-details-marker { display: none; }
.pb-help-summary::before {
    content: '+'; display: inline-block; width: 18px; height: 18px;
    background: var(--pb-light); border: 1px solid var(--pb-border);
    border-radius: 50%; text-align: center; line-height: 16px;
    font-size: 14px; font-weight: 700; color: var(--pb-primary);
    flex-shrink: 0; transition: transform .15s;
}
details[open] .pb-help-summary::before { content: '−'; }
.pb-help-section:hover { border-color: var(--pb-primary); }
details[open].pb-help-section { border-color: var(--pb-primary); }
details[open] .pb-help-summary { color: var(--pb-primary); border-bottom: 1px solid var(--pb-border); }

.pb-help-body { padding: 16px 18px 18px; }
.pb-help-steps { padding-left: 20px; margin: 0 0 12px; }
.pb-help-steps li { margin-bottom: 8px; font-size: 13px; color: var(--pb-text); line-height: 1.6; }
.pb-help-list { padding-left: 20px; margin: 8px 0; }
.pb-help-list li { margin-bottom: 6px; font-size: 13px; color: var(--pb-text); }
.pb-help-note {
    font-size: 12px; color: var(--pb-muted); background: var(--pb-light);
    border-left: 3px solid var(--pb-primary); padding: 8px 12px;
    border-radius: 0 4px 4px 0; margin: 12px 0 0;
}
.pb-help-note strong { color: var(--pb-text); }

.pb-help-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0; }
.pb-help-table th { background: var(--pb-light); color: var(--pb-dark); font-weight: 600; text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--pb-border); }
.pb-help-table td { padding: 9px 12px; border-bottom: 1px solid var(--pb-border); color: var(--pb-text); vertical-align: top; line-height: 1.5; }
.pb-help-table tr:last-child td { border-bottom: none; }
.pb-help-table code { background: var(--pb-light); border: 1px solid var(--pb-border); border-radius: 3px; padding: 1px 5px; font-size: 12px; }

.pb-help-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; flex-shrink: 0; }
.pb-help-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    background: var(--pb-primary); color: #fff;
    border-radius: 3px; padding: 2px 6px; margin-left: 8px;
    vertical-align: middle; letter-spacing: .3px;
}
.pb-help-badge-link {
    display: inline-block; font-size: 11px; font-weight: 700;
    background: var(--pb-primary); color: #fff !important;
    border-radius: 3px; padding: 2px 7px; text-decoration: none !important;
}
.pb-help-badge-link:hover { background: var(--pb-primary-d); }

.pb-help-footer { font-size: 11px; color: var(--pb-muted); text-align: center; margin-top: 28px; }
.pb-help-footer a { color: var(--pb-primary); text-decoration: none; }
.pb-help-footer a:hover { text-decoration: underline; }

/* ---- Reports page ---- */
.pb-reports-wrap { max-width: 860px; margin: 0 auto 40px; }
.pb-reports-title { font-size: 20px; color: var(--pb-dark); margin: 24px 0 20px; font-weight: 700; border: none; }
.pb-reports-section { margin-bottom: 32px; }
.pb-reports-heading {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--pb-muted); margin: 0 0 12px;
    padding-bottom: 8px; border-bottom: 1px solid var(--pb-border);
}
.pb-reports-footer { font-size: 11px; color: var(--pb-muted); margin-top: 8px; }

/* Usage cards */
.pb-reports-cards { display: flex; gap: 14px; flex-wrap: wrap; }
.pb-rcard {
    flex: 1 1 180px; background: #fff; border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius); padding: 16px 18px;
    box-shadow: var(--pb-shadow);
}
.pb-rcard-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--pb-muted); margin-bottom: 6px; }
.pb-rcard-value { font-size: 26px; font-weight: 700; color: var(--pb-dark); line-height: 1.1; }
.pb-rcard-sub { font-size: 14px; font-weight: 400; color: var(--pb-muted); }
.pb-rcard-ok   { color: var(--pb-hero); }
.pb-rcard-warn { color: var(--pb-warning); }
.pb-rcard-action { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--pb-primary); text-decoration: none; font-weight: 600; }
.pb-rcard-action:hover { text-decoration: underline; }
.pb-rcard-bar-wrap { background: var(--pb-light); border-radius: 4px; height: 5px; margin-top: 10px; overflow: hidden; }
.pb-rcard-bar { background: var(--pb-primary); height: 100%; border-radius: 4px; transition: width .4s; }

/* Security section */
.pb-sec-badge {
    display: inline-block; background: #c0392b; color: #fff;
    font-size: 11px; font-weight: 700; border-radius: 10px;
    padding: 1px 7px; margin-left: 8px; vertical-align: middle;
}
.pb-sec-clean {
    display: flex; align-items: center; gap: 8px;
    background: #edfaf3; border: 1px solid #a3e4be;
    border-radius: var(--pb-radius); padding: 14px 18px;
    color: var(--pb-success); font-size: 13px; font-weight: 600;
}
.pb-sec-clean-icon { font-size: 16px; }
.pb-sec-summary { font-size: 13px; color: var(--pb-text); margin: 0 0 12px; }
.pb-sec-table { font-size: 13px; margin-bottom: 12px; }
.pb-sec-time { color: var(--pb-muted); white-space: nowrap; }
.pb-sec-code { background: #fef3f2; color: #c0392b; border: 1px solid #f5c6c2; border-radius: 3px; padding: 1px 6px; font-size: 12px; }
.pb-sec-actions { margin-top: 10px; }
.pb-sec-clear-btn { color: #c0392b !important; border-color: #c0392b !important; }
.pb-sec-clear-btn:hover { background: #fef3f2 !important; }

/* WC products list — PB generated badge */
.column-pipebu_generated { width: 40px; text-align: center; }
.pb-wc-badge { display: inline-block; background: #0d4740; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 3px; letter-spacing: .4px; }

/* Color variation cards */
.pb-color-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pb-color-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--pb-radius);
    border: 1px solid var(--pb-border);
}
.pb-color-row:nth-child(odd)  { background: #fff; }
.pb-color-row:nth-child(even) { background: #e6f7f5; }
.pb-color-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .5px; color: var(--pb-muted); min-width: 50px; flex-shrink: 0;
}
.pb-color-thumb {
    width: 44px; height: 44px; object-fit: cover;
    border-radius: 6px; border: 2px solid var(--pb-border); flex-shrink: 0;
}
.pb-color-thumb-empty {
    display: inline-block; width: 44px; height: 44px;
    border-radius: 6px; border: 2px dashed var(--pb-border);
    background: var(--pb-light); flex-shrink: 0;
}
.pb-color-name  { flex: 1; min-width: 0; }
.pb-color-price { width: 90px; flex-shrink: 0; }
.pb-color-remove {
    background: transparent; border: none; cursor: pointer;
    color: var(--pb-muted); font-size: 18px; line-height: 1;
    padding: 0 4px; flex-shrink: 0;
}
.pb-color-remove:hover { color: #c0392b; }

/* Color variation guide (matches hero-hint style, light teal card) */
.pb-colors-guide {
    margin-top: 8px;
    background: #e6f7f5; border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius); padding: 10px 14px;
}
.pb-colors-guide-title { font-size: 12px; color: var(--pb-muted); margin: 0 0 4px; font-weight: 600; }
.pb-colors-guide-list { font-size: 12px; color: var(--pb-muted); margin: 0 0 0 14px; padding: 0; }
.pb-colors-guide-list li { margin-bottom: 1px; }
.pb-colors-stock-hint { font-size: 11px; color: var(--pb-muted); margin: 0 0 8px; font-style: italic; }
