/* Local customer-template workflow. Full values wrap at narrow widths. */
.customer-template-panel { margin: 1rem 0; padding: 1rem; border: 1px solid var(--border-color, #3f3f46); border-radius: 12px; background: var(--bg-card, #121215); min-width: 0; max-width: 100%; color: var(--text-primary, #f4f4f5); }
.customer-template-panel > summary { cursor: pointer; font-weight: 650; line-height: 1.5; }
#customer-template-ui { min-width: 0; padding-top: .75rem; overflow-wrap: anywhere; }
#customer-template-ui *, #customer-template-ui *::before, #customer-template-ui *::after { box-sizing: border-box; }
#customer-template-ui h3, #customer-template-ui h4, #customer-template-ui h5, #customer-template-ui h6 { margin: .8rem 0 .5rem; line-height: 1.45; }
#customer-template-ui h3 { font-size: 1.1rem; } #customer-template-ui h4 { font-size: 1rem; } #customer-template-ui h5, #customer-template-ui h6 { font-size: .9rem; }
#customer-template-ui p, #customer-template-ui li { line-height: 1.55; margin: .55rem 0; }
#customer-template-ui ul { padding-inline-start: 1.3rem; }
#customer-template-ui label { display: block; line-height: 1.5; margin: .6rem 0 .35rem; }
#customer-template-ui input[type=file], #customer-template-ui select { width: 100%; max-width: 100%; min-width: 0; padding: .55rem; font: inherit; border: 1px solid var(--border-color, #3f3f46); border-radius: 6px; background: var(--bg-card, #121215); color: inherit; }
#customer-template-ui input::file-selector-button { max-width: 100%; white-space: normal; }
#customer-template-ui button { max-width: 100%; min-height: 40px; white-space: normal; text-align: start; overflow-wrap: anywhere; border: 1px solid var(--border-color, #52525b); border-radius: 6px; padding: .55rem .8rem; background: var(--bg-card, #121215); color: inherit; font: inherit; cursor: pointer; }
#customer-template-ui button:disabled { opacity: .55; cursor: not-allowed; }
#customer-template-ui [hidden] { display: none !important; }
#customer-template-ui :focus-visible { outline: 3px solid #10b981; outline-offset: 3px; }
#customer-template-ui details { margin: .75rem 0; padding: .6rem; border: 1px solid var(--border-color, #3f3f46); border-radius: 6px; }
#customer-template-ui summary { cursor: pointer; overflow-wrap: anywhere; line-height: 1.5; }
#customer-template-ui dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: .5rem; }
#customer-template-ui dd { margin: 0; overflow-wrap: anywhere; }
#customer-template-ui dt { font-weight: 600; }
.ct-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.ct-targets, .ct-compare-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
.ct-target, .ct-change { min-width: 0; margin: .65rem 0; padding: .75rem; border: 1px solid var(--border-color, #3f3f46); border-radius: 8px; }
.ct-preset { min-width: 0; margin: .8rem 0; padding: .75rem; border: 2px solid var(--border-color, #52525b); border-radius: 8px; }
#customer-template-ui #ct-preset-scope dd { white-space: pre-wrap; }
#customer-template-ui #ct-preset-scope { padding: .6rem; border-radius: 6px; background: var(--bg-secondary, #1c1c21); }
.ct-target legend { max-width: 100%; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
#customer-template-ui .ct-value { font: inherit; font-size: .88rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; background: var(--bg-secondary, #1c1c21); padding: .7rem; border-radius: 5px; max-width: 100%; min-width: 0; margin: .5rem 0; tab-size: 4; }
#customer-template-ui .ct-check { display: flex; align-items: flex-start; gap: .55rem; }
#customer-template-ui .ct-check input { flex: 0 0 auto; margin-top: .25rem; width: 1.1rem; height: 1.1rem; }
.ct-draft-label { color: #fbbf24; font-weight: 700; padding: .6rem; background: rgba(245, 158, 11, 0.12); border: 1px solid #ce9b39; border-radius: 6px; }
#ct-error, .ct-refusal { color: #f87171; background: rgba(255, 26, 92, 0.12); padding: .6rem; border: 1px solid #e3ada7; border-radius: 6px; }
#ct-conflict { border: 2px solid #bb7719; border-radius: 8px; padding: .75rem; }
#ct-preview-output { margin-top: 1rem; padding-top: .5rem; border-top: 2px solid var(--border-color, #52525b); }
@media (max-width: 760px) { .ct-targets, .ct-compare-columns, #customer-template-ui dl { grid-template-columns: minmax(0, 1fr); } .customer-template-panel { padding: .7rem; } .ct-target, .ct-change { padding: .6rem; } }
@media (prefers-color-scheme: dark) { body.dark .ct-draft-label { color: #f7d393; background: #0c0c0f; } body.dark #ct-error, body.dark .ct-refusal { color: #ffb4ac; background: #27272a; } }
