:root {
    --bg: #ffffff;
    --sidebar: #ffffff;
    --surface: #ffffff;
    --surface-2: #fff7ed;
    --surface-3: #ffedd5;
    --line: #e5e7eb;
    --line-strong: #d1d5db;
    --text: #1f2937;
    --muted: #6b7280;
    --muted-2: #4b5563;
    --accent: #f97316;
    --cyan: #ea580c;
    --blue: #2563eb;
    --green: #15803d;
    --amber: #b45309;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: none;
}

html,body { background: #fff; color: var(--text); }
body { background-image: none; }
body::before { display: none; }
::selection { background: #fed7aa; color: #7c2d12; }

.sidebar { border-right: 1px solid #e5e7eb; background: #fff; box-shadow: none; }
.brand { color: #111827; }
.brand-mark { border: 0; background: #f97316; color: #fff; box-shadow: none; }
.brand small,.nav-label { color: #9a6b4f; }
.nav-item { color: #4b5563; }
.nav-item:hover { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.nav-item.active { border-color: #f97316; background: #f97316; color: #fff; box-shadow: none; }
.sidebar-foot { border-color: #e5e7eb; background: #fafafa; box-shadow: none; }
.sidebar-foot small { color: #6b7280; }

.topbar { border-bottom-color: #e5e7eb; background: rgba(255,255,255,.96); box-shadow: none; }
.crumb { color: #9a6b4f; }
.credit-pill,.account-chip,.logout button { border-color: #e5e7eb; background: #fff; box-shadow: none; }
.credit-pill strong { color: #c2410c; }
.credit-pill span,.account-chip small { color: #6b7280; }
.avatar { background: #ffedd5; color: #c2410c; box-shadow: none; }
.logout button { color: #4b5563; }
.logout button:hover { border-color: #f97316; color: #c2410c; background: #fff7ed; }

.workspace { animation: flat-page-in .2s ease-out; }
.page-head h1,h1,h2,h3 { color: #111827; }
.page-head p,.eyebrow { color: #6b7280; }
.eyebrow { font-weight: 850; }

.metric-grid article,.panel,.profile-card,.playlist-card,.empty-state,.shop-card,.shopee-setup-form,
.settings-card,.security-card,.rule-card,.playlist-toolbar,.playlist-upload-panel,.playlist-item-row,.product-card,.script-card {
    border-color: #e5e7eb;
    background: #fff;
    box-shadow: none;
}
.password-settings-card { border-color:#e5e7eb; background:#fff; box-shadow:none; }
.password-input button { background:#f3f4f6; color:#4b5563; }
.password-input button:hover { background:#fff7ed; color:#c2410c; }
.metric-grid article::after { background: #fff7ed; }
.metric-grid article > span,.metric-grid article > small { color: #6b7280; }
.metric-icon,.file-mark,.shop-logo,.security-note-icon,.shop-playlist-avatar {
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #c2410c;
    box-shadow: none;
}

.primary,.console-button.primary,.playlist-upload-button {
    border: 1px solid #f97316;
    background: #f97316;
    color: #fff;
    box-shadow: none;
    text-shadow: none;
}
.primary:hover:not(:disabled),.console-button.primary:hover:not(:disabled),.playlist-upload-button:hover { border-color: #ea580c; background: #ea580c; filter: none; transform: none; }
.secondary,.console-button.secondary,.button-link:not(.primary),.icon-button {
    border-color: #d1d5db;
    background: #fff;
    color: #374151;
    box-shadow: none;
}
.secondary:hover,.console-button.secondary:hover,.icon-button:hover { border-color: #f97316; background: #fff7ed; color: #c2410c; filter: none; transform: none; }
.primary:active:not(:disabled),.secondary:active,.console-button:active:not(:disabled) { transform: none; box-shadow: none; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline: 3px solid rgba(249,115,22,.28); outline-offset: 2px; }

input,select,textarea,.inline-create input,.search-box input,.settings-card input,.settings-card select,.credit-form input,
.cookie-form textarea,.setup-control > input,.setup-control > textarea,.shop-playlist-picker select,.scene-profile-picker select,
.scene-studio input:not([type=range]),.scene-studio select,.scene-studio textarea,.form-stack input {
    border-color: #d1d5db;
    background: #fff;
    color: #1f2937;
    box-shadow: none;
}
input::placeholder,textarea::placeholder { color: #9ca3af; }
input:focus,select:focus,textarea:focus,.inline-create input:focus,.search-box input:focus,.settings-card input:focus,.settings-card select:focus,
.cookie-form textarea:focus,.setup-control > input:focus,.setup-control > textarea:focus { border-color: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,.12); }

.toast { border-color: #86c99a; background: #f0fdf4; color: #166534; box-shadow: none; }
.status-badge,.state,.mini-state,.live-chip { border-color: #e5e7eb; background: #f9fafb; color: #4b5563; }
.status-badge.success,.state.active,.state.ready,.state.completed { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.status-badge.warning,.state.scheduled { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.state.live,.state.running { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

th,td,.detail-list > div,.mini-list > div { border-color: #e5e7eb; }
th { color: #9a5b36; background: #fff7ed; }
td { color: #374151; }
td small,.detail-list dt,.mini-list p small,.mini-list > div > span:last-child { color: #6b7280; }
tbody tr:hover { background: #fffaf5; }
.money,.positive { color: #15803d; }
.negative { color: #dc2626; }

.security-note { border-color: #fed7aa; background: #fff7ed; box-shadow: none; }
.security-note p,.profile-code,.shop-login-options p,.qr-copy p,.setup-control > small,.cover-field > small { color: #6b7280; }
.shop-total { border-color:#fed7aa; background:#fff; }
.shop-action-button { border-color:#e5e7eb; background:#fff; color:#6b7280; }
.shop-action-button:hover { border-color:#f97316; background:#fff7ed; color:#c2410c; }
.shop-action-button.danger:hover { border-color:#ef4444; background:#fef2f2; color:#b91c1c; }
.shop-account strong,.shop-metadata dd { color:#374151; }
.shop-account.missing strong,.shop-metadata dt { color:#6b7280; }
.shop-metadata,.shop-metadata > div,.shop-advanced-login { border-color:#e5e7eb; }
.shop-advanced-login summary { color:#6b7280; }
.shop-advanced-login[open] summary { color:#c2410c; }
.shop-dialog { border-color:#e5e7eb; background:#fff; color:#1f2937; box-shadow:0 24px 80px rgba(17,24,39,.22); }
.shop-dialog::backdrop { background:rgba(17,24,39,.48); }
.shop-dialog > form > header,.shop-dialog footer { border-color:#e5e7eb; }
.shop-dialog header button { border-color:#e5e7eb; background:#fff; color:#6b7280; }
.shop-dialog header button:hover { border-color:#f97316; background:#fff7ed; color:#c2410c; }
.shop-dialog-body input { border-color:#d1d5db; background:#fff; color:#1f2937; }
.shop-delete-submit { border-color:#dc2626; background:#dc2626; }
.shop-delete-submit:hover:not(:disabled) { border-color:#b91c1c; background:#b91c1c; }
.shop-delete-submit:disabled { border-color:#e5e7eb; background:#f3f4f6; color:#9ca3af; }
.shop-login-options > section,.shop-login-options details { border-color: #e5e7eb; background: #fafafa; box-shadow: none; }
.login-method,.shop-login-options summary { color: #4b5563; }
.qr-login-panel { border-color: #fed7aa; background: #fff7ed; }
.qr-frame { border: 1px solid #e5e7eb; box-shadow: none; }
.qr-expired { border-color: #fde68a; background: #fffbeb; }
.qr-expired strong { color: #92400e; }
.setup-saved-badge { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.back-link,.panel-head > a,.text-button { color: #c2410c; }
.setup-label { color: #1f2937; }
.cover-picker { border-color: #fdba74; background: #fff7ed; }
.cover-picker > span[data-cover-empty] { color: #6b7280; }
.cover-picker > span[data-cover-empty] strong { color: #f97316; }
.job-message { border-color: #fed7aa; background: #fff7ed; }
.job-message strong { color: #c2410c; }
.job-message.error { border-color: #fecaca; background: #fef2f2; }
.job-message.error strong { color: #b91c1c; }

/* Playlist */
.shop-playlist-picker { color: #6b7280; }
.shop-playlist-hero { border-color: #fed7aa; background: #fff7ed; box-shadow: none; }
.shop-playlist-identity h2 { color: #111827; }
.shop-playlist-identity p { color: #6b7280; }
.shop-playlist-stats span { border-color: #fdba74; background: #fff; color: #6b7280; }
.shop-playlist-stats strong { color: #1f2937; }
.playlist-option { border-color: #e5e7eb; background: #fafafa; }
.playlist-option:hover { border-color: #fdba74; background: #fff7ed; }
.playlist-option strong { color: #1f2937; }
.playlist-option small { color: #6b7280; }
.playlist-option i,.mini-switch,.switch { border-color: #d1d5db; background: #e5e7eb; box-shadow: none; }
.playlist-option i::after,.mini-switch::after,.switch span { background: #fff; }
.playlist-option input:checked + i,.mini-switch.on,.switch.on { border-color: #f97316; background: #f97316; }
.playlist-option input:checked + i::after,.mini-switch.on::after,.switch.on span { background: #fff; }
.playlist-count-badge { border-color: #e5e7eb; color: #4b5563; }
.thumb { background: #fff7ed; color: #c2410c; }
.playlist-cover { background: #fff7ed; }
.playlist-cover small { background: #fff; color: #4b5563; }
.playlist-shop-empty code { color: #c2410c; }

/* Products collected from profiles with a saved live setup. */
.setup-products-head { align-items: center; }
.setup-products-summary { display: flex; gap: 10px; }
.setup-products-summary > span { display: flex; min-width: 118px; min-height: 58px; align-items: center; justify-content: center; flex-direction: column; border: 1px solid #fed7aa; border-radius: 12px; background: #fff7ed; }
.setup-products-summary strong { color: #c2410c; font-size: 18px; line-height: 1; }
.setup-products-summary small { margin-top: 6px; color: #6b7280; font-size: 9px; }
.setup-products-panel { padding: 20px; }
.setup-products-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; }
.setup-products-filter { display: flex; align-items: center; gap: 8px; }
.setup-products-filter .primary { min-width: 96px; white-space: nowrap; }
.setup-products-filter select { min-width: 210px; min-height: 44px; padding: 0 36px 0 12px; border-radius: 10px; }
.setup-products-search { position: relative; display: block; }
.setup-products-search svg { position: absolute; z-index: 1; top: 50%; left: 13px; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: #9ca3af; stroke-width: 1.8; }
.setup-products-search input { width: 250px; min-height: 44px; padding: 0 12px 0 39px; border-radius: 10px; }
.setup-product-list { display: grid; }
.setup-product-row { display: grid; min-height: 82px; grid-template-columns: 54px minmax(220px,1fr) minmax(100px,140px) 100px 74px 88px minmax(210px,238px); align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid #e5e7eb; }
.setup-product-row:last-child { border-bottom: 0; }
.setup-product-row:hover { background: #fffaf5; }
.setup-product-thumb { position: relative; display: grid; width: 48px; height: 48px; place-items: center; overflow: visible; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; color: #c2410c; font-weight: 800; }
.setup-product-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.setup-product-thumb > i { position: absolute; right: -5px; bottom: -5px; display: grid; width: 18px; height: 18px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #16a34a; color: #fff; font-size: 9px; font-style: normal; }
.setup-product-main { min-width: 0; }
.setup-product-main strong,.setup-product-main small,.setup-product-main span { display: block; }
.setup-product-main strong { overflow: hidden; color: #1f2937; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.setup-product-main small { margin-top: 5px; color: #6b7280; font-size: 8px; }
.setup-product-main span { width: fit-content; margin-top: 6px; padding: 4px 7px; border-radius: 999px; background: #fff7ed; color: #9a3412; font-size: 8px; font-weight: 700; }
.setup-product-metric small,.setup-product-metric strong { display: block; }
.setup-product-metric small { color: #6b7280; font-size: 8px; }
.setup-product-metric strong { margin-top: 5px; color: #1f2937; font-size: 11px; }
.setup-product-metric .money { color: #15803d; }
.setup-product-state { display: inline-flex; min-height: 26px; align-items: center; justify-content: center; border-radius: 999px; font-size: 8px; font-weight: 800; }
.setup-product-state.active { background: #f0fdf4; color: #166534; }
.setup-product-state.out { background: #fef2f2; color: #b91c1c; }
.setup-product-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.setup-product-video-count { display: grid; min-width: 52px; gap: 2px; color: #6b7280; text-align: right; }
.setup-product-video-count strong { color: #c2410c; font-size: 15px; line-height: 1; }
.setup-product-video-count small { font-size: 8px; white-space: nowrap; }
.setup-product-video-action { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid #fdba74; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.setup-product-video-action:hover { border-color: #f97316; background: #ffedd5; color: #9a3412; }
.setup-product-video-action:focus-visible,.setup-product-action:focus-visible { outline: 3px solid rgba(249,115,22,.24); outline-offset: 2px; }
.setup-product-video-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.setup-product-action { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: #4b5563; }
.setup-product-action:hover { border-color: #f97316; background: #fff7ed; color: #c2410c; }
.setup-product-action svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.setup-products-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 18px; border-top: 1px solid #e5e7eb; color: #6b7280; font-size: 10px; }
.setup-products-pagination .button-link { min-width: 84px; }
.setup-products-pagination .disabled { opacity: .45; pointer-events: none; }
.setup-products-empty { display: flex; min-height: 210px; align-items: center; justify-content: center; gap: 14px; color: #6b7280; }
.setup-products-empty > span { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #fed7aa; border-radius: 12px; background: #fff7ed; color: #c2410c; font-weight: 800; }
.setup-products-empty strong { color: #1f2937; }
.setup-products-empty p { margin: 5px 0 0; }

/* Product video management */
.media-product-video-route { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #fdba74; border-radius: 14px; background: #fff7ed; }
.media-product-video-route > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: #fff; color: #c2410c; }
.media-product-video-route svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.media-product-video-route div { display: grid; gap: 3px; min-width: 0; }
.media-product-video-route strong { color: #7c2d12; font-size: 12px; }
.media-product-video-route p { margin: 0; color: #7c5c4c; font-size: 10px; line-height: 1.5; }
.media-product-video-route .button-link { min-height: 44px; white-space: nowrap; }

/* Thư viện Media: prompt văn bản only. */
.media-prompt-library,
.media-prompt-library * { box-sizing: border-box; }
.media-prompt-library { min-width: 0; overflow: hidden; }
.media-prompt-head > div { min-width: 0; }
.media-prompt-head p { max-width: 760px; line-height: 1.6; }
.media-prompt-head .media-shop-picker select { min-height: 44px; }
.media-prompt-scope { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #fdba74; border-radius: 14px; background: #fff7ed; }
.media-prompt-scope-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: #fff; color: #c2410c; }
.media-prompt-scope-icon svg,.media-prompt-permission-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.media-prompt-scope > div { display: grid; gap: 3px; min-width: 0; }
.media-prompt-scope strong { color: #7c2d12; font-size: 13px; }
.media-prompt-scope p { margin: 0; color: #7c5c4c; font-size: 11px; line-height: 1.55; }
.media-prompt-scope .button-link { min-height: 44px; white-space: nowrap; }
.media-voice-profile { display: grid; gap: 16px; padding: 18px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.media-voice-profile-head { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 14px; }
.media-voice-profile-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #fff7ed; color: #c2410c; }
.media-voice-profile-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.media-voice-profile-head > div { display: grid; gap: 3px; min-width: 0; }
.media-voice-profile-head h2 { margin: 0; color: #1f2937; font-size: 18px; line-height: 1.35; }
.media-voice-profile-head p { margin: 0; color: #6b7280; font-size: 11px; line-height: 1.55; }
.media-voice-profile-key { display: grid; max-width: 260px; gap: 3px; padding: 9px 11px; border: 1px solid #fed7aa; border-radius: 11px; background: #fff7ed; }
.media-voice-profile-key small { color: #9a3412; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.media-voice-profile-key code { overflow: hidden; color: #374151; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.media-voice-profile-form { display: grid; gap: 14px; }
.media-voice-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.media-voice-option { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 76px; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 14px; background: #fff; cursor: pointer; touch-action: manipulation; transition: border-color .2s ease,background-color .2s ease,box-shadow .2s ease; }
.media-voice-option:hover { border-color: #fb923c; background: #fffaf7; }
.media-voice-option:focus-within { outline: 3px solid rgba(249,115,22,.24); outline-offset: 2px; }
.media-voice-option:has(input:checked) { border-color: #f97316; background: #fff7ed; box-shadow: 0 0 0 1px rgba(249,115,22,.12); }
.media-voice-option input { width: 20px; height: 20px; margin: 0; accent-color: #ea580c; cursor: pointer; }
.media-voice-option-copy { display: grid; gap: 4px; min-width: 0; }
.media-voice-option-copy strong { color: #1f2937; font-size: 13px; }
.media-voice-option-copy small { color: #6b7280; font-size: 10px; line-height: 1.45; }
.media-voice-option-state { visibility: hidden; padding: 5px 8px; border-radius: 999px; background: #ffedd5; color: #9a3412; font-size: 9px; font-weight: 850; white-space: nowrap; }
.media-voice-option:has(input:checked) .media-voice-option-state { visibility: visible; }
.media-voice-profile-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.media-voice-profile-actions p { max-width: 760px; margin: 0; color: #6b7280; font-size: 10px; line-height: 1.55; }
.media-voice-profile-actions p strong { color: #9a3412; }
.media-voice-profile-actions button { min-height: 44px; flex: 0 0 auto; padding: 10px 16px; touch-action: manipulation; }
.media-voice-profile-actions button:focus-visible { outline: 3px solid rgba(249,115,22,.25); outline-offset: 3px; }
.media-prompt-library .media-mode-tabs a:focus-visible,
.media-prompt-scope .button-link:focus-visible,
.media-prompt-ready button:focus-visible { outline: 3px solid rgba(249,115,22,.25); outline-offset: 3px; }
.media-prompt-library .media-product-actions button,
.media-prompt-library .media-script-review > footer button,
.media-prompt-library .media-prompt-ready button { min-height: 44px; touch-action: manipulation; }
.media-prompt-library .media-product-picker { margin-top: 0; }
.media-prompt-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: hidden; border: 1px solid #cfe1da; border-radius: 16px; background: linear-gradient(135deg,#f4fbf7,#fffaf2); }
.media-prompt-steps > div { display: grid; align-content: center; gap: 4px; min-height: 96px; padding: 16px 18px; border-right: 1px solid #dcebe5; }
.media-prompt-steps > div:last-child { border-right: 0; }
.media-prompt-steps span { color: #2b7358; font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.media-prompt-steps strong { color: #1f2937; font-size: 18px; }
.media-prompt-steps small { color: #6b7280; font-size: 11px; line-height: 1.45; }
.media-prompt-specs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 15px; }
.media-prompt-specs span { display: grid; gap: 4px; min-width: 0; padding: 12px; border: 1px solid #fed7aa; border-radius: 12px; background: #fff7ed; }
.media-prompt-specs small { color: #c2410c; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.media-prompt-specs b { overflow-wrap: anywhere; color: #374151; font-size: 12px; line-height: 1.4; }
.media-prompt-permission { display: grid; grid-template-columns: 56px minmax(0,1fr); align-items: start; gap: 16px; min-height: 240px; align-content: center; }
.media-prompt-permission-icon { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 16px; background: #fff7ed; color: #c2410c; }
.media-prompt-permission > div { min-width: 0; }
.media-prompt-permission h2 { margin: 7px 0 9px; color: #1f2937; font-size: 20px; line-height: 1.3; }
.media-prompt-permission p { max-width: 620px; margin: 0; color: #6b7280; font-size: 13px; line-height: 1.65; }
.media-prompt-permission p strong { color: #9a3412; }
.media-prompt-history { min-width: 0; }
.media-prompt-history .media-card-title { align-items: flex-start; }
.media-prompt-history .media-card-title > b { min-width: 28px; padding: 5px 8px; border-radius: 999px; background: #fff7ed; text-align: center; font-variant-numeric: tabular-nums; }
.media-prompt-records { display: grid; gap: 11px; max-height: 780px; overflow: auto; }
.media-prompt-record { display: grid; gap: 9px; min-width: 0; padding: 13px; border: 1px solid #bfe4d2; border-radius: 14px; background: #fff; }
.media-prompt-record > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.media-prompt-record > header span { color: #6b7280; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.media-prompt-record > header b { color: #16875a; font-size: 10px; }
.media-prompt-record > strong { color: #1f2937; font-size: 13px; }
.media-prompt-record > small { color: #6b7280; font-size: 10px; letter-spacing: .02em; }
.media-prompt-record > strong,
.media-prompt-record > small { overflow-wrap: anywhere; }
.media-prompt-history .media-queue-empty { display: grid; gap: 7px; border: 1px dashed #d1d5db; border-radius: 14px; background: #fafafa; }
.media-prompt-history .media-queue-empty strong { color: #374151; }
.media-prompt-history .media-queue-empty span { color: #6b7280; font-size: 12px; line-height: 1.5; }
.media-prompt-library .media-prompt-ready textarea { max-width: 100%; color: #1f2937; font-size: 12px; line-height: 1.6; }
.media-prompt-library .media-prompt-ready button { padding: 10px 14px; font-size: 12px; }
.product-videos-page { display: grid; gap: 18px; }
.product-videos-head { align-items: end; }
.product-videos-head h1 { margin-top: 7px; }
.product-videos-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.product-videos-head-actions .button-link { min-height: 44px; white-space: nowrap; }
.product-videos-back { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; margin-bottom: 8px; color: #9a3412; font-size: 10px; font-weight: 800; text-decoration: none; }
.product-videos-back:hover { color: #c2410c; }
.product-videos-back:focus-visible { outline: 3px solid rgba(249,115,22,.24); outline-offset: 2px; border-radius: 8px; }
.product-videos-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.product-videos-setup-link { min-height: 44px; white-space: nowrap; }
.playlist-workflow-upload-link { min-height: 44px; padding-inline: 14px; white-space: nowrap; }
.playlist-shop-empty .playlist-workflow-upload-link { width: fit-content; margin-top: 12px; }
.product-video-summary { display: grid; grid-template-columns: 78px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.product-video-summary-thumb { display: grid; width: 78px; height: 78px; place-items: center; overflow: hidden; border: 1px solid #fed7aa; border-radius: 14px; background: #fff7ed; color: #c2410c; }
.product-video-summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-video-summary-copy { display: grid; gap: 5px; min-width: 0; }
.product-video-summary-copy small { color: #c2410c; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.product-video-summary-copy strong { overflow: hidden; color: #1f2937; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.product-video-summary-copy span { color: #6b7280; font-size: 10px; }
.product-video-summary-stat { display: grid; min-width: 112px; gap: 4px; padding: 13px 16px; border-radius: 12px; background: #fff7ed; text-align: center; }
.product-video-summary-stat strong { color: #c2410c; font-size: 22px; line-height: 1; }
.product-video-summary-stat span { color: #7c5c4c; font-size: 9px; font-weight: 700; }
.product-video-permission { display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.product-video-permission > svg { width: 22px; height: 22px; padding: 9px; border-radius: 11px; box-sizing: content-box; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-video-permission > div { display: grid; gap: 4px; }
.product-video-permission strong { color: #1f2937; font-size: 11px; }
.product-video-permission span { color: #6b7280; font-size: 10px; line-height: 1.5; }
.product-video-permission.is-ready { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.product-video-permission.is-ready > svg { background: #dcfce7; }
.product-video-permission.is-limited { border-color: #fde68a; background: #fffbeb; color: #a16207; }
.product-video-permission.is-limited > svg { background: #fef3c7; }
.product-video-permission.is-readonly { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.product-video-permission.is-readonly > svg { background: #ffedd5; }
.product-video-upload-panel,.product-video-library-panel { padding: 18px; }
.product-video-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.product-video-section-head h2 { margin: 4px 0 0; }
.product-video-section-head > small { color: #6b7280; font-size: 9px; }
.product-video-upload-form { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; gap: 10px; }
.product-video-file-picker { display: flex; min-height: 72px; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px dashed #fdba74; border-radius: 13px; background: #fffaf5; color: #c2410c; cursor: pointer; }
.product-video-file-picker:hover { border-color: #f97316; background: #fff7ed; }
.product-video-file-picker:focus-within { outline: 3px solid rgba(249,115,22,.22); outline-offset: 2px; }
.product-video-file-picker > svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-video-file-picker > span { display: grid; gap: 4px; }
.product-video-file-picker strong { color: #7c2d12; font-size: 11px; }
.product-video-file-picker small { color: #7c5c4c; font-size: 9px; }
.product-video-file-picker input { max-width: 280px; margin-left: auto; color: #6b7280; font-size: 9px; cursor: pointer; }
.product-video-file-picker input::file-selector-button { min-height: 44px; margin-right: 9px; padding: 0 12px; border: 1px solid #fdba74; border-radius: 9px; background: #fff; color: #9a3412; font: inherit; font-weight: 800; cursor: pointer; }
.product-video-file-picker input::file-selector-button:hover { border-color: #f97316; background: #ffedd5; }
.product-video-upload-form > button { min-height: 72px; padding-inline: 20px; white-space: nowrap; }
.product-video-total { display: inline-flex; min-height: 32px; align-items: center; gap: 5px; padding: 0 10px; border-radius: 999px; background: #fff7ed; color: #7c5c4c; font-size: 9px; }
.product-video-total strong { color: #c2410c; font-size: 12px; }
.product-video-list { display: grid; gap: 9px; }
.product-video-item { display: grid; grid-template-columns: 46px minmax(170px,1fr) minmax(210px,280px) minmax(138px,220px); align-items: center; gap: 12px; min-height: 86px; padding: 11px 12px; border: 1px solid #e5e7eb; border-radius: 13px; background: #fff; }
.product-video-item:hover { border-color: #fdba74; background: #fffaf5; }
.product-video-item.is-attached { border-color: #bbf7d0; background: #f7fff9; }
.product-video-item.is-other-product { border-color: #fde68a; background: #fffdf5; }
.product-video-item-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 11px; background: #fff7ed; color: #c2410c; }
.product-video-item-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-video-item-copy,.product-video-binding-state { display: grid; gap: 4px; min-width: 0; }
.product-video-item-copy > strong { overflow: hidden; color: #1f2937; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.product-video-item-copy > span,.product-video-binding-state small { overflow: hidden; color: #6b7280; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.product-video-prepare { width: fit-content; padding: 4px 7px; border-radius: 999px; background: #fff7ed; color: #9a3412; font-size: 8px; font-weight: 800; }
.product-video-prepare.is-ready { background: #dcfce7; color: #166534; }
.product-video-prepare.is-failed { background: #fef2f2; color: #b91c1c; }
.product-video-binding-state { padding-left: 12px; border-left: 1px solid #e5e7eb; }
.product-video-binding-state strong { color: #374151; font-size: 10px; }
.product-video-item-action { display: flex; justify-content: flex-end; }
.product-video-item-action form { width: 100%; }
.product-video-item-action button { width: 100%; min-height: 44px; padding: 0 12px; font-size: 9px; line-height: 1.35; }
.product-video-detach { color: #b91c1c; }
.product-video-readonly { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border-radius: 10px; background: #f3f4f6; color: #6b7280; font-size: 9px; font-weight: 800; }
.product-video-empty { display: flex; min-height: 170px; align-items: center; justify-content: center; gap: 14px; color: #6b7280; text-align: left; }
.product-video-empty > span { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 12px; background: #fff7ed; color: #c2410c; }
.product-video-empty svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.product-video-empty strong { color: #1f2937; font-size: 12px; }
.product-video-empty p { max-width: 620px; margin: 5px 0 0; font-size: 10px; line-height: 1.55; }
.product-video-missing .button-link { min-height: 44px; }

/* Live console */
.live-console {
    --lc-bg: #fff;
    --lc-panel: #fff;
    --lc-line: #e5e7eb;
    --lc-muted: #6b7280;
    --lc-text: #1f2937;
    --lc-cyan: #f97316;
    --lc-green: #15803d;
    --lc-pink: #dc2626;
    --lc-amber: #b45309;
    color: #1f2937;
}
.live-profile-picker select,.console-chip,.console-clock { border-color: #e5e7eb; background: #fff; color: #1f2937; box-shadow: none; }
.console-chip { color: #6b7280; }
.console-chip b { color: #9a3412; }
.console-chip.online b,.console-chip.state-ready b,.console-chip.state-live b { color: #166534; }
.console-panel { border-color: #e5e7eb; background: #fff; box-shadow: none; }
.console-panel-title { border-bottom-color: #e5e7eb; background: #fafafa; color: #7c2d12; }
.program-stage { background: #f5f5f5; }
.program-phone { border: 2px solid #f97316; background: #111; box-shadow: none; }
.live-status-list dt { color: #6b7280; }
.live-status-list dd,.console-table strong,.script-copy strong { color: #1f2937; }
.console-table th { background: #fff7ed; color: #9a5b36; }
.console-table td { border-color: #e5e7eb; color: #4b5563; }
.video-thumb,.product-box { border-color: #d1d5db; background: #fafafa; color: #c2410c; }
.script-copy { color: #4b5563; }
.quick-grid button,.quick-grid a { border-color: #d1d5db; background: #fff; color: #374151; box-shadow: none; }
.quick-grid button:hover,.quick-grid a:hover { border-color: #f97316; background: #fff7ed; color: #c2410c; }
.mini-chart { background: #fafafa; }
.mini-chart i { background: #f97316; }
.console-job { border-color: #fed7aa; background: #fff7ed; }
.console-job strong { color: #c2410c; }
.console-job span { color: #6b7280; }
.console-empty { border-color: #e5e7eb; background: #fff; }
.live-scene-summary,.live-scene-source { border-color: #e5e7eb; background: #fff; }
.live-scene-summary { box-shadow: none; }
.live-scene-summary strong,.live-source-copy strong { color: #1f2937; }
.live-scene-active { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.live-scene-index,.live-source-mark { border-color: #fed7aa; background: #fff7ed; color: #c2410c; box-shadow: none; }
.live-scene-copy small,.live-source-copy small,.live-scene-count { color: #6b7280; }
.live-scene-source:hover { border-color: #fdba74; background: #fffaf5; }
.live-scene-source.is-locked { border-color: #fde68a; background: #fffbeb; }
.live-source-icon { border-color: #d1d5db; background: #fff; color: #6b7280; box-shadow: none; }
.live-source-icon:hover,.live-source-icon.on { border-color: #f97316; background: #fff7ed; color: #c2410c; }
.live-source-icon.lock.on { border-color: #f59e0b; background: #fffbeb; color: #92400e; }

/* Scene Studio */
.scene-studio { --studio-panel:#fff; --studio-panel-2:#fafafa; --studio-cyan:#f97316; --studio-mint:#fb923c; color:#1f2937; }
.scene-studio-head p,.scene-canvas-tools,.scene-list-item small,.source-layer-select small,.source-property-head span { color:#6b7280; }
.scene-studio-grid>.panel,.scene-inspector>.panel { border-color:#e5e7eb; background:#fff; box-shadow:none; }
.scene-panel-head,.scene-composer-bar,.source-property-head,.scene-composer-foot,.scene-rail-actions { border-color:#e5e7eb; }
.studio-icon-button { border-color:#fed7aa; background:#fff7ed; color:#c2410c; }
.studio-icon-button:hover { border-color:#f97316; background:#ffedd5; }
.scene-list-item>button { color:#1f2937; }
.scene-list-item>button:hover { background:#fff7ed; }
.scene-list-item.active>button { border-color:#f97316; background:#fff7ed; box-shadow:inset 3px 0 0 #f97316; }
.scene-number { border-color:#fdba74; color:#c2410c; }
.scene-create-form { border-color:#fed7aa; background:#fff7ed; }
.scene-canvas-shell { background:#f5f5f5; }
.scene-program-canvas { border-color:#f97316; box-shadow:none; }
.scene-composer-foot,.scene-rail-actions { background:#fafafa; color:#6b7280; }
.source-layer-help { border-color:#e5e7eb; background:#fff7ed; color:#6b7280; }
.source-layer-row:hover,.source-layer-row.active { border-color:#fed7aa; background:#fff7ed; }
.source-layer-select { color:#1f2937; }
.source-type-mark { background:#fff7ed; color:#c2410c; }
.layer-state-button,.layer-lock-button { border-color:#d1d5db; background:#fff; color:#6b7280; }
.layer-state-button.on { border-color:#f97316; color:#c2410c; }
.layer-lock-button.on { border-color:#f59e0b; color:#92400e; }
.chroma-settings,.source-property-form,.scene-settings-form { border-color:#e5e7eb; background:#fff; }
.chroma-settings summary b { color:#1f2937; }
.chroma-settings summary small { color:#6b7280; }
.chroma-settings summary em { border-color:#fed7aa; color:#c2410c; }
.chroma-settings-body { border-color:#e5e7eb; }
.chroma-enabled { border-color:#e5e7eb; background:#fafafa; }
.chroma-enabled span { color:#374151; }
.chroma-range output { color:#c2410c; }
.source-coordinates span { border-color:#e5e7eb; color:#6b7280; }
.source-coordinates b { color:#1f2937; }
.studio-modal-scrim { background:rgba(17,24,39,.45); }
.studio-modal-card { border-color:#e5e7eb; background:#fff; box-shadow:none; }
.studio-modal-card>header,.studio-modal-card>footer { border-color:#e5e7eb; }
.studio-modal-card header>button { border-color:#d1d5db; background:#fff; color:#1f2937; }
.source-type-grid label>span { border-color:#e5e7eb; background:#fafafa; }
.source-type-grid input:checked+span { border-color:#f97316; background:#fff7ed; box-shadow:none; }
.source-type-grid b,.source-create-image { border-color:#fed7aa; background:#fff7ed; color:#c2410c; }

.modal-backdrop,.picker-modal-backdrop { background:rgba(17,24,39,.45); backdrop-filter:blur(3px); }
.modal,.picker-modal,.source-modal,.scene-modal { border-color:#e5e7eb; background:#fff; color:#1f2937; box-shadow:none; }

@keyframes flat-page-in { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { .workspace { animation:none; } }
@media (max-width:1100px) {
    .setup-products-toolbar { align-items: stretch; flex-direction: column; }
    .setup-products-filter { flex-wrap: wrap; }
    .setup-product-row { grid-template-columns: 54px minmax(190px,1fr) 120px 88px minmax(210px,238px); }
    .setup-product-row > :nth-child(4),.setup-product-row > :nth-child(5) { display: none; }
}
@media (max-width:760px) {
    .topbar { background:#fff; }
    .workspace { padding:18px 14px 28px; }
    .setup-products-head { align-items: stretch; flex-direction: column; }
    .setup-products-summary > span { flex: 1; min-width: 0; }
    .setup-products-filter { display: grid; grid-template-columns: 1fr 1fr; }
    .setup-products-filter label,.setup-products-filter select,.setup-products-search input { width: 100%; min-width: 0; }
    .setup-products-filter label { grid-column: 1/-1; }
    .setup-product-row { grid-template-columns: 48px minmax(0,1fr); gap: 10px; padding: 14px 2px; }
    .setup-product-thumb { width: 44px; height: 44px; }
    .setup-product-row .setup-product-metric,.setup-product-state { display: none; }
    .setup-product-main strong { white-space: normal; }
    .setup-product-actions { display: grid; grid-column: 1/-1; grid-template-columns: auto minmax(0,1fr) 44px; justify-content: stretch; padding-left: 58px; }
    .setup-product-video-count { text-align: left; }
    .setup-product-video-action { width: 100%; }
    .media-product-video-route { grid-template-columns: 44px minmax(0,1fr); }
    .media-product-video-route .button-link { grid-column: 1/-1; width: 100%; }
    .media-prompt-library { padding: 14px; }
    .media-prompt-head h1 { font-size: 28px; }
    .media-prompt-scope { grid-template-columns: 44px minmax(0,1fr); }
    .media-prompt-scope .button-link { grid-column: 1/-1; width: 100%; white-space: normal; text-align: center; }
    .media-voice-profile-head { grid-template-columns: 48px minmax(0,1fr); }
    .media-voice-profile-key { grid-column: 1/-1; width: 100%; max-width: none; }
    .media-voice-options { grid-template-columns: 1fr; }
    .media-voice-profile-actions { align-items: stretch; flex-direction: column; gap: 10px; }
    .media-voice-profile-actions button { width: 100%; }
    .media-prompt-specs { grid-template-columns: 1fr; }
    .media-prompt-history .media-prompt-records { max-height: none; overflow: visible; }
    .media-prompt-library .media-product-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .media-prompt-library .media-product-actions button { width: 100%; min-width: 0; padding-inline: 8px; white-space: normal; }
    .media-prompt-library .media-product-actions small { grid-column: 1/-1; }
    .product-videos-head { align-items: stretch; flex-direction: column; }
    .product-videos-head-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
    .product-videos-head-actions .button-link,.product-videos-setup-link { width: 100%; white-space: normal; text-align: center; }
    .playlist-workflow-upload-link { width: 100%; white-space: normal; text-align: center; }
    .playlist-shop-empty .playlist-workflow-upload-link { width: 100%; }
    .product-video-summary { grid-template-columns: 64px minmax(0,1fr); gap: 12px; padding: 14px; }
    .product-video-summary-thumb { width: 64px; height: 64px; }
    .product-video-summary-stat { grid-column: 1/-1; grid-template-columns: auto 1fr; align-items: center; min-width: 0; padding: 11px 14px; text-align: left; }
    .product-video-summary-stat strong { font-size: 18px; }
    .product-video-section-head { align-items: stretch; flex-direction: column; gap: 6px; }
    .product-video-upload-form { grid-template-columns: 1fr; }
    .product-video-upload-form > button { min-height: 48px; white-space: normal; }
    .product-video-file-picker { flex-wrap: wrap; }
    .product-video-file-picker input { width: 100%; max-width: none; margin-left: 34px; }
    .product-video-item { grid-template-columns: 46px minmax(0,1fr); gap: 10px; padding: 12px; }
    .product-video-binding-state { grid-column: 1/-1; padding: 10px 0 0; border-top: 1px solid #e5e7eb; border-left: 0; }
    .product-video-item-action { grid-column: 1/-1; }
    .product-video-binding-state small { white-space: normal; }
    .product-video-empty { align-items: flex-start; min-height: 150px; padding: 28px 4px; }
}
@media (max-width:480px) {
    .media-prompt-library { padding: 12px; gap: 16px; }
    .media-prompt-library .media-generator-card,
    .media-prompt-library .media-queue-card { padding: 14px; }
    .media-prompt-head h1 { font-size: 26px; }
    .media-prompt-scope { padding: 12px; }
    .media-voice-profile { padding: 14px; }
    .media-voice-option { grid-template-columns: 22px minmax(0,1fr); min-height: 72px; padding: 12px; }
    .media-voice-option-state { display: none; }
    .media-prompt-permission { grid-template-columns: 44px minmax(0,1fr); gap: 12px; min-height: 210px; padding: 18px 14px; }
    .media-prompt-permission-icon { width: 44px; height: 44px; border-radius: 13px; }
    .media-prompt-permission h2 { font-size: 17px; }
    .media-prompt-steps { grid-template-columns: 1fr; }
    .media-prompt-steps > div { min-height: 0; border-right: 0; border-bottom: 1px solid #dcebe5; }
    .media-prompt-steps > div:last-child { border-bottom: 0; }
    .media-prompt-record > header { align-items: flex-start; flex-direction: column; gap: 5px; }
    .media-prompt-history .media-prompt-ready { padding: 8px; }
    .media-prompt-history .media-prompt-ready button { justify-self: stretch; width: 100%; }
}
