/* Scoped to the AI employee configuration page. Existing screens retain their styles. */
body.persona-focus { --ph-ink: #17233e; --ph-muted: #72819b; --ph-line: #e5ebf5; --ph-blue: #365bff; --ph-soft: #f2f5ff; }
body.persona-focus .main-workspace { padding: 22px 20px 16px; background: #f5f8fd; }
body.persona-focus .workspace-container { overflow: auto; }
.feature-panel.persona-hub-panel { width: 100%; max-width: 1900px; margin: 0 auto; padding: 0 0 12px; background: transparent; border: 0; box-shadow: none; }
.persona-hub-panel > .history-panel-header { margin: 0 0 18px; align-items: flex-start; gap: 16px; }
.persona-hub-panel .feature-panel-heading { min-width: 0; }
.persona-hub-panel .history-eyebrow { color: var(--ph-blue); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.persona-hub-panel .history-panel-header h2 { margin: 6px 0; color: var(--ph-ink); font-size: clamp(24px, 2vw, 32px); line-height: 1.2; letter-spacing: -.035em; }
.persona-hub-panel .feature-panel-subtitle { color: var(--ph-muted); font-size: 13px; line-height: 1.7; margin: 0; }
.persona-hub-panel .history-close-button { padding: 8px 12px; flex: 0 0 auto; }
.persona-hub-panel .business-hero-actions:empty { display: none; }
.ph-hub { min-width: 0; color: var(--ph-ink); font-size: 13px; line-height: 1.55; }
.ph-hub *, .ph-hub *::before, .ph-hub *::after { box-sizing: border-box; }
.ph-hub h3, .ph-hub h4, .ph-hub p { margin: 0; }
.ph-hub h3 { font-size: 16px; font-weight: 750; }
.ph-hub h4 { font-size: 13px; font-weight: 700; }
.ph-hub button, .ph-hub input, .ph-hub select, .ph-hub textarea { font: inherit; }
.ph-hub button { cursor: pointer; }
.ph-hub button:disabled { cursor: not-allowed; opacity: .65; }
.ph-hub button:focus-visible, .ph-hub a:focus-visible, .ph-hub input:focus-visible, .ph-hub select:focus-visible, .ph-hub textarea:focus-visible { outline: 3px solid #bac8ff; outline-offset: 2px; }
.ph-hub input:not([type=checkbox]), .ph-hub select, .ph-hub textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #dce5f3; border-radius: 8px; color: var(--ph-ink); background: #fbfcff; transition: border-color .15s; }
.ph-hub input::placeholder, .ph-hub textarea::placeholder { color: #8e9bb1; }
.ph-hub textarea { resize: vertical; min-height: 64px; max-height: 220px; line-height: 1.65; }
.ph-hub select:disabled { color: #8591a6; background: #f6f8fc; opacity: 1; }
.ph-context { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.25fr) repeat(2, minmax(130px, 1fr)) minmax(180px, 1.3fr); align-items: start; gap: 16px; margin: 0 0 18px; padding: 14px 18px; border: 1px solid var(--ph-line); background: #fff; border-radius: 12px; box-shadow: 0 3px 16px #18387403; }
.ph-context-item { min-width: 0; display: grid; gap: 4px; }
.ph-context-item > span { color: var(--ph-muted); font-size: 11px; }
.ph-context-item strong { padding-top: 5px; overflow-wrap: anywhere; font-size: 12px; }
.ph-context-item small { color: var(--ph-muted); font-size: 10px; }
.ph-context-item select { padding: 8px; font-size: 12px; }
.ph-layout { display: grid; grid-template-columns: 184px minmax(360px, 1fr) minmax(430px, 1.05fr); align-items: start; gap: 14px; }
.ph-nav { display: grid; gap: 8px; padding: 8px 0; position: sticky; top: 0; }
.ph-nav > button { width: 100%; display: flex; align-items: flex-start; gap: 10px; min-height: 72px; padding: 15px 12px; text-align: start; color: #354260; border: 1px solid transparent; border-radius: 10px; background: transparent; position: relative; }
.ph-nav > button.active { background: #eaf0ff; color: #3156ff; }
.ph-nav > button.active::before { content: ''; position: absolute; inset-inline-start: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 4px; background: #365bff; }
.ph-nav > button:hover { background: #edf2fb; }
.ph-nav > button strong { display: block; font-size: 13px; }
.ph-nav > button small { display: block; color: #7e8da7; font-size: 10px; margin-top: 4px; line-height: 1.6; }
.ph-nav-icon { width: 22px; flex: 0 0 22px; padding-top: 2px; }
.ph-nav-icon svg { width: 22px; height: 22px; }
.ph-nav-note { display: grid; justify-items: start; gap: 8px; padding: 20px 12px; margin-top: 20px; color: var(--ph-muted); }
.ph-nav-note svg { width: 22px; height: 22px; color: #6884bb; }
.ph-nav-note strong { color: #52617e; font-size: 11px; }
.ph-nav-note small { font-size: 10px; line-height: 1.75; }
.ph-editor, .ph-preview, .ph-demo { min-width: 0; }
.ph-panel { border: 1px solid var(--ph-line); border-radius: 13px; background: #fff; box-shadow: 0 5px 20px #1f427105; overflow: hidden; }
.ph-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--ph-line); }
.ph-section { padding: 18px; display: grid; gap: 16px; }
.ph-section + .ph-section { border-top: 1px solid #edf1f8; }
.ph-persona-top { display: flex; align-items: center; gap: 18px; }
.ph-avatar { display: grid; place-items: center; flex: 0 0 80px; width: 80px; height: 80px; border: 5px solid #f4f7ff; border-radius: 50%; color: #4564da; background: linear-gradient(135deg, #dce7ff, #f2f0ff); font-size: 27px; font-weight: 750; letter-spacing: -.05em; }
.ph-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1; gap: 12px; min-width: 0; }
.ph-fields label, .ph-field { display: grid; gap: 6px; min-width: 0; font-size: 11px; font-weight: 600; color: #435273; }
.ph-fields input, .ph-fields select, .ph-field input, .ph-field select, .ph-field textarea { font-weight: 400; font-size: 12px; }
.ph-traits { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; border: 0; padding: 0; margin: 0; }
.ph-traits legend { float: inline-start; font-size: 11px; font-weight: 600; color: #435273; padding: 7px 12px 0 0; }
.ph-traits label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 7px; color: #395be3; background: #f0f4ff; font-size: 11px; }
.ph-traits input { accent-color: #4868f5; margin: 0; width: 12px; height: 12px; }
.ph-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ph-switch-card { display: grid; grid-template-columns: minmax(0, 1fr) 25px; gap: 5px; align-items: center; padding: 10px; border: 1px solid var(--ph-line); border-radius: 9px; }
.ph-switch-card span { font-size: 11px; font-weight: 600; }
.ph-switch-card input { appearance: none; width: 25px; height: 15px; border-radius: 20px; background: #dbe2ef; position: relative; margin: 0; }
.ph-switch-card input::after { content: ''; position: absolute; height: 11px; width: 11px; top: 2px; inset-inline-start: 2px; border-radius: 50%; background: white; }
.ph-switch-card small { color: var(--ph-muted); grid-column: 1 / -1; font-size: 10px; }
.ph-pill { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 7px; border-radius: 6px; font-size: 10px; color: #6e7b92; background: #f1f4f9; font-weight: 500; }
.ph-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ph-link { padding: 2px; border: 0; background: transparent; color: var(--ph-blue); font-size: 11px !important; white-space: normal; }
.ph-link:hover { text-decoration: underline; }
.ph-muted { color: var(--ph-muted); font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.ph-note { padding: 9px 10px; border: 1px solid #edf0f8; border-radius: 7px; color: #687892; background: #f8faff; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.ph-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ph-category { display: grid; justify-items: start; gap: 6px; padding: 12px; border: 1px solid #dfe9ff; border-radius: 10px; background: #f3f7ff; color: #3566e6; text-align: start; }
.ph-category .business-ui-icon { width: 23px; height: 23px; }
.ph-category strong { font-size: 11px; }
.ph-category small { font-size: 10px; color: var(--ph-muted); }
.ph-category-1 { color: #119468; border-color: #d8eee5; background: #f2fbf7; }
.ph-category-2 { color: #d38a17; border-color: #f5e8ca; background: #fffbf2; }
.ph-category-3 { color: #8457db; border-color: #e9defd; background: #f8f4ff; }
.ph-category:hover { box-shadow: 0 3px 10px #253f7714; transform: translateY(-1px); }
.ph-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ph-actions > span { width: 100%; }
.ph-button { display: inline-flex; justify-content: center; align-items: center; min-height: 34px; padding: 8px 12px; background: #385bff; border: 1px solid #385bff; border-radius: 8px; color: #fff; text-decoration: none; font-size: 12px; line-height: 1.4; }
.ph-button.secondary { background: #fff; color: #5571cb; border-color: #dce4f8; }
.ph-button:hover:not(:disabled) { filter: brightness(.97); }
.ph-principles { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-principles span { border-radius: 7px; padding: 7px 10px; background: #eff7f3; color: #48896d; font-size: 11px; }
.ph-notice { margin-bottom: 12px; padding: 12px 16px; background: #eef3ff; border: 1px solid #dce6fa; border-radius: 10px; color: #64759b; }
.ph-notice.error { background: #fff6ed; border-color: #f5dec4; color: #976f39; }
.ph-notice button { margin-inline-start: 12px; }
.ph-empty { min-height: 150px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 24px 12px; text-align: center; color: #8491a6; background: linear-gradient(180deg, #f8faff, #fff); border-radius: 10px; }
.ph-empty .business-ui-icon { color: #b2c3e9; width: 34px; height: 34px; }
.ph-empty strong { font-size: 12px; font-weight: 500; }
.ph-file-list { display: grid; gap: 8px; }
.ph-file-row { display: flex; gap: 10px; align-items: center; padding: 12px 8px; border-bottom: 1px solid #edf1f7; }
.ph-file-row > .business-ui-icon { width: 28px; flex: 0 0 28px; height: 28px; padding: 4px; color: #6488de; background: #f0f5ff; border-radius: 7px; }
.ph-file-row > div { flex: 1; min-width: 0; }
.ph-file-row strong, .ph-file-row small { display: block; overflow-wrap: anywhere; }
.ph-file-row strong { font-size: 12px; }
.ph-file-row small { font-size: 10px; color: var(--ph-muted); margin-top: 4px; }
.ph-file-row > button { flex: 0 0 auto; }
.ph-text-knowledge { display: grid; gap: 10px; }
.ph-text-knowledge h4, .ph-text-knowledge p { margin: 0; }
.ph-text-knowledge textarea { resize: vertical; min-height: 130px; }
.ph-text-share { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.ph-text-share input { flex: 0 0 auto; margin-top: 2px; }
.ph-text-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ph-text-state { color: #3c5c91; }
.ph-text-state button { margin-top: 6px; }
.ph-facts { display: grid; grid-template-columns: minmax(70px, .85fr) minmax(0, 1.15fr); gap: 10px 8px; margin: 0; font-size: 12px; }
.ph-facts dt { color: var(--ph-muted); }
.ph-facts dd { margin: 0; overflow-wrap: anywhere; }
.ph-boundary-legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10px; }
.ph-boundary-legend span { border-radius: 6px; padding: 6px 8px; background: #f5f7fb; }
.ph-boundary-legend .auto, .ph-rule-allow { color: #22966d; }
.ph-boundary-legend .confirm, .ph-rule-confirm { color: #b58432; }
.ph-boundary-legend .deny, .ph-rule-deny { color: #ab6379; }
.ph-boundary-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #edf1f7; }
.ph-boundary-row select { max-width: 200px; width: 58%; font-size: 12px; }
.ph-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ph-methods > div { display: grid; gap: 7px; padding: 14px; background: #fbfcff; border: 1px solid var(--ph-line); border-radius: 9px; }
.ph-methods strong { font-size: 12px; }
.ph-methods small { font-size: 10px; color: var(--ph-muted); }
.ph-methods button { color: #73839d; background: #f0f3f8; border: 0; padding: 5px; border-radius: 6px; font-size: 10px; }
.ph-segments { display: flex; flex-wrap: wrap; gap: 5px; }
.ph-segments button { border: 1px solid #e5ebf6; border-radius: 7px; padding: 7px 9px; background: #fafbfe; color: var(--ph-muted); font-size: 11px; }
.ph-segments button.active { background: #edf2ff; border-color: #d3defe; color: #365bff; }
.ph-capabilities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ph-capabilities > div { display: grid; gap: 5px; padding: 10px; border: 1px solid var(--ph-line); border-radius: 8px; }
.ph-capabilities span { font-size: 11px; }
.ph-capabilities small { font-size: 10px; color: var(--ph-muted); }
.ph-preview-disclaimer { padding: 10px 16px; background: #f8faff; border-bottom: 1px solid var(--ph-line); color: #8492a9; font-size: 10px; line-height: 1.7; }
.ph-preview-grid { display: grid; grid-template-columns: minmax(200px, 1.25fr) minmax(170px, 1fr); }
.ph-demo { display: flex; flex-direction: column; padding: 16px 12px; }
.ph-preview-persona { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.ph-avatar.small { width: 32px; height: 32px; flex-basis: 32px; border-width: 2px; font-size: 12px; }
.ph-preview-persona > span:nth-child(2) { min-width: 0; flex: 1; }
.ph-preview-persona strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.ph-preview-persona small { display: block; font-size: 10px; color: #8591a7; overflow-wrap: anywhere; }
.ph-scenarios { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 20px; }
.ph-scenarios button { padding: 4px 7px; color: #7b8dae; background: #f9fbff; border: 1px solid #e7edf8; border-radius: 6px; font-size: 10px; }
.ph-scenarios button:hover { color: #365bff; border-color: #b3c3f8; }
.ph-messages { display: grid; align-content: start; gap: 24px; min-height: 275px; padding: 0 0 24px; }
.ph-message { max-width: 95%; padding: 12px; border: 1px solid #eef1f7; border-radius: 2px 10px 10px; background: #f5f7fb; overflow-wrap: anywhere; }
.ph-message small { display: block; color: #7d8ca8; font-size: 10px; margin-bottom: 7px; }
.ph-message p { font-size: 12px; line-height: 1.8; white-space: pre-wrap; }
.ph-message.outgoing { justify-self: end; background: #eaf0ff; border-color: #e0e9ff; border-radius: 10px 2px 10px 10px; color: #304374; }
.ph-composer { padding: 12px; border: 1px solid #e1e8f5; border-radius: 10px; margin-top: auto; background: #fff; }
.ph-composer > label { font-size: 10px; color: #8290a9; }
.ph-composer textarea { border: 0; padding: 8px 0; background: transparent; font-size: 12px; }
.ph-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ph-composer > div > span { font-size: 9px; color: #98a2b5; }
.ph-composer .ph-button { padding: 7px 10px; font-size: 11px; }
.ph-preview-context { padding: 12px; border-inline-start: 1px solid var(--ph-line); background: #fcfdff; min-width: 0; }
.ph-preview-context > section { padding: 13px 10px; border: 1px solid var(--ph-line); border-radius: 9px; background: #fff; display: grid; gap: 13px; margin-bottom: 12px; }
.ph-preview-context .ph-facts { font-size: 10px; gap: 9px 6px; }
.ph-preview-context .ph-field input { font-size: 10px; }
.ph-preview-context h4 { font-size: 11px; }
.ph-preview-context .ph-muted, .ph-preview-context .ph-note { font-size: 10px; }
.ph-rule-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-size: 10px; }
.ph-rule-row small { flex-shrink: 0; font-size: 9px; }
@media (min-width: 981px) {
    body.persona-focus { --sidebar-width: 210px; --header-height: 68px; }
    body.persona-focus .sidebar { width: var(--sidebar-width); flex-basis: var(--sidebar-width); background: #101d30; padding: 18px 12px; }
    body.persona-focus .sidebar-label { display: inline; font-size: 12px; }
    body.persona-focus .sidebar-brand-copy { display: grid; }
    body.persona-focus .sidebar-brand-copy strong { font-size: 17px; }
    body.persona-focus .sidebar-brand-copy small { font-size: 9px; }
    body.persona-focus .sidebar-brand { gap: 8px; margin-bottom: 22px; }
    body.persona-focus .sidebar-item { justify-content: flex-start; gap: 10px; min-height: 47px; padding: 10px; }
    body.persona-focus .sidebar .menu-icon { width: 26px; height: 26px; flex-basis: 26px; border: 0; background: transparent; }
    body.persona-focus .sidebar-item.active { background: #243a59; border-radius: 9px; }
    body.persona-focus .header-search-area { max-width: 650px; height: 42px; }
}
@media (min-width: 1750px) { .ph-categories, .ph-switches { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ph-layout { grid-template-columns: 200px minmax(430px, 1fr) minmax(560px, 1.05fr); } }
@media (max-width: 1500px) and (min-width: 981px) {
    body.persona-focus { --sidebar-width: 184px; }
    body.persona-focus .sidebar-brand-copy strong { font-size: 14px; }
    body.persona-focus .main-workspace { padding: 18px 14px 12px; }
    .ph-layout { grid-template-columns: 160px minmax(330px, 1fr) minmax(380px, 1fr); gap: 10px; }
    .ph-nav > button { padding: 13px 9px; gap: 7px; }
    .ph-nav > button small { font-size: 9px; }
    .ph-section { padding: 15px; }
    .ph-persona-top { gap: 10px; }
    .ph-avatar { width: 54px; height: 54px; flex-basis: 54px; font-size: 21px; }
    .ph-preview-grid { grid-template-columns: minmax(180px, 1.25fr) minmax(158px, 1fr); }
    .ph-preview-context { padding: 9px; }
    .ph-rule-row { flex-wrap: wrap; gap: 2px; }
}
@media (max-width: 1230px) {
    .ph-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ph-layout { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); }
    .ph-nav { grid-column: 1 / -1; display: flex; overflow-x: auto; gap: 5px; padding: 0; position: static; }
    .ph-nav > button { width: auto; min-height: 48px; flex: 0 0 auto; align-items: center; padding: 10px; }
    .ph-nav > button strong { font-size: 11px; }
    .ph-nav > button small, .ph-nav-note { display: none; }
    .ph-nav-icon { width: 18px; flex-basis: 18px; }
    .ph-nav-icon svg { width: 18px; height: 18px; }
    .ph-context-end { grid-column: span 2; }
    .ph-preview-grid { display: block; }
    .ph-preview-context { border-inline-start: 0; border-top: 1px solid var(--ph-line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ph-preview-context > section:last-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) { .ph-layout { grid-template-columns: minmax(0, 1fr); } .ph-preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); } .ph-preview-context { display: block; border-top: 0; border-inline-start: 1px solid var(--ph-line); } }
@media (max-width: 620px) {
    body.persona-focus .main-workspace { padding: 12px; }
    .ph-context { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
    .ph-context-end { grid-column: 1 / -1; }
    .ph-preview-grid { display: block; }
    .ph-preview-context { border-inline-start: 0; border-top: 1px solid var(--ph-line); }
    .ph-persona-top { align-items: flex-start; }
    .ph-avatar { width: 46px; height: 46px; flex-basis: 46px; font-size: 18px; }
    .ph-fields { grid-template-columns: minmax(0, 1fr); }
    .ph-panel-head { flex-wrap: wrap; padding: 14px; }
    .ph-section { padding: 14px; }
    .ph-methods, .ph-capabilities { grid-template-columns: minmax(0, 1fr); }
    .ph-messages { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .ph-hub *, .ph-hub *::before, .ph-hub *::after { transition: none; } }

/* Workspace publication is separate from the local preview. */
.ph-publication-note { padding: 12px 16px; margin-bottom: 10px; border: 1px solid var(--ph-line); border-radius: 10px; color: #526581; background: #f6f9ff; font-size: 12px; line-height: 1.6; }
.ph-publication { margin: 12px 16px; padding: 14px; border: 1px solid var(--ph-line); border-radius: 10px; background: #f7faff; display: grid; gap: 10px; min-width: 0; }
.ph-publication strong { color: #244dc7; font-size: 13px; }
.ph-publication small { display: block; color: #64748b; font-size: 10px; margin-top: 5px; overflow-wrap: anywhere; }
.ph-publication p { margin: 0; color: #64748b; font-size: 11px; line-height: 1.6; }
.ph-publication.error { border-color: #e6b974; background: #fffaf0; }
.ph-publication.error p, .ph-publication.error strong { color: #874d17; }
.ph-publication-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ph-publication-actions button:disabled { opacity: .5; cursor: not-allowed; }
