* { box-sizing: border-box; }
body { margin: 0; color: var(--ui-text); background: var(--ui-surface); font-family: var(--ui-font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--fraga-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
a, button, input, select, textarea, summary, [tabindex] { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--fraga-link); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 21px; line-height: 1.3; letter-spacing: -.025em; font-weight: 600; margin: 0; }
h2 { font-size: 15px; line-height: 1.4; font-weight: 600; margin: 0; }
h3 { font-size: 14px; font-weight: 600; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 192px; padding: 24px 12px 16px; background: var(--fraga-ink); color: #EFEFF3; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; padding: 0 12px; margin-bottom: 28px; border-radius: var(--ui-radius); }
.brand:hover { text-decoration: none; background: #FFFFFF0A; }
.brand img { display: block; width: 144px; max-width: 100%; height: auto; object-fit: contain; }

.nav-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 8px 12px; margin: 3px 0; font-size: 14px; border-radius: var(--ui-radius); color: #B6B6C0; }
.icon { display: inline-block; width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -.15em; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item.active { color: #FFFFFF; background: #FFFFFF12; box-shadow: inset 2px 0 var(--fraga-accent); }
.nav-item:hover { background: #FFFFFF16; color: white; text-decoration: none; }
.sidebar-foot { margin-top: auto; padding: 16px 12px 0; display: flex; flex-direction: column; gap: 12px; }
.demo-label { align-self: flex-start; padding: 3px 6px; border: 1px solid #FFFFFF26; border-radius: 4px; color: #D0D0D8; font-size: 12px; }
.side-caption { font-size: 12px; color: #92929E; }
.workspace { margin-left: 192px; min-height: 100vh; }

.account-menu { position: relative; flex: 0 0 auto; font-size: 13px; }
.account-trigger { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 6px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); cursor: pointer; list-style: none; }
.account-trigger::-webkit-details-marker { display: none; }
.account-trigger::marker { content: ''; }
.account-trigger:hover, .account-menu[open] .account-trigger { background: var(--ui-subtle); }
.account-trigger > .icon { width: 12px; height: 12px; color: var(--ui-muted); }
.account-menu[open] .account-trigger > .icon { transform: rotate(180deg); }
.account-popover { position: absolute; top: calc(100% + 8px); right: 0; width: 280px; max-width: calc(100vw - 24px); padding: 6px; z-index: 50; background: white; border: 1px solid var(--ui-line); border-radius: 8px; }
.account-info { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--ui-line); overflow-wrap: anywhere; }
.account-info strong { font-size: 14px; font-weight: 600; }
.account-role { color: var(--ui-muted); font-size: 12px; }
.account-popover form { margin: 0; }
.account-action { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 9px 10px; border: 0; border-radius: var(--ui-radius); background: transparent; color: var(--ui-text); font-size: 14px; text-align: left; }
.account-action:hover { background: var(--ui-subtle); text-decoration: none; }
.account-action .icon { color: var(--ui-muted); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; background: #F0F0F4; color: #585864; border: 1px solid var(--ui-line); border-radius: 50%; font-size: 12px; font-weight: 600; }
.link-button { padding: 0; border: 0; background: none; color: var(--ui-muted); font-size: 13px; }
.link-button:hover { color: var(--ui-text); }
.quiet-link { color: var(--ui-muted); font-size: 13px; }
.quiet-link:has(> .icon), .inline-action:has(> .icon), .pagination a { display: inline-flex; align-items: center; gap: 5px; }
.content { padding: 24px; max-width: 1800px; margin: 0 auto; }
.page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-header > .page-heading { flex: 1; min-width: 0; margin: 0; }
.page-header .back-link { margin: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 20px; }
.heading-actions, .button-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.count-badge { display: inline-block; font-size: 13px; font-weight: 500; color: var(--ui-muted); padding: 2px 7px; background: var(--ui-subtle); border: 1px solid var(--ui-line); border-radius: 5px; margin-left: 6px; vertical-align: middle; letter-spacing: 0; }
.subtle { color: var(--ui-muted); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 7px 12px; border: 1px solid transparent; border-radius: var(--ui-radius); font-size: 14px; font-weight: 500; line-height: 1.35; white-space: nowrap; }
.button:hover { text-decoration: none; }
.primary { background: var(--fraga-accent); color: var(--fraga-ink); border-color: var(--fraga-accent); font-weight: 600; }
.primary:hover { background: #FF6076; border-color: #FF6076; }
.secondary { background: white; color: #393943; border-color: #DCDCE3; }
.secondary:hover { background: var(--ui-subtle); }
.full { width: 100%; }
.small { min-height: 30px; padding: 5px 10px; }
.panel { border: 1px solid var(--ui-line); border-radius: 8px; background: white; padding: 20px; margin-bottom: 16px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.queue-panel { border: 1px solid var(--ui-line); border-radius: 8px; overflow: hidden; }
.panel-tabs { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--ui-line); }
.panel-tabs nav { display: flex; gap: 22px; }
.tab { display: inline-block; padding: 13px 0 12px; color: var(--ui-muted); border-bottom: 2px solid transparent; font-size: 14px; }
.tab:hover { color: var(--ui-text); text-decoration: none; }
.tab.selected { color: var(--ui-text); font-weight: 500; border-color: var(--fraga-accent); }
.inline-stats { display: flex; align-items: center; gap: 18px; color: var(--ui-muted); font-size: 12px; }
.inline-stats strong { color: var(--ui-text); font-size: 13px; font-weight: 500; margin-left: 4px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--ui-line); background: #FCFCFD; }
.filters .search-field { width: 220px; }
.filter-feedback { font-size: 12px; }
.filter-feedback:empty { display: none; }
[data-list-results][aria-busy="true"] { opacity: .55; }
.search-field input, .field input, .field textarea { display: block; width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid #DADAE2; border-radius: var(--ui-radius); color: var(--ui-text); background: white; font-size: 14px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #7B7B87; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: #51515E; font-weight: 500; margin-bottom: 7px; }
.field textarea { resize: vertical; min-height: 76px; }
/* All CRM dropdowns share the communication form's control styling. */
select { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 36px; padding: 8px 32px 8px 10px; border: 1px solid #DADAE2; border-radius: var(--ui-radius); color: var(--ui-text); background-color: white; font-size: 14px; line-height: 1.4; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='m3 5 4 4 4-4' stroke='%23666671' stroke-width='1.2' fill='none'/%3E%3C/svg%3E"); background-position: right 10px center; background-repeat: no-repeat; cursor: pointer; }
select:hover:not(:disabled) { border-color: #B5B5C2; }
select:disabled { background-color: var(--ui-subtle); color: var(--ui-muted); cursor: not-allowed; }
.checkbox { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 14px; color: #575763; }
.checkbox input { accent-color: var(--fraga-link); width: 15px; height: 15px; margin: 0; }
.filter-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.advanced-filters { border: 0; width: 100%; padding: 12px 0 0; margin: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; border-top: 1px solid var(--ui-line); }
.advanced-filters .field { margin: 0; }
.table-wrap { overflow: auto; max-height: calc(100dvh - 260px); min-height: 180px; }
.queue-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 14px; }
.queue-table th { position: sticky; top: 0; z-index: 1; background: #FAFAFC; color: var(--ui-muted); font-weight: 500; font-size: 12px; padding: 10px 11px; border-bottom: 1px solid var(--ui-line); }
.queue-table td { padding: 12px 11px; border-bottom: 1px solid #F0F0F4; vertical-align: middle; }
.queue-table tbody tr:hover { background: #FAFAFC; }
.queue-table tbody tr:last-child td { border-bottom: 0; }
.queue-table small { display: block; font-size: 12px; color: var(--ui-muted); margin-top: 4px; font-weight: 400; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.net { font-weight: 500; }
.client-id { display: flex; align-items: center; gap: 7px; }
.player-link { color: var(--ui-text); font-weight: 500; font-variant-numeric: tabular-nums; }
.player-link:hover { color: var(--fraga-link); }
.own-row td:first-child { box-shadow: inset 2px 0 #F13E564D; }
.own-dot { color: var(--fraga-link); background: #FFF0F3; border-radius: 4px; padding: 1px 5px; font-size: 11px; font-weight: 500; }
.reason-list { display: flex; flex-direction: column; gap: 4px; color: #555562; font-size: 13px; }
.phone { font-variant-numeric: tabular-nums; font-size: 13px; }
.result-label { font-size: 13px; }
.status, .tag { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 1.35; background: #F1F1F5; color: #5C5C69; white-space: nowrap; }
.status.new { background: #F1F1F5; color: #5C5C69; }
.status.in_progress { background: #F0EDFA; color: #675399; }
.status.deferred { background: #FAF2E2; color: #806022; }
.status.completed { background: #EAF3EC; color: #416F4E; }
.status.cancelled { background: #F7ECEE; color: #8E3B4A; }
.danger-text { color: #A53B44 !important; }
.table-footer { border-top: 1px solid var(--ui-line); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ui-muted); font-size: 12px; }
.footer-divider { color: #B5B5BF; padding: 0 7px; }
.pagination { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.pagination a { color: #555562; }
.notice { padding: 10px 12px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: #F8F8FA; font-size: 13px; margin-bottom: 16px; }
.notice.success { color: #386549; background: #F2F7F3; border-color: #DCE9E0; }
.notice.warning { color: #806022; background: #FFF9EC; border-color: #F0E6CD; }
.errorlist { margin: 6px 0 12px; padding: 9px 10px; list-style: none; color: #A12C3E; background: #FFF0F3; border-radius: 5px; font-size: 13px; }
.empty { padding: 50px 20px; text-align: center; }
.empty h2 { margin-bottom: 12px; }
.empty-inline { font-size: 14px; color: var(--ui-muted); margin: 0; }
.player-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tier-label { font-size: 14px; color: #61616D; }
.player-subtitle { font-size: 13px; color: var(--ui-muted); margin: 8px 0 0; }
.player-subtitle>span { margin-left: 7px; }
.back-link { display: inline-flex; margin-bottom: 12px; }
.player-layout { display: grid; grid-template-columns: minmax(0,1fr) 350px; gap: 20px; align-items: start; }
.player-aside { position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 2px; margin: 0 -2px; }
.player-aside > :last-child { margin-bottom: 0; }
.finance-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.finance-grid span { color: var(--ui-muted); font-size: 13px; }
.finance-grid strong { display: block; font-size: 22px; font-weight: 600; margin-top: 8px; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.finance-grid>div+div { padding-left: 18px; border-left: 1px solid var(--ui-line); }
.panel-note { font-size: 12px; color: var(--ui-muted); margin: 16px 0 0; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0; }
.details-grid dt { font-size: 13px; color: var(--ui-muted); margin-bottom: 5px; }
.details-grid dd { font-size: 14px; margin: 0; font-weight: 500; }
.verified { color: #477B56; margin-left: 6px; }
.spaced { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.reason { border: 1px solid var(--ui-line); border-radius: 4px; padding: 4px 7px; font-size: 12px; background: #FAFAFC; }
.timeline-entry { padding: 16px 0; border-top: 1px solid var(--ui-line); }
.timeline-entry:first-child { padding-top: 0; border-top: 0; }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.timeline-head strong { font-size: 14px; font-weight: 500; }
.timeline-head time { font-size: 12px; color: var(--ui-muted); white-space: nowrap; }
.result-comment { font-size: 14px; color: #575763; margin: 9px 0 7px; overflow-wrap: anywhere; }
.entry-meta { font-size: 12px; color: var(--ui-muted); }
.entry-meta .tag { margin-left: 8px; }
.history-details summary, .task-settings summary { font-size: 14px; color: #5C5C68; cursor: pointer; }
.task-settings[open] summary { margin-bottom: 18px; }
.history-item, .archive-entry { border-top: 1px solid var(--ui-line); padding-top: 14px; margin-top: 14px; font-size: 13px; }
.history-item strong, .archive-entry strong { font-weight: 500; }
.history-item p, .archive-entry p { margin: 6px 0; }
.archive-entry small { color: var(--ui-muted); }
.narrow { max-width: 560px; }
.delegation-layout { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 20px; }
.delegation-entry { padding: 16px 0; border-top: 1px solid var(--ui-line); font-size: 14px; }
.delegation-entry:first-of-type { border-top: 0; padding-top: 0; }
.delegation-entry strong { font-weight: 500; }
.delegation-entry p { font-size: 13px; color: var(--ui-muted); margin: 7px 0; }
.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; background: #F7F7F9; }
.login-form { width: 100%; max-width: 354px; padding: 28px; border: 1px solid #E4E4EB; border-radius: 10px; background: white; }
.login-logo { display: block; object-fit: contain; margin-bottom: 22px; }
.login-form h1 { font-size: 20px; margin-bottom: 24px; }
.login-form .field { margin-bottom: 16px; }
.login-form .button { min-height: 38px; margin-top: 4px; }
.login-note { color: var(--ui-muted); font-size: 12px; margin: 18px 0 0; }
.skip { position: fixed; top: -80px; left: 12px; z-index: 100; padding: 10px 14px; background: white; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .sidebar { width: 174px; }
  .workspace { margin-left: 174px; }
  .content { padding: 20px; }

  .player-layout { grid-template-columns: minmax(0,1fr) 320px; gap: 16px; }
  .finance-grid strong { font-size: 18px; }
  .panel { padding: 18px; }
}
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; flex-direction: row; align-items: center; gap: 20px; padding: 12px 16px; }
  .brand { flex-shrink: 0; padding: 0; margin: 0; }
  .brand img { width: 114px; height: 38px; }
  .sidebar nav { display: flex; flex-wrap: wrap; margin-left: auto; }
  .sidebar-foot { display: none; }
  .nav-item { margin: 0; font-size: 13px; }
  .workspace { margin-left: 0; }

  .player-layout { grid-template-columns: 1fr; }
  .player-aside { order: -1; position: static; max-height: none; overflow: visible; padding: 0; margin: 0; }
  .outcome-panel form { max-width: 100%; }
  .delegation-layout { grid-template-columns: 1fr; }
  .table-wrap { max-height: calc(100dvh - 310px); }
}
@media (max-width: 600px) {
  .sidebar { flex-wrap: wrap; gap: 8px; }
  .sidebar nav { margin-left: auto; gap: 0; }
  .nav-item { font-size: 12px; padding: 8px; }
  .content { padding: 16px 12px; }

  .page-header { align-items: flex-start; gap: 12px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .heading-actions { gap: 10px; }
  .heading-actions>.subtle { display: none; }
  .panel-tabs { padding: 0 12px; }
  .inline-stats { gap: 10px; }
  .filters { gap: 12px; padding: 12px; }
  .filters .search-field { flex: 1 1 100%; width: auto; }
  .filter-actions { flex-wrap: wrap; }
  .advanced-filters { grid-template-columns: 1fr 1fr; }
  .table-footer { flex-wrap: wrap; }
  .table-wrap { max-height: 60dvh; }
  .finance-grid { gap: 10px; }
  .finance-grid>div+div { padding-left: 10px; }
  .finance-grid strong { font-size: 17px; }
  .timeline-head { flex-direction: column; gap: 4px; }
  .button, .field input, select, .search-field input { min-height: 42px; }
  .player-title { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Communication log and scoped exports. */
.export-control { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.export-control select { width: auto; }
.contact-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--ui-line); padding-bottom: 14px; margin-bottom: 18px; font-size: 13px; }
.contact-summary strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.field-help { display: block; font-size: 12px; color: var(--ui-muted); margin-top: 5px; }
.dialogue-result { margin: 8px 0; font-size: 14px; }
.entry-meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.form-actions { display: flex; gap: 10px; align-items: center; }
.contact-status-label { font-size: 13px; font-weight: 500; }
.contact-cell { max-width: 210px; white-space: normal; }
.contact-cell small { line-height: 1.4; }
@media (max-width: 600px) { .export-control { flex-wrap: wrap; } .contact-cell { min-width: 170px; } }
.role-preview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; background: #FFF8E9; border-color: #F0E6CD; }
.role-preview form { margin: 0; }
.analytics-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.task-proposal { box-shadow: inset 0 2px var(--fraga-accent); }
.proposal-actions { display: flex; flex-direction: column; gap: 8px; }
.analytics-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.analytics-filters .field { min-width: 170px; margin-bottom: 0; }
.summary-list { margin: 0; }
.summary-list>div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--ui-line); }
.summary-list>div:first-child { padding-top: 0; }
.summary-list>div:last-child { border: 0; padding-bottom: 0; }
.summary-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.analytics-table { max-height: none; min-height: 0; }
.panel-tabs { min-height: 46px; }
@media (min-width: 901px) { .nav-item { font-size: 13px; padding-left: 10px; padding-right: 8px; gap: 7px; } }
@media (max-width: 900px) { .sidebar { flex-wrap: wrap; } .sidebar nav { flex-wrap: wrap; gap: 3px; } }
@media (max-width: 600px) { .analytics-layout { grid-template-columns: 1fr; gap: 0; } .sidebar nav { width: 100%; margin-left: 0; } .nav-item { flex: 1 1 auto; justify-content: center; } .inline-stats { font-size: 12px; } }

.optional-callback { margin: 0 0 18px; font-size: 13px; color: var(--ui-muted); }
.optional-callback summary { cursor: pointer; }
.optional-callback[open] summary { margin-bottom: 12px; }


/* Admin activity uses the existing timeline and form controls. */
.activity-people { margin-bottom: 24px; }
.activity-people .table-wrap { min-height: 0; }
.activity-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; border-bottom: 1px solid var(--ui-line); }
.activity-filters .field { flex: 1 1 150px; min-width: 0; margin: 0; }
.activity-filters .field select, .activity-filters .field input { width: 100%; box-sizing: border-box; }
.activity-filter-actions { display: flex; align-items: center; gap: 12px; }
.activity-note { margin: 16px 0; max-width: 900px; }
.activity-filters { margin-bottom: 20px; }
.event-body strong { font-size: 14px; }
.event-body { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .activity-filters .field { flex-basis: 100%; } }

/* Phone: tap to call, one-click copy. */
.phone-actions { display: inline-flex; align-items: center; gap: 4px; }
.phone-link { color: inherit; font-variant-numeric: tabular-nums; }
.phone-link:hover { color: var(--fraga-link); }
.copy-button { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 2px 5px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--ui-muted); font-size: 12px; font-weight: 500; line-height: 1; }
.copy-button .icon { width: 14px; height: 14px; }
.copy-button:hover { color: var(--ui-text); background: var(--ui-subtle); border-color: var(--ui-line); }
.copy-button.copied { color: #416F4E; }
.copy-label:empty { display: none; }
@media (max-width: 600px) { .copy-button { min-height: 36px; min-width: 36px; justify-content: center; } }

/* Task status: current → chosen, one list of options, hints only where they change the action. */
.tag.attention { background: #FFF0F3; color: var(--fraga-link); }
.status-transition { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.status-transition .status { font-size: 13px; padding: 4px 8px; }
.transition-arrow { color: var(--ui-muted); }
.proposal-reason { font-size: 13px; color: #4A4A55; margin: 0 0 14px; }
.saved-contact-context { padding: 10px 12px; margin: 0 0 16px; background: var(--ui-subtle); border-radius: var(--ui-radius); font-size: 13px; }
.saved-contact-context p { margin: 4px 0 0; font-weight: 500; }
.saved-contact-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.inline-action { font-size: 13px; font-weight: 500; white-space: nowrap; }
.status-field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.status-field legend { padding: 0; font-size: 14px; color: #51515E; font-weight: 500; margin-bottom: 7px; }
.status-options { border: 1px solid #DADAE2; border-radius: var(--ui-radius); overflow: hidden; background: white; }
.status-option, .field .status-option { display: flex; align-items: center; gap: 10px; min-height: 38px; margin: 0; padding: 8px 12px; border-top: 1px solid var(--ui-line); color: var(--ui-text); font-size: 14px; font-weight: 400; cursor: pointer; }
.status-option:first-child { border-top: 0; }
.status-option:hover { background: var(--ui-subtle); }
.status-option input { margin: 0; width: 15px; height: 15px; accent-color: var(--fraga-link); flex: 0 0 auto; }
.status-option:has(input:checked) { background: #FFF5F7; }
.status-option:has(input:checked) .option-name { font-weight: 600; }
.status-option:has(input:focus-visible) { outline: 2px solid var(--fraga-link); outline-offset: -2px; }
.option-tag { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--ui-muted); white-space: nowrap; }
.option-tag + .option-tag { margin-left: 6px; }
.option-tag.recommended { color: var(--fraga-link); }
.status-hint { margin-top: 7px; }
.status-hint:empty, .field-help:empty { display: none; }
.label-note { font-weight: 400; color: var(--ui-muted); font-size: 12px; margin-left: 4px; }
.label-note.required { color: #A12C3E; font-weight: 500; }
.callback-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { min-height: 28px; padding: 4px 10px; border: 1px solid #DCDCE3; border-radius: 999px; background: white; color: #393943; font-size: 12px; font-weight: 500; }
.chip:hover { background: var(--ui-subtle); }
.queue-table small.pending-text { color: #8A6116; font-weight: 500; }
.inline-stats a { color: inherit; }
.inline-stats a:hover strong, .inline-stats a.active strong { color: var(--fraga-link); }
@media (max-width: 600px) { .status-option { min-height: 44px; } .chip { min-height: 36px; } }

.segment-table-wrap { max-height: none; }
.segment-summary { table-layout: fixed; min-width: 740px; white-space: normal; }
.segment-summary th:first-child { width: 42%; }
.segment-summary td:first-child { overflow-wrap: anywhere; }

.handbook-intro { margin: 8px 0 0; color: var(--ui-muted); font-size: 14px; }
.handbook-layout { display: grid; grid-template-columns: 192px minmax(0, 1fr); gap: 24px; align-items: start; }
.handbook-toc { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.handbook-toc .side-caption { margin: 12px 8px 4px; }
.handbook-toc a { padding: 7px 8px; color: #51515E; border-radius: 5px; }
.handbook-toc a:hover { background: var(--ui-subtle); color: var(--fraga-link); }
.handbook-reviewed { margin: 16px 8px 0; font-size: 12px; color: var(--ui-muted); }
.handbook-body { min-width: 0; max-width: 1080px; }
.handbook-section { scroll-margin-top: 20px; font-size: 14px; line-height: 1.65; padding: 24px; }
.handbook-section h2 { font-size: 19px; margin-bottom: 16px; }
.handbook-section h3 { margin: 24px 0 8px; }
.handbook-section p { margin-bottom: 14px; }
.handbook-section p:last-child { margin-bottom: 0; }
.handbook-section ul { padding-left: 22px; }
.handbook-section li + li { margin-top: 8px; }
.handbook-eyebrow { display: block; margin-bottom: 6px; font-size: 12px; color: var(--ui-muted); }
.handbook-table-wrap { min-height: 0; max-height: none; margin: 16px 0; }
.handbook-table { white-space: normal; font-size: 13px; min-width: 480px; }
.handbook-table th { position: static; }
.handbook-table tbody th { background: white; color: var(--ui-text); font-size: 13px; font-weight: 500; vertical-align: top; }
.handbook-table td { vertical-align: top; }
.handbook-table th, .handbook-table td { line-height: 1.55; }
.handbook-table caption { text-align: left; color: var(--ui-muted); font-size: 12px; margin-bottom: 10px; }
.handbook-thresholds td { white-space: nowrap; }
.handbook-example { padding: 12px 14px; background: var(--ui-subtle); border-left: 2px solid var(--fraga-accent); }
.handbook-steps { padding-left: 22px; }
.handbook-steps li::marker { color: var(--ui-muted); }
.handbook-steps p { margin-top: 5px; color: #51515E; }
.handbook-definitions { margin-bottom: 0; }
.handbook-definitions dt { font-weight: 500; margin-top: 14px; }
.handbook-definitions dd { margin: 4px 0 0; }
.handbook-metrics { margin: 0; }
.handbook-metrics > div { padding: 16px 0; border-bottom: 1px solid var(--ui-line); }
.handbook-metrics > div:first-child { padding-top: 0; }
.handbook-metrics > div:last-child { border: 0; padding-bottom: 0; }
.handbook-metrics dt { font-weight: 600; }
.handbook-metrics dd { margin: 5px 0 0; }
.handbook-metrics dd p { margin-bottom: 4px; }
.handbook-metrics small { font-size: 12px; color: var(--ui-muted); }
.handbook-pause { display: block; font-size: 12px; margin-top: 4px; }
.handbook-faq { border-top: 1px solid var(--ui-line); padding: 13px 0; }
.handbook-faq summary { cursor: pointer; font-weight: 500; }
.handbook-faq p { padding-top: 10px; }
@media (max-width: 1000px) {
  .handbook-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .handbook-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 8px; }
  .handbook-toc .side-caption, .handbook-reviewed { flex-basis: 100%; }
}
@media (max-width: 600px) { .handbook-section { padding: 16px; } }

/* Explicit language choice is available before and after signing in. */
.language-picker{display:flex;align-items:center;gap:8px;margin:0;flex-wrap:wrap}
.language-picker select{width:auto;min-width:112px}
.language-control{display:flex;align-items:center;gap:10px;min-width:0}
.language-control>.icon{color:var(--ui-muted);width:18px;height:18px}
.login-form>.language-picker{margin-top:24px;justify-content:center}

/* Settings: account, personal preferences, team tools and source status. */
.settings-page { max-width: 1080px; }
.settings-page .panel { margin-bottom: 16px; }
.settings-account-body { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.settings-identity { grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1; }
.settings-page dd { overflow-wrap: anywhere; }
.settings-account-body > .button { flex-shrink: 0; }
.settings-row { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 1.5fr); gap: 36px; padding: 20px 0; margin: 0; }
.settings-row + .settings-row { border-top: 1px solid var(--ui-line); }
.settings-preferences .panel-heading { margin-bottom: 0; }
.settings-row:last-child { padding-bottom: 0; }
.settings-description label { display: block; font-size: 14px; font-weight: 500; }
.settings-page h2, .settings-description label { display: flex; align-items: center; gap: 8px; }
.settings-page h2 .icon, .settings-description label .icon { color: var(--ui-muted); }
.settings-description p, .settings-help { font-size: 12px; color: var(--ui-muted); margin: 6px 0 0; }
.settings-control { min-width: 0; }
.settings-control .language-picker, .settings-input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.settings-control select { width: 100%; min-width: 0; }
.settings-control .button { min-height: 38px; min-width: 100px; }
.settings-input-action.field { margin: 0; }
.settings-input-action .errorlist { grid-column: 1 / -1; margin: 0; }
.settings-current { font-size: 12px; line-height: 1.7; color: var(--ui-muted); margin: 10px 0 0; overflow-wrap: anywhere; }
.settings-current time { color: var(--ui-text); font-variant-numeric: tabular-nums; }
.settings-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); padding: 12px; color: var(--ui-text); font-size: 14px; }
.settings-link:hover { text-decoration: none; background: var(--ui-subtle); }
.settings-link > :last-child { color: var(--ui-muted); }
.settings-role summary { cursor: pointer; font-size: 14px; font-weight: 500; }
.settings-role summary .tag { margin-left: 12px; font-weight: 400; }
.settings-role[open] summary { margin-bottom: 20px; }
.settings-role-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-role-fields .field { margin-bottom: 0; }
.settings-help { margin: 12px 0 16px; }
@media (max-width: 700px) {
  .settings-account-body { align-items: flex-start; flex-direction: column; gap: 18px; }
  .settings-identity { width: 100%; }
  .settings-row { grid-template-columns: 1fr; gap: 12px; }
  .settings-role-fields { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .settings-control .button { min-height: 42px; }
  .settings-links { grid-template-columns: 1fr; }
  .settings-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .settings-data .details-grid { grid-template-columns: 1fr; gap: 16px; }
  .settings-role summary .tag { display: table; margin: 8px 0 0; }
}

/* A single event stream: day groups, time rail and expandable properties. */
.timeline-heading { position: relative; }
.timeline-heading h2 { display: flex; align-items: center; gap: 9px; }
.event-count { font-size: 12px; font-weight: 500; color: var(--ui-muted); background: #F2F2F5; border-radius: 5px; padding: 3px 7px; }
.timeline-caption { margin: 7px 0 0; color: var(--ui-muted); font-size: 12px; }
.timeline-filter-toggle { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--ui-line); border-radius: 6px; color: var(--ui-muted); background: #fff; cursor: pointer; list-style: none; }
.timeline-filter-toggle::-webkit-details-marker { display: none; }
.timeline-filter-toggle:focus-visible { outline: 2px solid #0F0F13; outline-offset: 3px; }
.timeline-filters[open] > .timeline-filter-toggle { border-color: #BE2440; background: #FFF1F4; color: #9F1C34; }
.timeline-filter-form { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; width: min(560px, 100%); box-sizing: border-box; margin: 0; padding: 16px; border: 1px solid var(--ui-line); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #0F0F131A; }
.event-filters { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.event-filters legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ui-muted); margin-bottom: 10px; padding: 0; }
.event-filter { position: relative; cursor: pointer; font-size: 12px; }
.event-filter > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.event-filter > span { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--ui-line); border-radius: 6px; background: #fff; color: #555561; }
.event-filter .icon { width: 14px; height: 14px; }
.event-filter input:checked + span { border-color: #BE2440; background: #FFF1F4; color: #9F1C34; }
.event-filter input:focus-visible + span { outline: 2px solid #0F0F13; outline-offset: 3px; }
.filter-count { color: var(--ui-muted); font-variant-numeric: tabular-nums; }
.timeline-filter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; }
.timeline-task-filters { margin-top: 12px; font-size: 12px; }
.timeline-task-filters summary { cursor: pointer; color: var(--ui-muted); }
.timeline-task-filters[open] summary { margin-bottom: 10px; }
.timeline-coverage { padding: 10px 12px; font-size: 12px; line-height: 1.6; color: var(--ui-muted); background: #F7F7F9; border-radius: 6px; margin: 0 0 20px; }
.event-day + .event-day { margin-top: 22px; }
.event-day-heading { font-size: 12px; font-weight: 600; color: #5C5C68; margin: 0 0 14px; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-row { display: grid; grid-template-columns: 58px 28px minmax(0,1fr); gap: 12px; position: relative; }
.event-time { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ui-muted); padding-top: 7px; }
.event-marker { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: #60606C; background: #F2F2F5; border: 1px solid #E7E7EC; border-radius: 7px; position: relative; z-index: 1; }
.event-row:not(:last-child)::before { content: ''; position: absolute; left: 83px; top: 28px; bottom: 0; border-left: 1px solid #E7E7EC; }
.event-vip .event-marker { background: #FFF2DE; color: #80571B; border-color: #EDDCBA; }
.event-communication .event-marker { background: #FFF0F3; color: #AA2940; border-color: #F2D8DE; }
.event-content { min-width: 0; padding: 4px 0 19px; }
.event-row:last-child .event-content { padding-bottom: 0; }
.event-title-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.event-title-line h4 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; }
.event-origin { font-size: 10px; color: var(--ui-muted); border: 1px solid var(--ui-line); border-radius: 4px; padding: 2px 5px; }
.event-subtitle { font-size: 13px; line-height: 1.6; margin: 6px 0; }
.event-comment { font-size: 13px; line-height: 1.65; margin: 8px 0; overflow-wrap: anywhere; white-space: normal; }
.event-meta { font-size: 11px; color: var(--ui-muted); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 7px; }
.event-meta .icon { width: 12px; height: 12px; }
.event-properties { font-size: 12px; margin-top: 8px; }
.event-properties summary { cursor: pointer; color: #62626E; width: fit-content; padding: 3px 0; }
.event-properties dl { padding: 11px; margin: 7px 0 0; border: 1px solid var(--ui-line); border-radius: 6px; background: #FAFAFC; }
.event-properties dl > div { display: grid; grid-template-columns: minmax(80px, 36%) minmax(0,1fr); gap: 12px; padding: 5px 0; line-height: 1.6; }
.event-properties dt { color: var(--ui-muted); }
.event-properties dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.timeline-pagination { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 24px; font-size: 12px; }
.timeline-empty { padding: 10px 0; }
@media (max-width: 600px) {
  .event-row { grid-template-columns: 49px 24px minmax(0,1fr); gap: 8px; }
  .event-marker { width: 24px; height: 24px; }
  .event-marker .icon { width: 14px; height: 14px; }
  .event-time { font-size: 10px; padding-top: 5px; }
  .event-row:not(:last-child)::before { left: 68px; top: 24px; }
  .event-title-line h4 { font-size: 13px; }
  .event-properties dl > div { grid-template-columns: minmax(0,1fr); gap: 2px; }
}

/* Account-level amount preference, shared by lists and cards. */
.currency-picker { margin: 0; max-width: 100%; }
.currency-options { display: inline-flex; padding: 3px; border: 1px solid var(--ui-line); border-radius: 6px; background: var(--ui-subtle); max-width: 100%; }
.currency-options button { min-height: 30px; padding: 5px 10px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ui-muted); font-size: 13px; line-height: 1.35; }
.currency-options button[aria-pressed="true"] { background: white; border-color: var(--ui-line); color: var(--ui-text); font-weight: 500; }
.currency-options button:hover { color: var(--ui-text); }
@media (max-width: 640px) { .panel-heading:has(.currency-picker) { flex-wrap: wrap; } }
