/* Module Sản phẩm */
.oa-products-page {
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background:
        radial-gradient(1200px 500px at 10% -10%, #dbeafe 0%, transparent 55%),
        radial-gradient(900px 420px at 100% 0%, #e0e7ff 0%, transparent 50%),
        #f1f5f9;
    min-height: 100vh;
}
.oa-products-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 24px 56px;
}
.oa-products-pack-banner {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #eff6ff, #fff);
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.45;
}
.oa-products-pack-banner a { color: #1d4ed8; font-weight: 600; }
.oa-products-pack-price { display: block; margin-top: 6px; color: #475569; font-size: 13px; }
.oa-products-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,.85);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    backdrop-filter: blur(8px);
}
.oa-products-stats {
    display: flex;
    gap: 18px;
    margin-right: auto;
}
.oa-products-stats div {
    display: flex;
    flex-direction: column;
    min-width: 72px;
}
.oa-products-stats b {
    font-size: 24px;
    color: #0f172a;
    line-height: 1.1;
    font-weight: 800;
}
.oa-products-stats span {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}
.oa-products-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}
.oa-products-filter .oa-crm-select { min-width: 180px; }
#filter-q {
    max-width: 220px;
    border-radius: 10px;
}
.oa-products-lead {
    margin: 0 0 18px;
    font-size: 13.5px;
    color: #475569;
    line-height: 1.55;
    max-width: 760px;
}
.oa-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.oa-products-empty {
    grid-column: 1 / -1;
    padding: 48px 16px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    background: #fff;
    border-radius: 14px;
    border: 1px dashed #cbd5e1;
}
.oa-prod-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.oa-prod-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}
.oa-prod-card-media {
    height: 156px;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.oa-prod-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.oa-prod-card-media span { font-size: 12px; color: #94a3b8; font-weight: 600; }
.oa-prod-card-body {
    padding: 14px 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.oa-prod-card-name {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}
.oa-prod-card-meta { font-size: 12px; color: #64748b; font-weight: 500; }
.oa-prod-card-details {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.oa-prod-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}
.oa-prod-card-badges span {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.oa-prod-card-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
}
.oa-prod-card-actions .oa-crm-btn { font-size: 12px; padding: 6px 12px; }

.oa-products-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}
.oa-products-field em { color: #dc2626; font-style: normal; }
.oa-products-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) {
    .oa-products-row { grid-template-columns: 1fr; }
}

.oa-products-modal {
    max-width: 720px;
    width: calc(100% - 24px);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}
.oa-products-modal-body {
    overflow: auto;
    padding: 16px 18px 8px;
    max-height: min(70vh, 720px);
}
.oa-products-modal .oa-chatbot-section {
    margin-bottom: 14px;
}
/* 3 khối form — màu nền + viền khác nhau cho dễ phân biệt */
.oa-products-modal .oa-prod-sec {
    border-width: 1px;
    border-style: solid;
}
.oa-products-modal .oa-prod-sec-info {
    background: #eff6ff;
    border-color: #93c5fd;
}
.oa-products-modal .oa-prod-sec-info .oa-chatbot-step {
    background: #2563eb;
}
.oa-products-modal .oa-prod-sec-rules {
    background: #fff7ed;
    border-color: #fdba74;
}
.oa-products-modal .oa-prod-sec-rules .oa-chatbot-step {
    background: #ea580c;
}
.oa-products-modal .oa-prod-sec-prompt {
    background: #ecfdf5;
    border-color: #6ee7b7;
}
.oa-products-modal .oa-prod-sec-prompt .oa-chatbot-step {
    background: #059669;
}
.oa-products-modal .oa-prod-prompt-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.oa-products-modal .oa-prod-prompt-field > span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
}
.oa-products-modal .oa-prod-sec-prompt .oa-chatbot-prompt {
    background: #fff;
    border-color: #a7f3d0;
}
.oa-products-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.oa-products-img {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.oa-products-img img { width: 100%; height: 100%; object-fit: cover; }
.oa-products-img button {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(15,23,42,.78);
    color: #fff;
    cursor: pointer;
    font-size: 12px;
}
.oa-products-upload {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px dashed #93c5fd;
    border-radius: 8px;
    color: #1d4ed8;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    background: #f0f7ff;
    width: fit-content;
}
.oa-products-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    z-index: 10000;
    max-width: 90vw;
    box-shadow: 0 10px 30px rgba(15,23,42,.25);
}
.oa-products-toast.err { background: #b91c1c; }
.oa-chatbot-section {
    background: #fff; border: 1px solid #dbe3ee; border-radius: 16px;
    padding: 18px 20px; box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.oa-chatbot-section-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.oa-chatbot-section-head > div:first-child {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
    column-gap: 10px; row-gap: 2px; align-items: start;
}
.oa-chatbot-step {
    grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #1565c0; color: #fff; font-size: 0.8rem; font-weight: 800;
    margin-top: 1px;
}
.oa-chatbot-section h4 { margin: 0; font-size: 0.98rem; font-weight: 800; color: #0f172a; }
.oa-chatbot-section-head p { margin: 0; font-size: 0.8rem; color: #64748b; grid-column: 2; }
.oa-chatbot-add-rule { font-size: 0.82rem; white-space: nowrap; }
.oa-chatbot-section-fallback .oa-chatbot-prompt {
    width: 100%; resize: vertical; min-height: 110px; margin-top: 4px;
    font-family: inherit; line-height: 1.55; border-radius: 12px;
    border: 1px solid #dbe3ee; padding: 12px 14px;
}
.oa-chatbot-pages-section { border-color: #bfdbfe; }
.oa-chatbot-tags-section { border-color: #c4b5fd; }
.oa-chatbot-tag-create {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    margin-bottom: 10px; padding: 12px; border-radius: 12px;
    background: #f8fafc; border: 1px dashed #cbd5e1;
}
.oa-chatbot-tag-create .oa-crm-input {
    flex: 1 1 180px; min-width: 140px; max-width: 280px;
}
.oa-chatbot-tag-color-dd { position: relative; flex: 0 1 220px; min-width: 180px; }
.oa-chatbot-tag-color-trigger {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 10px; border-radius: 10px; border: 1px solid #cbd5e1;
    background: #fff; cursor: pointer; font: 600 0.84rem/1.3 inherit; color: #0f172a;
}
.oa-chatbot-tag-color-trigger:hover { border-color: #94a3b8; }
.oa-chatbot-tag-color-swatch {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.15);
}
.oa-chatbot-tag-color-label {
    flex: 1; min-width: 0; text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oa-chatbot-tag-color-caret { color: #64748b; font-size: 0.75rem; }
.oa-chatbot-tag-color-menu {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
    max-height: 260px; overflow-y: auto; padding: 6px;
    border-radius: 12px; border: 1px solid #e2e8f0; background: #fff;
    box-shadow: 0 12px 28px rgba(15,23,42,0.14);
}
.oa-chatbot-tag-color-menu[hidden] { display: none !important; }
.oa-chatbot-tag-color-option {
    display: flex; align-items: center; gap: 10px; width: 100%;
    border: none; background: transparent; text-align: left; cursor: pointer;
    padding: 8px 10px; border-radius: 8px; font: 600 0.84rem/1.3 inherit; color: #0f172a;
}
.oa-chatbot-tag-color-option:hover { background: #f1f5f9; }
.oa-chatbot-tag-color-option.is-on { background: #eff6ff; }
.oa-chatbot-tag-color-name { flex: 1; min-width: 0; }
.oa-chatbot-tags-hint {
    margin: 0 0 10px; font-size: 0.78rem; font-weight: 600;
}
.oa-chatbot-tags-hint.is-ok { color: #15803d; }
.oa-chatbot-tags-hint.is-err { color: #b91c1c; }
.oa-chatbot-tags-list {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 28px;
}
.oa-chatbot-tag-item {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 4px 2px 2px; border-radius: 999px; background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.oa-chatbot-tag-del {
    border: none; background: transparent; color: #94a3b8; cursor: pointer;
    font-size: 1rem; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.oa-chatbot-tag-del:hover { background: #fee2e2; color: #b91c1c; }
.oa-chatbot-pages-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.oa-chatbot-pages-meta {
    font-size: 0.8rem; font-weight: 600; color: #1565c0;
    margin: -4px 0 12px; padding: 8px 12px; background: #e3f2fd;
    border-radius: 8px; border: 1px solid #bbdefb;
}
.oa-chatbot-pages-list {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 280px; overflow-y: auto; padding-right: 4px;
}
.oa-chatbot-page-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px;
    background: #fff; cursor: pointer; transition: border-color .15s, background .15s;
}
.oa-chatbot-page-row:hover { border-color: #93c5fd; background: #f8fbff; }
.oa-chatbot-page-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: #2563eb; flex-shrink: 0; }
.oa-chatbot-page-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oa-chatbot-page-info strong { font-size: 0.86rem; color: #0f172a; line-height: 1.35; }
.oa-chatbot-page-info small { font-size: 0.75rem; color: #64748b; }
.oa-chatbot-rules { display: flex; flex-direction: column; gap: 12px; }
.oa-chatbot-rules-empty {
    text-align: center; padding: 28px 16px; color: #64748b;
    border: 2px dashed #e2e8f0; border-radius: 12px; background: #f8fafc;
}
.oa-chatbot-rules-empty span { font-size: 2rem; display: block; margin-bottom: 8px; }
.oa-chatbot-rules-empty p { margin: 0; font-size: 0.85rem; }
.oa-chatbot-rule-card {
    border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden;
    background: linear-gradient(180deg, #fff, #fafbfc);
}
.oa-chatbot-rule-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 14px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0;
}
.oa-chatbot-rule-head strong { font-size: 0.85rem; color: #334155; }
.oa-chatbot-rule-del {
    border: none; background: transparent; color: #94a3b8; cursor: pointer;
    font-size: 1.1rem; line-height: 1; padding: 4px 8px; border-radius: 6px;
}
.oa-chatbot-rule-del:hover { background: #fee2e2; color: #b91c1c; }
.oa-chatbot-rule-body { padding: 14px; display: grid; gap: 12px; }
.oa-chatbot-rule-field label {
    display: block; font-size: 0.75rem; font-weight: 700; color: #475569;
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em;
}
.oa-chatbot-rule-field input,
.oa-chatbot-rule-field textarea {
    width: 100%; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 10px 12px; font-family: inherit; font-size: 0.88rem; line-height: 1.45;
    background: #fff; transition: border-color 0.15s;
}
.oa-chatbot-rule-field input:focus,
.oa-chatbot-rule-field textarea:focus { outline: none; border-color: #0084ff; box-shadow: 0 0 0 3px rgba(0,132,255,0.12); }
.oa-chatbot-rule-field textarea { resize: vertical; min-height: 80px; }
.oa-chatbot-rule-media-label {
    font-size: 0.75rem; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px;
}
.oa-chatbot-rule-media {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
}
.oa-chatbot-media-thumb {
    width: 88px; border-radius: 10px; overflow: hidden; position: relative;
    border: 1px solid #e2e8f0; background: #0f172a;
}
.oa-chatbot-media-thumb img,
.oa-chatbot-media-thumb video {
    display: block; width: 100%; height: 72px; object-fit: cover;
}
.oa-chatbot-media-del {
    position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
    border: none; border-radius: 50%; background: rgba(15,23,42,0.7); color: #fff;
    cursor: pointer; font-size: 0.8rem; line-height: 1;
}
.oa-chatbot-upload-chip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 88px; height: 72px; border-radius: 10px; border: 2px dashed #cbd5e1;
    background: #f8fafc; color: #64748b; font-size: 0.72rem; font-weight: 600;
    cursor: pointer; text-align: center; padding: 8px; transition: border-color 0.15s, color 0.15s;
}
.oa-chatbot-upload-chip:hover { border-color: #0084ff; color: #0084ff; background: #f0f9ff; }
.oa-chatbot-upload-chip input { display: none; }
.oa-chatbot-save-result { margin: 0 20px 12px; flex-shrink: 0; }

/* ---- Modal fix (social.css đã phá .oa-crm-modal) ---- */
.oa-products-page .oa-crm-modal[hidden] { display: none !important; }
.oa-products-page .oa-crm-modal:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1200 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: transparent !important;
    max-width: none !important;
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.oa-products-page .oa-crm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    border: none;
    cursor: pointer;
}
.oa-products-page .oa-products-modal.oa-crm-modal-panel {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-width: 720px;
    max-height: min(92vh, 900px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}
.oa-products-page .oa-products-modal .oa-crm-modal-head {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}
.oa-products-page .oa-products-modal-body {
    flex: 1;
    overflow: auto;
    padding: 16px 18px 12px;
    max-height: none;
    -webkit-overflow-scrolling: touch;
}
.oa-products-page .oa-products-modal .oa-crm-modal-foot {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}
.oa-products-page .oa-chatbot-section { margin-bottom: 14px; }
.oa-products-page .oa-social-muted { color: #64748b; font-size: 0.8rem; font-weight: 500; margin: 0; }

.oa-chatbot-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin: 0 6px 8px 0;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.oa-chatbot-tag-item:hover { border-color: #94a3b8; }
.oa-chatbot-tag-item.is-on {
    border-color: var(--tag-color, #2563eb);
    background: color-mix(in srgb, var(--tag-color, #2563eb) 12%, #fff);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tag-color, #2563eb) 18%, transparent);
}
.oa-chatbot-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tag-color, #2563eb);
    flex-shrink: 0;
}
.oa-prod-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0 4px;
}
.oa-prod-tag-mini {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: var(--tag-color, #2563eb);
    background: color-mix(in srgb, var(--tag-color, #2563eb) 14%, #fff);
    border: 1px solid color-mix(in srgb, var(--tag-color, #2563eb) 35%, #e2e8f0);
}

/* ── Cấu hình chatbot (trang chính) ── */
.oa-cfg-panel {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #dbe3ee;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
.oa-cfg-panel.oa-prod-sec-prompt {
    background: linear-gradient(180deg, #ecfdf5, #fff);
    border-color: #6ee7b7;
}
.oa-cfg-panel.oa-chatbot-tags-section {
    background: linear-gradient(180deg, #f5f3ff, #fff);
    border-color: #c4b5fd;
}
.oa-cfg-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e40af;
    cursor: pointer;
}
.oa-cfg-toggle input { width: 18px; height: 18px; accent-color: #2563eb; }
.oa-cfg-panel .oa-chatbot-prompt {
    min-height: 220px;
    line-height: 1.55;
    font-size: 0.9rem;
}
.oa-cfg-divider {
    margin: 28px 0 18px;
    padding-top: 8px;
    border-top: 1px solid #dbe3ee;
}
.oa-cfg-divider h2 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}
.oa-cfg-channel-field { margin-bottom: 12px; }
.oa-cfg-channel-field select { max-width: 420px; }
.oa-cfg-pages-wrap { margin: 0 0 14px; }
.oa-cfg-pages-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}
.oa-cfg-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.oa-cfg-page-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: #334155;
}
.oa-cfg-page-check input { width: 16px; height: 16px; accent-color: #2563eb; }
.oa-cfg-zalo-row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
}
.oa-cfg-zalo-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.oa-cfg-zalo-phase {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
}
.oa-cfg-zalo-phase.ok { background: #dcfce7; color: #166534; }
.oa-cfg-zalo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.oa-cfg-qr-wrap p { margin: 0 0 8px; font-size: 0.85rem; color: #475569; }
.oa-cfg-qr {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.oa-cfg-qr img { width: 100%; height: 100%; object-fit: contain; }
.oa-cfg-tags-catalog {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 28px;
}
.oa-cfg-tags-catalog .oa-chatbot-tag-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    width: 100%;
}
.oa-chatbot-ai-tags-toggle {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 8px; padding: 10px 12px;
    background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px;
    font-size: 0.86rem; font-weight: 600; color: #065f46; cursor: pointer;
}
.oa-chatbot-ai-tags-toggle input { width: 16px; height: 16px; accent-color: #059669; }
.oa-chatbot-ai-tags-help { margin: 0 0 12px; font-size: 0.78rem; line-height: 1.45; }
.oa-chatbot-tag-item-top {
    display: flex; align-items: center; gap: 8px; justify-content: space-between;
}
.oa-chatbot-tag-item-main { display: inline-flex; align-items: center; gap: 6px; }
.oa-chatbot-tag-ai-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.oa-chatbot-tag-ai-check {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 600; color: #334155; cursor: pointer;
}
.oa-chatbot-tag-ai-check input { width: 14px; height: 14px; accent-color: #059669; }
.oa-chatbot-tag-ai-fields { display: grid; gap: 10px; width: 100%; }
.oa-chatbot-tag-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.oa-chatbot-tag-field > span {
    font-size: 0.72rem; font-weight: 700; color: #475569;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.oa-chatbot-tag-field small { font-size: 0.72rem; color: #64748b; line-height: 1.35; }
.oa-chatbot-tag-ai-fields input,
.oa-chatbot-tag-ai-fields textarea {
    width: 100%; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 8px 10px; font-family: inherit; font-size: 0.82rem;
    background: #f8fafc; resize: vertical; line-height: 1.4;
}
.oa-chatbot-tag-ai-fields[hidden] { display: none !important; }
.oa-prod-tag-picker {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 28px;
}
.oa-chatbot-tag-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; border: 1px solid #e2e8f0;
    background: #f8fafc; color: #334155; font: 600 0.82rem/1.2 inherit;
    cursor: pointer; transition: border-color .12s, background .12s;
}
.oa-chatbot-tag-chip:hover { border-color: #94a3b8; }
.oa-chatbot-tag-chip.is-on {
    border-color: var(--tag-color, #2563eb);
    background: color-mix(in srgb, var(--tag-color, #2563eb) 12%, #fff);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tag-color, #2563eb) 18%, transparent);
}
.oa-products-modal .oa-prod-sec-tags {
    background: #f5f3ff;
    border-color: #c4b5fd;
}
.oa-products-modal .oa-prod-sec-tags .oa-chatbot-step { background: #7c3aed; }
