:root {
  color-scheme: light;
  /* Keep general content close to the compact size while preserving a clear hierarchy. */
  --portal-font-zoom: 1;
  --portal-content-text-base: 0.825;
  --portal-text-scale: var(--portal-content-text-base);
  --portal-font-calibration-slope: 0.454545;
  --portal-font-calibration-offset: 8.727273px;
  --night: #191b06;
  --night-2: #24260a;
  --night-3: #2e2f0e;
  --brand-blue: #969900;
  --brand-blue-hover: #8b9000;
  --brand-blue-soft: #fbfce7;
  --brand-blue-ink: #fff;
  --cyan: var(--brand-blue);
  --cyan-soft: var(--brand-blue-soft);
  --gold: #d8b56b;
  --paper: #f3f5f2;
  --white: #fff;
  --text: #2c2c12;
  --muted: #807f68;
  --line: #e1e8e4;
  --green: var(--brand-blue);
  --amber: #bf8332;
  --red: #c64b4b;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Admin settings use clear groups, readable controls, and room for account changes. */
.admin-page { display: grid; gap: 16px; margin-bottom: 24px; }
.admin-settings-panel { display: grid; gap: 16px; margin-top: 0; padding: 18px; border: 1px solid #dfe8e3; border-radius: 18px; background: linear-gradient(140deg,#fcfcf9,#fafaf6); box-shadow: 0 10px 30px rgba(44, 45, 22, .045); }
.admin-settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.admin-settings-heading .eyebrow { margin: 0 0 7px; color: #728d86; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .14em; }
.admin-settings-heading h2 { margin: 0; color: #323314; font-size: calc(24px * var(--portal-text-scale)); letter-spacing: -.035em; }
.admin-settings-heading p:not(.eyebrow) { margin: 8px 0 0; color: #827e6f; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.admin-settings-version { padding: 7px 11px; border: 1px solid #e1e9e5; border-radius: 99px; color: #7c6e60; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.admin-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.admin-setting-card { min-width: 0; padding: 15px; border: 1px solid #e0e9e3; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(44, 45, 22, .025); }
.admin-setting-card > header { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 12px; }
.admin-setting-card > header > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #e8e9dc; border-radius: 9px; color: #646632; background: #f6f6ee; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.admin-setting-card > header h3 { margin: 1px 0 4px; color: #535431; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.admin-setting-card > header p { margin: 0; color: #8e887e; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.admin-setting-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.admin-setting-fields label { display: grid; min-width: 0; gap: 6px; color: #6f6b52; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.admin-setting-fields input { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #d8e3dd; border-radius: 9px; color: #4c4c2a; background: #fff; font: inherit; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.admin-setting-fields select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 30px 9px 11px; border: 1px solid #d8e3dd; border-radius: 9px; color: #4c4c2a; background: #fff; font: inherit; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.admin-setting-fields textarea { width: 100%; min-width: 0; min-height: 58px; padding: 9px 11px; border: 1px solid #d8e3dd; border-radius: 9px; color: #4c4c2a; background: #fff; font: inherit; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; resize: vertical; }
.admin-setting-fields input:focus { border-color: #adaf66; outline: 3px solid rgba(133, 134, 63, .14); }
.admin-setting-fields textarea:focus { border-color: #adaf66; outline: 3px solid rgba(133, 134, 63, .14); }
.admin-brand-label-field > small { color: #82928d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 500; line-height: 1.4; }
.admin-brand-color-field > small { color: #82928d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 500; line-height: 1.4; }
.admin-setting-fields .admin-brand-color-field input[type="color"] { width: 72px; min-height: 42px; padding: 4px; cursor: pointer; }
.admin-module-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.admin-module-choice { display: flex; min-width: 0; min-height: 63px; align-items: flex-start; gap: 10px; padding: 11px; border: 1px solid #e5ece7; border-radius: 10px; color: #6e6652; background: #fcfcfa; cursor: pointer; transition: border-color .15s ease,background .15s ease; }
.admin-module-choice:hover { border-color: #d4d5b6; background: #fbfbf7; }
.admin-module-choice input { width: 17px; height: 17px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #5c5e17; }
.admin-module-choice > span { display: grid; gap: 4px; }
.admin-module-choice strong { color: #5c5d3b; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.admin-module-choice small { color: #90887d; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.admin-feature-missing { color: #8a5a00; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; font-weight: 650; line-height: 1.4; }
.admin-setting-links { grid-column: 1 / -1; }
.admin-setting-links .admin-setting-fields { grid-template-columns: repeat(4,minmax(0,1fr)); }
.support-bot-prompt-card { grid-column: 1 / -1; }
.support-bot-prompt-card > header { align-items: center; }
.support-bot-prompt-card > header .table-action { margin-left: auto; }
.support-bot-prompt-field { grid-column: 1 / -1; }
.support-bot-prompt-field textarea { min-height: 380px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.support-bot-context-card ul { display: grid; gap: 8px; margin: 0; padding-left: 19px; color: #7b7563; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.support-bot-handoff-card > p { margin: 10px 0 0; color: #847c72; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.admin-setting-integrations { grid-column: 1 / -1; }
.admin-setting-integrations .admin-module-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
.admin-settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid #e5ece7; }
.admin-settings-footer p { margin: 0; color: #877e74; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.admin-settings-footer .contact-create-button { min-width: 190px; min-height: 44px; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.admin-settings-feedback { margin-top: 6px !important; color: #a05b4e !important; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)) !important; }
.admin-settings-feedback.is-good { color: #5c5d29 !important; }
.ai-admin-panel { --ai-ink: #323314; --ai-accent: #5d571f; gap: 14px; }
.ai-heading-actions { display: flex; align-items: center; gap: 8px; }
.ai-heading-actions .campaign-panel-link { padding: 6px 9px; border: 1px solid #dce7e4; border-radius: 8px; background: #fff; }
.ai-signal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.ai-signal { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid #dce8e4; border-radius: 12px; background: linear-gradient(135deg,#fff,#f9f7f4); }
.ai-signal > div { display: grid; min-width: 0; gap: 3px; }
.ai-signal small { color: #908478; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; letter-spacing: .06em; text-transform: uppercase; }
.ai-signal strong { overflow: hidden; color: #54542b; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.ai-signal-dot { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #c9c3bd; box-shadow: 0 0 0 4px rgba(118,141,135,.1); }
.ai-signal-dot.is-good { background: #6c471e; box-shadow: 0 0 0 4px rgba(108, 71, 30,.12); }
.ai-signal-dot.is-muted { background: #bd8332; }
.ai-signal-icon { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #5c5620; background: #f3eee7; font-weight: 760; }
.ai-admin-grid { display: grid; gap: 12px; }
.ai-routing-card { padding-bottom: 14px; }
.ai-routing-layout { display: grid; grid-template-columns: minmax(230px,.8fr) minmax(0,1.2fr); gap: 14px; }
.ai-section-label { display: grid; gap: 3px; margin-bottom: 9px; }
.ai-section-label strong { color: #5d5a3b; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ai-section-label small { color: #918880; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.ai-order-list { min-width: 0; padding: 12px; border: 1px solid #e1e9e5; border-radius: 12px; background: #f8fbfa; }
.ai-order-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 8px; margin-top: 7px; }
.ai-order-row select { min-height: 37px; padding: 7px 27px 7px 9px; border: 1px solid #d7e3de; border-radius: 8px; color: #585635; background: #fff; font: inherit; }
.ai-order-row small { color: #928a82; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.ai-order-number, .ai-key-index { display: grid; place-items: center; color: #7e715b; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; }
.ai-routing-fields { align-content: start; }
.ai-routing-fields label { min-width: 0; }
.ai-toggle { display: flex !important; min-height: 42px; align-items: flex-start; gap: 9px; padding: 10px !important; border: 1px solid #e2eae5; border-radius: 9px; background: #fbfcfb; }
.ai-toggle input { width: 16px !important; min-height: 16px !important; margin-top: 2px; accent-color: #5c4d1d; }
.ai-toggle span { display: grid; gap: 3px; }
.ai-toggle strong { color: #5c5a38; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ai-toggle small { color: #918880; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; }
.ai-provider-card { min-width: 0; padding: 15px; border: 1px solid #dce8e4; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(44, 45, 22,.025); }
.ai-gemini-card { border-color: #e0d3c7; background: linear-gradient(135deg,#fff,#f5fbf8); }
.ai-provider-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.ai-provider-head h3 { margin: 2px 0 4px; color: var(--ai-ink); font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: -.02em; }
.ai-provider-head p:not(.eyebrow) { max-width: 640px; margin: 0; color: #857c71; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.ai-provider-status { display: inline-flex; flex: 0 0 auto; align-items: center; padding: 5px 8px; border: 1px solid #dce7e3; border-radius: 99px; color: #857a71; background: #f8fbfa; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; white-space: nowrap; }
.ai-provider-status.is-good { border-color: #bde0d5; color: #593d20; background: #f0faf6; }
.ai-provider-status.is-warn { border-color: #ecd9b6; color: #94672d; background: #fff9ee; }
.ai-provider-status.is-error { border-color: #ebc7c2; color: #a4584f; background: #fff7f5; }
.ai-provider-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.ai-provider-fields > label:not(.ai-toggle):not(.ai-clear-choice) { display: grid; min-width: 0; gap: 5px; color: #6f6b52; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.ai-provider-fields input { width: 100%; min-width: 0; min-height: 39px; padding: 8px 10px; border: 1px solid #d8e3dd; border-radius: 8px; color: #4c4c2a; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ai-provider-fields small { color: #918880; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 500; line-height: 1.35; }
.ai-provider-fields .ai-toggle, .ai-provider-fields .ai-clear-choice { grid-column: 1 / -1; }
.ai-clear-choice { display: flex !important; align-items: center; gap: 7px; color: #8a6b67; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; }
.ai-clear-choice input { width: 15px; min-height: 15px; accent-color: #a4584f; }
.ai-key-list { display: grid; gap: 8px; margin-top: 13px; padding: 12px; border: 1px solid #dce9e4; border-radius: 11px; background: rgba(255,255,255,.65); }
.ai-key-row { display: grid; grid-template-columns: 24px 1fr 1.55fr auto; align-items: end; gap: 8px; }
.ai-key-row label { display: grid; min-width: 0; gap: 5px; color: #6f6b52; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.ai-key-row input { width: 100%; min-width: 0; min-height: 37px; padding: 7px 9px; border: 1px solid #d8e3dd; border-radius: 8px; color: #4c4c2a; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ai-key-input { min-width: 0; }
.ai-key-row .ai-clear-choice { display: flex; align-items: center; gap: 6px; padding-bottom: 9px; color: #8a6b67; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.ai-key-row .ai-clear-choice input { width: 14px; min-height: 14px; }
.ai-provider-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.ai-provider-actions .table-action { min-height: 34px; padding: 7px 10px; border: 1px solid #ded6cd; border-radius: 8px; background: #fbfdfc; }
.ai-provider-actions small, .ai-key-count { color: #867b71; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ai-provider-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ai-workflow-note { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid #e5ded7; border-radius: 12px; color: #6b6549; background: #f7f2ed; }
.ai-note-icon { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #59461c; background: #ece1d1; font-size: 14px; }
.ai-workflow-note strong { color: #544c2a; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ai-workflow-note p { margin: 4px 0 0; color: #827a68; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.ai-workflow-note code { padding: 2px 4px; border-radius: 4px; color: #544c2a; background: #eee4da; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95em; }
.whatsapp-admin-panel [hidden] { display: none !important; }
.admin-settings-panel button:focus-visible, .staff-admin-workspace button:focus-visible, .staff-admin-workspace input:focus-visible { outline: 3px solid rgba(114, 117, 0, .24); outline-offset: 2px; }
.app-card.is-not-integrated { cursor: default; }
.app-card.is-not-integrated:hover { transform: none; border-color: #e0e7e3; box-shadow: 0 5px 18px rgba(51, 52, 14, .035); }
.campaign-not-integrated { display: flex; max-width: 780px; align-items: flex-start; gap: 15px; margin: 12px auto; padding: 22px; border: 1px solid #e1e8e3; border-radius: 14px; color: #747058; background: #fff; }
.campaign-not-integrated .campaign-empty-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid #e5e8da; border-radius: 11px; color: #8b8358; background: #f9f7ee; }
.campaign-not-integrated .campaign-empty-icon svg { width: 18px; height: 18px; }
.campaign-not-integrated h2 { margin: 0 0 5px; color: #535431; font-size: calc((17px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-not-integrated p:not(.eyebrow) { margin: 0; color: #877e74; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.campaign-not-integrated .eyebrow { margin: 0 0 5px; color: #82928d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: .12em; }

@media (max-width: 980px) {
  .admin-setting-links .admin-setting-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-setting-integrations .admin-module-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ai-routing-layout { grid-template-columns: minmax(0,1fr); }
  .ai-provider-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  .automation-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .admin-page { gap: 12px; margin-bottom: 20px; }
  .admin-settings-panel { gap: 12px; padding: 12px; border-radius: 14px; }
  .admin-settings-heading h2 { font-size: calc(20px * var(--portal-text-scale)); }
  .admin-settings-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .admin-setting-links { grid-column: auto; }
  .admin-setting-card { padding: 12px; }
  .admin-settings-footer { align-items: stretch; flex-direction: column; }
  .admin-settings-footer .contact-create-button { width: 100%; }
  .ai-signal-grid { grid-template-columns: minmax(0,1fr); }
  .ai-provider-fields { grid-template-columns: minmax(0,1fr); }
  .ai-provider-fields .ai-toggle, .ai-provider-fields .ai-clear-choice { grid-column: auto; }
  .ai-key-row { grid-template-columns: 24px minmax(0,1fr); }
  .ai-key-row .ai-key-input { grid-column: 2; }
  .ai-key-row .ai-clear-choice { grid-column: 2; padding-bottom: 0; }
  .ai-heading-actions { align-items: flex-end; flex-direction: column; }
}
@media (max-width: 420px) {
  .admin-setting-fields, .admin-setting-links .admin-setting-fields, .admin-module-list, .admin-setting-integrations .admin-module-list { grid-template-columns: minmax(0,1fr); }
  .admin-settings-heading { align-items: flex-start; }
  .admin-settings-footer .contact-create-button { min-width: 0; }
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--text); background: var(--paper); font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
button, input { font: inherit; }
button {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
}
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
a { color: inherit; }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell { min-height: 100vh; }
.sidebar { --portal-font-calibration-slope: 1; --portal-font-calibration-offset: 0px; position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 232px; flex-direction: column; padding: 20px 15px 12px; color: #f2f2ea; background: var(--night); }
.brand { display: flex; min-height: 54px; align-items: center; gap: 10px; margin: 0 8px 32px; text-decoration: none; }
/* First paint (Enzo, 2026-11-01: "blinky/jumpy"): no empty logo frame, and the menu and the
   screen fade in once when the portal has the person's access (app.js finishBoot), never piece by
   piece. If the script never finishes, they show anyway after 2.5s. */
.brand img:not([src]) { visibility: hidden; }
.main-nav, .content, .topbar-actions { transition: opacity .18s ease-out; }
body.is-booting .main-nav, body.is-booting .content, body.is-booting .topbar-actions { opacity: 0; animation: boot-reveal 0s linear 2.5s forwards; }
@keyframes boot-reveal { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .main-nav, .content, .topbar-actions { transition: none; } }
.brand img { display: block; width: 110px; height: 50px; flex: 0 0 auto; object-fit: contain; object-position: left center; }
.brand-tag { max-width: 78px; padding-left: 8px; color: #bbbaa4; border-left: 1px solid rgba(255,255,255,.2); font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; letter-spacing: .11em; line-height: 1.55; white-space: pre-line; }
.brand-tag strong { color: #f7f7ef; font-weight: 780; }
.nav-label { padding: 0 12px; color: #898969; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .16em; }
.nav-label-spaced { margin-top: 24px; }
/* Collapsible menu groups: a collapsed group keeps only the screen you are on in view. */
.nav-group-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; min-height: 24px; border: 0; border-radius: 6px; background: transparent; text-align: left; text-transform: inherit; cursor: pointer; font-family: inherit; }
.nav-group-toggle:hover { color: #c4c2af; }
.nav-group-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.nav-group-toggle > svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .16s ease; }
.nav-group-toggle[aria-expanded="false"] > svg { transform: rotate(-90deg); }
.main-nav.is-collapsed .nav-item:not(.is-active) { display: none; }
.main-nav.is-collapsed:not(:has(.nav-item.is-active:not([hidden]))) { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .nav-group-toggle > svg { transition: none; } }
.main-nav { display: grid; gap: 3px; margin-top: 9px; }
.nav-item { position: relative; display: flex; min-height: 40px; align-items: center; gap: 12px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; color: #c4c2af; background: transparent; text-align: left; text-decoration: none; cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.nav-item[hidden] { display: none; }
.nav-item > svg { width: 18px; height: 18px; color: #a6a48a; }
.nav-item span:nth-of-type(1) { flex: 1; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; }
.nav-item:hover { color: #fafbf6; background: rgba(255,255,255,.055); }
.nav-item:hover > svg { color: var(--cyan); }
.nav-item.is-active { color: #fdfdf9; background: #2c2c0e; border-color: #3a3a17; box-shadow: inset 2px 0 0 var(--cyan); }
.nav-item.is-active > svg { color: var(--cyan); }
.nav-key { color: #848363; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.sidebar-menu { flex: 1 1 auto; min-height: 0; margin: 0 -15px 8px; padding: 0 6px 0 15px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.sidebar-status { flex: 0 0 auto; padding: 12px 12px 11px; border: 1px solid rgba(255,255,255,.095); border-radius: 12px; background: rgba(255,255,255,.035); }
.status-head { display: flex; align-items: center; gap: 8px; color: #f5f5ed; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; }
.status-light, .env-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #a08b61; box-shadow: 0 0 0 3px rgba(216,181,107,.12); }
.status-light.is-good { background: #999b30; box-shadow: 0 0 0 3px rgba(153, 155, 48, .12); }
.status-light.is-warn { background: #e0a84d; box-shadow: 0 0 0 3px rgba(224,168,77,.12); }
.status-light.is-bad { background: #e27171; box-shadow: 0 0 0 3px rgba(226,113,113,.12); }
.sidebar-status p { margin: 7px 0 9px 15px; color: #acaa91; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.text-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: #c8c4b7; background: transparent; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; cursor: pointer; }
.text-button svg { width: 14px; height: 14px; }
.text-button:hover { color: var(--cyan); }
.sidebar-foot { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 12px 4px 1px; color: #7e7d61; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: .09em; text-align: center; }
.sidebar-foot .env-dot { width: 5px; height: 5px; background: var(--cyan); box-shadow: none; }
.sidebar-foot .env-separator { color: #9c9981; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.sidebar-scrim { display: none; }

.main-shell { min-height: 100vh; margin-left: 232px; }
.topbar { --portal-font-calibration-slope: 1; --portal-font-calibration-offset: 0px; position: sticky; z-index: 15; top: 0; display: flex; height: 65px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(24px, 4.1vw, 58px); border-bottom: 1px solid #eeefe7; background: rgba(255,255,255,.96); backdrop-filter: blur(16px); }
.topbar-context { display: flex; align-items: center; gap: 10px; color: #6d6c52; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.topbar-date { --topbar-date-gap: 8px; display: flex; flex: 1 1 auto; min-width: 0; align-items: center; justify-content: center; gap: var(--topbar-date-gap); overflow: hidden; color: #5e5f3f; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; letter-spacing: -.01em; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.topbar-date[hidden] { display: none; }
.topbar-date-long { overflow: hidden; text-overflow: ellipsis; }
.topbar-date-short { display: none; }
.topbar-date-clock { display: inline-flex; flex: 0 0 auto; align-items: center; gap: var(--topbar-date-gap); color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit; }
.topbar-date-clock svg { display: block; flex: 0 0 auto; width: 13px; height: 13px; }
.context-mark { width: 7px; height: 7px; border-radius: 2px; background: var(--cyan); transform: rotate(45deg); }
.context-divider { color: #bec8c5; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.search-trigger { display: flex; width: 250px; height: 34px; align-items: center; gap: 9px; padding: 0 9px; border: 1px solid #e5eae7; border-radius: 8px; color: #8a8875; background: #fcfcfa; text-align: left; cursor: pointer; }
.search-trigger:hover { border-color: #dbdcab; background: #fff; }
.search-trigger > svg { width: 15px; height: 15px; color: #9a9884; }
.search-trigger span { flex: 1; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
kbd { display: inline-grid; min-width: 23px; height: 19px; place-items: center; padding: 0 4px; border: 1px solid #e3e8e5; border-radius: 5px; color: #8f8e7d; background: white; font-family: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1; }
.topbar-separator { width: 1px; height: 20px; background: #e4eae6; }
.account-menu-wrap { position: relative; z-index: 1; flex: 0 0 auto; }
.team-chip { display: flex; min-width: 0; min-height: 40px; align-items: center; gap: 8px; padding: 4px 8px 4px 5px; border: 1px solid transparent; border-radius: 11px; color: #5e5d42; background: transparent; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; white-space: nowrap; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.team-chip:hover, .team-chip[aria-expanded="true"] { border-color: #dfe9e3; background: #fafaf7; }
.team-chip:focus-visible { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 2px; }
.team-avatar { position: relative; display: grid; overflow: hidden; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border: 1px solid #e6e7c4; border-radius: 9px; color: #585a08; background: #f5f5e3; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; }
.team-avatar-image, .account-menu-avatar-image, .profile-avatar-image, .staff-account-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.team-avatar-fallback { display: grid; width: 100%; height: 100%; place-items: center; }
.team-avatar.has-image:not(.is-failed) .team-avatar-fallback, .account-menu-avatar.has-image:not(.is-failed) .team-avatar-fallback, .profile-avatar-preview.has-image:not(.is-failed) .team-avatar-fallback, .staff-account-avatar.has-image:not(.is-failed) .team-avatar-fallback { opacity: 0; }
.team-avatar.is-failed .team-avatar-image, .account-menu-avatar.is-failed .account-menu-avatar-image, .profile-avatar-preview.is-failed .profile-avatar-image, .staff-account-avatar.is-failed .staff-account-avatar-image { display: none; }
.team-name { max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.team-caret { width: 7px; height: 7px; flex: 0 0 auto; margin: -4px 1px 0 2px; border-right: 1.5px solid #908678; border-bottom: 1.5px solid #908678; transform: rotate(45deg); transition: transform .15s ease; }
.team-chip[aria-expanded="true"] .team-caret { margin-top: 4px; transform: rotate(225deg); }
.account-menu { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; display: grid; width: 286px; max-width: calc(100vw - 24px); gap: 4px; padding: 8px; border: 1px solid #dce7e1; border-radius: 14px; background: #fff; box-shadow: 0 16px 44px rgba(44, 45, 22, .17), 0 3px 10px rgba(44, 45, 22, .06); }
.account-menu[hidden] { display: none; }
.account-menu-summary { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 8px 8px 12px; border-bottom: 1px solid #e9efea; margin-bottom: 3px; }
.account-menu-avatar { position: relative; display: grid; overflow: hidden; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid #e2e3c9; border-radius: 12px; color: #565708; background: linear-gradient(145deg,#f4f4e6,#f5f6e7); font-size: 15px; font-weight: 800; }
.account-menu-summary > span:last-child { display: grid; min-width: 0; gap: 3px; }
.account-menu-summary strong, .account-menu-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-summary strong { color: #424323; font-size: 12px; font-weight: 740; }
.account-menu-summary small { color: #897f75; font-size: 10px; }
.account-menu-item { display: flex; width: 100%; min-height: 49px; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid transparent; border-radius: 9px; color: #565736; background: transparent; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.account-menu-item:hover { border-color: #ecede4; background: #f9f9f5; }
.account-menu-item:focus-visible { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 1px; }
.account-menu-item-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid #e2ebe6; border-radius: 9px; color: #65672f; background: #fbfbf8; }
.account-menu-item-icon svg { width: 16px; height: 16px; }
.account-menu-item > span:last-child { display: grid; gap: 3px; }
.account-menu-item strong { color: #525333; font-size: 11px; font-weight: 720; }
.account-menu-item small { color: #80908b; font-size: 9px; }
.account-menu-logout { border-top: 1px solid #e9efea; border-radius: 0 0 9px 9px; margin-top: 3px; padding-top: 9px; }
.account-menu-logout .account-menu-item-icon { color: #a36458; background: #fff8f4; }
.menu-toggle { display: none; }

.content { width: min(1280px, 100%); min-height: calc(100vh - 112px); margin: 0 auto; padding: 36px clamp(24px, 4.1vw, 58px) 34px; }
.content:focus { outline: none; }
.content[data-font-profile="reference"] { --portal-font-calibration-slope: 1; --portal-font-calibration-offset: 0px; padding-top: 26px; padding-bottom: 24px; }
.content[data-font-profile="reference"] .page-heading { margin-bottom: 18px; }
.page-foot { display: flex; min-height: 47px; align-items: center; justify-content: space-between; gap: 15px; padding: 0 clamp(24px, 4.1vw, 58px); border-top: 1px solid #e4e9e6; color: #959481; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.foot-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; color: #706e4c; background: transparent; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.foot-link:hover { color: #717304; }
.foot-link svg { width: 14px; height: 14px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 9px; color: #828351; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.page-heading h1, .welcome-copy h1 { margin: 0; color: var(--text); font-size: calc(clamp(25px, 3vw, 34px) * var(--portal-text-scale)); font-weight: 720; letter-spacing: -.045em; line-height: 1.12; }
.page-heading p { max-width: 630px; margin: 9px 0 0; color: var(--muted); font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.6; }
.heading-action { display: inline-flex; min-height: 37px; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #d9e2de; border-radius: 8px; color: #6a6748; background: var(--white); font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; text-decoration: none; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.heading-action:hover { transform: translateY(-1px); border-color: #d8da9d; color: #707206; }
.heading-action svg { width: 15px; height: 15px; }

.welcome-layout { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(260px, .82fr); gap: 14px; }
.welcome-card { position: relative; display: flex; min-height: 226px; align-items: stretch; overflow: hidden; padding: 28px 30px; border-radius: 15px; color: #fcfcf8; background: radial-gradient(ellipse at 88% 5%, rgba(187, 192, 0,.17), transparent 34%), linear-gradient(118deg, #242609, #2c2d09 63%, #2c2c0e); }
.welcome-card::after { position: absolute; top: -78px; right: -46px; width: 295px; height: 295px; border: 1px solid rgba(187, 192, 0,.15); border-radius: 50%; content: ""; box-shadow: 0 0 0 24px rgba(187, 192, 0,.025), 0 0 0 57px rgba(216,181,107,.035); }
.welcome-copy { position: relative; z-index: 1; display: flex; max-width: 540px; flex-direction: column; align-items: flex-start; }
.welcome-copy .eyebrow { color: #b5b58d; }
.welcome-copy h1 { max-width: 510px; color: #fbfbf7; font-size: calc(clamp(26px, 3.2vw, 37px) * var(--portal-text-scale)); }
.welcome-copy p { max-width: 440px; margin: 11px 0 20px; color: #c8c5af; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.65; }
.hero-primary { display: inline-flex; min-height: 37px; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid rgba(187, 192, 0,.42); border-radius: 8px; color: #fff; background: #676906; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.hero-primary:hover { transform: translateY(-1px); background: #6b6d06; }
.hero-primary svg { width: 15px; height: 15px; }
button.hero-primary { font-family: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; cursor: pointer; }
.welcome-date { position: absolute; z-index: 2; right: 21px; bottom: 17px; color: #ada991; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: .03em; }

.systems-card { min-height: 226px; padding: 19px 20px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-title-row h2 { margin: 0; color: #4c4c2f; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; }
.card-kicker { color: #a19d94; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: .11em; }
.system-list { display: grid; gap: 0; margin-top: 10px; }
.system-row { display: flex; min-height: 31px; align-items: center; gap: 9px; border-bottom: 1px solid #eff2ef; }
.system-row:last-child { border-bottom: 0; }
.system-row .status-light { width: 6px; height: 6px; box-shadow: none; }
.system-name { flex: 1; color: #6c6b52; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; }
.system-state { color: #9a978a; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.system-state.is-online { color: #5c5e1b; font-weight: 650; }
.system-state.is-offline { color: #b05252; font-weight: 650; }
.status-updated { margin: 9px 0 0; color: #a6a29a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

.section-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 29px 0 12px; }
.section-bar h2 { margin: 0; color: #3f3f20; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; letter-spacing: -.02em; }
.section-bar p { margin: 4px 0 0; color: #959483; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.quiet-link { display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; border: 0; color: #787451; background: transparent; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.quiet-link:hover { color: #727406; }
.quiet-link svg { width: 13px; height: 13px; }
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.work-card { display: flex; min-height: 163px; flex-direction: column; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-decoration: none; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.work-card:hover { transform: translateY(-2px); border-color: #ddddb8; box-shadow: 0 7px 20px rgba(54, 55, 11, .055); }
.work-section-card { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.work-section-card:focus-visible { outline: 3px solid rgba(111, 113, 16, .35); outline-offset: 3px; }
.work-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.work-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #edeed6; border-radius: 10px; color: #73750d; background: #f9f9ee; }
.work-icon svg { width: 17px; height: 17px; }
.work-icon.gold { color: #9e7940; border-color: #eee5d3; background: #fbf7ed; }
.work-icon.green { color: #606220; border-color: #ececda; background: #f8f8f1; }
.work-icon.purple { color: #6f72a7; border-color: #e4e4f1; background: #f5f4fa; }
.work-card .work-arrow { color: #adaa9a; }
.work-card .work-arrow svg { width: 15px; height: 15px; }
.work-card h3 { margin: 13px 0 5px; color: #3f4022; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.work-card p { min-height: 29px; margin: 0; color: #908e7d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.work-card-title { display: block; margin: 13px 0 5px; color: #3f4022; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.work-card-description { display: block; min-height: 29px; color: #908e7d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.work-card .work-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 11px; color: #6f7110; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.work-card .work-foot svg { width: 13px; height: 13px; }

.dashboard-bottom { display: grid; grid-template-columns: 1.14fr .86fr; gap: 10px; margin-top: 18px; }
.next-card { display: flex; min-height: 116px; align-items: center; gap: 15px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.next-icon { display: grid; width: 39px; height: 39px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #686a10; background: #f8f8e9; }
.next-icon svg { width: 19px; height: 19px; }
.next-copy { flex: 1; }
.next-copy .card-kicker { display: block; margin-bottom: 5px; }
.next-copy h3 { margin: 0; color: #48482b; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.next-copy p { max-width: 390px; margin: 5px 0 0; color: #8f8c7b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.next-action { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #e1e8e4; border-radius: 8px; color: #878360; background: #fff; text-decoration: none; cursor: pointer; }
.next-action:hover { color: #727406; border-color: #ddddaf; }
.next-action svg { width: 14px; height: 14px; }

.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.app-card { display: flex; min-height: 100px; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-decoration: none; transition: border-color .16s ease, transform .16s ease; }
.app-card:hover { transform: translateY(-1px); border-color: #ddddaf; }
.app-card-copy { min-width: 0; flex: 1; }
.app-card-copy h3 { margin: 0 0 4px; color: #49492c; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; }
.app-card-copy p { margin: 0; color: #8d8c7a; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.app-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: #5c5e1b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.app-status .status-light { width: 5px; height: 5px; box-shadow: none; }
.app-status.is-offline { color: #a34e4e; }
.app-go { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border: 1px solid #e3e9e5; border-radius: 8px; color: #817d60; }
.app-go svg { width: 14px; height: 14px; }

.note-strip { display: flex; align-items: flex-start; gap: 11px; margin-top: 17px; padding: 13px 14px; border: 1px solid #e6e4d7; border-radius: 10px; color: #6e6956; background: #faf8ef; }
.note-strip > svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: #ae8a45; }
.note-strip p { margin: 0; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.6; }
.note-strip strong { color: #59553f; }
.feature-list { display: grid; gap: 9px; margin-top: 17px; }
.feature-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #e8ede9; border-radius: 9px; background: rgba(255, 255, 255,.7); }
.feature-row > svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: #5e6019; }
.feature-row strong { display: block; margin-bottom: 3px; color: #575739; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.feature-row span { display: block; color: #8c897d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.flow-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #f0e5cb; border-radius: 20px; color: #927342; background: #fcf8ee; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.flow-state .status-light { width: 5px; height: 5px; box-shadow: none; }
.empty-note { display: flex; align-items: flex-start; gap: 11px; padding: 15px; border: 1px dashed #d8e2dc; border-radius: 10px; color: #8a8876; background: rgba(255, 255, 255,.66); }
.empty-note-spaced { margin-top: 14px; }
.empty-note > svg { width: 17px; height: 17px; flex: 0 0 auto; color: #9c9573; }
.empty-note p { margin: 0; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.6; }
.empty-note strong { color: #67654a; }

.command-dialog { width: min(500px, calc(100% - 30px)); padding: 0; border: 1px solid #dce5e1; border-radius: 14px; color: var(--text); background: #fff; box-shadow: 0 28px 100px rgba(32, 33, 4, .28); }
.command-dialog::backdrop { background: rgba(26, 25, 5,.52); backdrop-filter: blur(3px); }
.command-box { padding: 9px; }
.command-search { display: flex; height: 46px; align-items: center; gap: 10px; padding: 0 9px; border-bottom: 1px solid #edf0ed; }
.command-search svg { width: 17px; height: 17px; color: #959281; }
.command-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.command-search input:focus-visible { outline: 0; }
.command-heading { margin: 13px 10px 7px; color: #a39f97; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; letter-spacing: .13em; }
.command-results { display: grid; gap: 2px; }
.command-result { display: flex; min-height: 39px; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 7px; color: #6d6b53; background: transparent; text-align: left; cursor: pointer; }
.command-result:hover, .command-result:focus-visible { color: #585a05; background: #f7f8ee; }
.command-result svg { width: 16px; height: 16px; color: #86874d; }
.command-result span { flex: 1; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; }
.command-result small { color: #a8a29b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.command-empty { padding: 13px 10px; color: #99948b; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.command-foot { display: flex; justify-content: space-between; margin: 9px 5px 2px; padding: 10px 6px 0; border-top: 1px solid #edf0ed; color: #a09a93; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.command-foot kbd, .command-search kbd { min-width: auto; height: 17px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

.dashboard-intro { --portal-font-calibration-slope: 1; --portal-font-calibration-offset: 0px; display: flex; align-items: flex-end; justify-content: flex-start; gap: 22px; margin-bottom: 22px; text-align: left; }
.dashboard-intro > div { width: 100%; }
.dashboard-intro h1 { margin: 0; color: var(--text); font-size: calc(clamp(27px, 3vw, 36px) * var(--portal-text-scale)); font-weight: 735; letter-spacing: -.045em; line-height: 1.12; }
.dashboard-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.dashboard-actions .hero-primary { min-height: 37px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric-card { display: flex; min-width: 0; min-height: 119px; flex-direction: column; padding: 14px 15px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.metric-top { display: flex; align-items: center; gap: 9px; }
.metric-icon, .integration-mark { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #edeed6; border-radius: 9px; color: #73750d; background: #f9f9ee; }
.metric-icon svg, .integration-mark svg { width: 15px; height: 15px; }
.integration-mark.green { border-color: #ececda; color: #606220; background: #f8f8f1; }
.integration-mark.gold { border-color: #eee5d3; color: #9e7940; background: #fbf7ed; }
.integration-mark.purple { border-color: #e4e4f1; color: #6f72a7; background: #f5f4fa; }
.metric-label { min-width: 0; color: #687b76; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; letter-spacing: -.01em; line-height: 1.3; }
.metric-value { display: block; margin-top: 11px; color: #3c3c22; font-size: calc(clamp(25px, 2.2vw, 31px) * var(--portal-text-scale)); font-weight: 700; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric-detail { margin: 6px 0 0; color: #86928d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 430; line-height: 1.45; }

.dashboard-panels, .dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(290px, .82fr); gap: 10px; margin-top: 12px; }
.ops-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.ops-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ops-panel-heading .eyebrow { margin-bottom: 5px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ops-panel-heading h2 { margin: 0; color: #404123; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 735; letter-spacing: -.02em; }
.source-badge { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; border: 1px solid #eaeadb; border-radius: 20px; color: #787451; background: #f9f9f5; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .08em; white-space: nowrap; }
.source-badge-green { border-color: #ececda; color: #6e6f3a; background: #f8f8f1; }
.queue-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 17px; }
.queue-stats > div { display: flex; min-height: 55px; align-items: center; justify-content: space-between; gap: 7px; padding: 0 10px; border: 1px solid #edf0ed; border-radius: 8px; background: #fdfdfa; }
.queue-stats span { color: #8f8d7d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; }
.queue-stats strong { color: #434425; font-size: calc(17px * var(--portal-text-scale)); font-weight: 720; letter-spacing: -.04em; }
.ops-empty { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid #ededde; border-radius: 9px; background: #fafbf6; }
.ops-empty-mark { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #57581a; background: #f2f2e1; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; }
.ops-empty-mark.is-attention { color: #976d2e; background: #faf0d9; }
.ops-empty strong { display: block; color: #525334; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.ops-empty p { margin: 4px 0 0; color: #908880; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.ops-panel-footer { display: flex; align-items: center; justify-content: flex-end; margin-top: 10px; }
.ops-inline-link { display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; color: #6b6d0e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; text-decoration: none; }
.ops-inline-link svg { width: 13px; height: 13px; }
.ops-inline-link:hover { color: #585a05; }
button.ops-inline-link { border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.ops-inline-note { color: #97938a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.channel-count { display: flex; align-items: baseline; gap: 9px; margin-top: 20px; }
.channel-count strong { color: #323313; font-size: calc(37px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.06em; line-height: 1; }
.channel-count span { color: #878571; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.ops-body-copy { min-height: 31px; margin: 8px 0 10px; color: #888674; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.channel-health { display: flex; align-items: center; gap: 8px; min-height: 30px; padding-top: 9px; border-top: 1px solid #edf0ed; color: #888674; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.channel-health .status-light { width: 6px; height: 6px; box-shadow: none; }
.status-caption { max-width: 45%; color: #9e9b92; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: right; }
.data-panel, .quick-panel { padding-bottom: 12px; }
.integration-row { display: flex; align-items: center; gap: 10px; min-height: 67px; padding: 11px 0; border-bottom: 1px solid #edf0ed; }
.integration-row:last-child { border-bottom: 0; }
.integration-row > div { min-width: 0; flex: 1; }
.integration-row strong { display: block; color: #555537; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 710; }
.integration-row p { margin: 4px 0 0; color: #969487; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.integration-action { display: inline-flex; width: 28px; height: 28px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0; border: 1px solid #e3e9e5; border-radius: 7px; color: #7b7858; background: #fff; text-decoration: none; cursor: pointer; }
.integration-action:hover { border-color: #ddddaf; color: #727406; }
.integration-action svg { width: 13px; height: 13px; }
.integration-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: #6b6d0e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; text-decoration: none; white-space: nowrap; }
.integration-link svg { width: 13px; height: 13px; }
.integration-link:hover { color: #585a05; }
.quick-row { display: flex; width: 100%; min-height: 47px; align-items: center; gap: 10px; padding: 7px 0; border: 0; border-bottom: 1px solid #edf0ed; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.quick-row:last-child { border-bottom: 0; }
.quick-row:hover strong { color: #707206; }
.quick-number { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #878465; background: #f6f6f0; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; }
.quick-row > span:nth-child(2) { min-width: 0; flex: 1; }
.quick-row strong { display: block; color: #595a39; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.quick-row small { display: block; margin-top: 3px; color: #99968a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.quick-row > svg { width: 13px; height: 13px; color: #9a9681; }
.dashboard-source { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 11px; color: #a5a09a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: center; }
.dashboard-source svg { width: 12px; height: 12px; }

@media (max-width: 1120px) {
  .sidebar { width: 210px; }
  .main-shell { margin-left: 210px; }
  .brand { gap: 7px; margin-inline: 5px; }
  .brand img { width: 100px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 840px), (max-height: 500px) and (max-width: 1000px) {
  .sidebar { z-index: 40; width: 248px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 13px 0 35px rgba(0,0,0,.13); }
  body:not(.menu-open) .sidebar { box-shadow: none; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 35; inset: 0; display: block; pointer-events: none; opacity: 0; background: rgba(24, 24, 4,.43); transition: opacity .2s ease; }
  body.menu-open .sidebar-scrim { pointer-events: auto; opacity: 1; }
  .main-shell { margin-left: 0; }
  .menu-toggle { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border: 1px solid #e4eae6; border-radius: 8px; color: #777552; background: white; cursor: pointer; }
  .menu-toggle svg { width: 17px; height: 17px; }
  .topbar { justify-content: flex-start; }
  .topbar-context { flex: 0 1 auto; }
  .topbar-date { min-width: 0; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .topbar-actions { gap: 10px; }
  .search-trigger { width: 36px; justify-content: center; padding: 0; }
  .search-trigger span, .search-trigger kbd, .topbar-separator { display: none; }
  .welcome-layout { grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); }
}
@media (max-width: 620px) {
  .topbar { height: 57px; gap: 11px; padding-inline: 14px; }
  .topbar-context { gap: 7px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .topbar-context span:nth-child(2) { display: none; }
  .topbar-date { --topbar-date-gap: 5px; gap: var(--topbar-date-gap); font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: -.015em; }
  .topbar-date-long { display: none; }
  .topbar-date-short { display: inline; flex: 0 0 auto; }
  .topbar-date-clock { gap: var(--topbar-date-gap); }
  .topbar-date-clock svg { width: 12px; height: 12px; }
  .context-divider { display: none; }
  .team-name { display: none; }
  .team-avatar { width: 29px; height: 29px; }
  .content { min-height: calc(100vh - 101px); padding: 24px 15px 25px; }
  .page-foot { min-height: 44px; padding-inline: 15px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .page-heading h1, .welcome-copy h1 { font-size: calc(27px * var(--portal-text-scale)); }
  .welcome-layout { grid-template-columns: 1fr; }
  .welcome-card { min-height: 217px; padding: 22px 20px; }
  .welcome-card::after { top: -100px; right: -128px; }
  .welcome-copy p { max-width: 310px; }
  .welcome-date { right: 15px; bottom: 12px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .systems-card { min-height: 0; padding: 15px 17px 13px; }
  .system-row { min-height: 34px; }
  .section-bar { margin-top: 23px; }
  .section-bar h2 { font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .work-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .work-card { min-height: 156px; padding: 12px; }
  .work-card h3 { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .work-card p { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .work-card-title { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .work-card-description { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .work-card .work-foot { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-bottom { grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
  .next-card { min-height: 99px; padding: 14px; }
  .app-grid { grid-template-columns: 1fr; gap: 8px; }
  .dashboard-intro { align-items: center; flex-direction: column; gap: 13px; margin-bottom: 16px; }
  .dashboard-intro h1 { font-size: calc(27px * var(--portal-text-scale)); }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .heading-action, .dashboard-actions .hero-primary { flex: 1; justify-content: center; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .metric-card { min-height: 105px; padding: 11px 10px; }
  .metric-icon { width: 25px; height: 25px; }
  .metric-label { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .metric-value { margin-top: 9px; font-size: calc(24px * var(--portal-text-scale)); }
  .metric-detail { margin-top: 5px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-panels, .dashboard-lower { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .ops-panel { padding: 14px; }
  .queue-stats { gap: 5px; margin-top: 13px; }
  .queue-stats > div { min-height: 51px; padding-inline: 7px; }
  .queue-stats span { max-width: 62px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .queue-stats strong { font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-source { justify-content: center; padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.app-shell[data-reduce-motion="true"] *, .app-shell[data-reduce-motion="true"] *::before, .app-shell[data-reduce-motion="true"] *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }

.contact-workspace { display: grid; gap: 13px; }
.contact-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.contact-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.contact-create-button, .contact-save-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid #60620b; border-radius: 9px; color: #fff; background: #63640c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; cursor: pointer; transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.contact-export-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid #d7e4e0; border-radius: 9px; color: #65663f; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.contact-export-button:hover:not(:disabled) { border-color: #c9c9a7; color: #555711; background: #f9faf5; }
.contact-export-button:disabled { opacity: .65; cursor: progress; }
.contact-export-button svg { width: 14px; height: 14px; }
.contact-create-button:hover, .contact-save-button:hover:not(:disabled) { transform: translateY(-1px); background: #595b08; box-shadow: 0 5px 14px rgba(96, 98, 11, .16); }
.contact-create-button svg { width: 15px; height: 15px; }
.contact-create-button:focus-visible, .contact-save-button:focus-visible, .contact-dialog-close:focus-visible { outline: 3px solid rgba(114, 117, 0, .3); outline-offset: 2px; }
.contact-save-button:disabled { opacity: .65; cursor: progress; }
.contact-search { display: flex; width: min(520px, 100%); min-height: 42px; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #dbe5e2; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(54, 55, 11, .025); }
.contact-search > svg { width: 17px; height: 17px; flex: 0 0 auto; color: #969273; }
.contact-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #3f4023; background: transparent; font: inherit; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-search input::placeholder { color: #a8a598; }
.contact-search kbd { flex: 0 0 auto; padding: 3px 5px; border: 1px solid #e6ece9; border-radius: 5px; color: #979582; background: #f8faf9; font-family: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; line-height: 1.2; white-space: nowrap; }
.contact-count { color: #8a8871; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; white-space: nowrap; }
.contact-list-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 16px rgba(54, 55, 11, .025); }
.contact-list-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 20px 16px; border-bottom: 1px solid #edf1ef; }
.contact-list-heading .eyebrow { margin-bottom: 6px; }
.contact-list-heading h2 { margin: 0; color: #3f4023; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; letter-spacing: -.02em; }
.contact-list-heading p:not(.eyebrow) { margin: 6px 0 0; color: #918e7c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.contact-list-heading .source-badge { flex: 0 0 auto; }
.contact-table-wrap { width: 100%; overflow-x: auto; }
.contact-table { width: 100%; border-collapse: collapse; text-align: left; }
.contact-table th { height: 37px; padding: 0 14px; color: #959381; background: #fcfcfa; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .09em; white-space: nowrap; }
.contact-table th:first-child, .contact-table td:first-child { padding-left: 20px; }
.contact-table td { height: 62px; padding: 9px 14px; border-top: 1px solid #edf1ef; color: #636145; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-identity { display: flex; min-width: 150px; align-items: center; gap: 10px; }
.contact-initials { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid #e8e8d3; border-radius: 10px; color: #656710; background: linear-gradient(145deg,#f9f9ed,#f8f8e9); font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; }
.contact-initials.has-image { position: relative; overflow: hidden; isolation: isolate; }
.contact-initials.has-image > span { position: relative; z-index: 1; opacity: 0; }
.contact-initials.has-image.is-failed .conversation-avatar-image { display: none; }
.contact-initials.has-image.is-failed > span { opacity: 1; }
.contact-identity > span:last-child { display: grid; min-width: 0; gap: 3px; }
.contact-identity strong { overflow: hidden; max-width: 235px; color: #454627; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.contact-name-with-badge { display: inline-flex; min-width: 0; align-items: center; gap: 6px; }
.staff-contact-badge { display: inline-flex; min-height: 18px; flex: 0 0 auto; align-items: center; padding: 0 6px; border: 1px solid #d7d4f0; border-radius: 99px; color: #5d55a0; background: #f4f2ff; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; line-height: 1; }
.contact-identity small { color: #9b998b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-value { display: inline-block; overflow: hidden; max-width: 210px; color: #6b6748; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.contact-value:hover { color: #6e7106; text-decoration: underline; }
.contact-blank { color: #b2afa8; }
.contact-date { color: #8f8d78 !important; white-space: nowrap; }
.consent-pill { display: inline-flex; min-height: 21px; align-items: center; padding: 0 7px; border: 1px solid #e5e9e6; border-radius: 99px; color: #888775; background: #fafbf9; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; white-space: nowrap; }
.consent-pill.is-good { border-color: #e9e9d3; color: #5c5e28; background: #f8f8f1; }
.consent-pill.is-muted { border-color: #eee5d9; color: #94744e; background: #fbf7ef; }
.contact-state { display: flex; min-height: 238px; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; text-align: center; }
.contact-state-mark { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 12px; border: 1px solid #e8e8d6; border-radius: 11px; color: #616224; background: #f8f8f1; font-size: calc(17px * var(--portal-text-scale)); font-weight: 700; }
.contact-state.is-warning .contact-state-mark { border-color: #efe2ca; color: #a77937; background: #fbf7ed; }
.contact-state > strong { color: #4d4e2f; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.contact-state > p { max-width: 400px; margin: 7px 0 0; color: #959482; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.contact-loader { width: 20px; height: 20px; margin-bottom: 12px; border: 2px solid #eaeadb; border-top-color: #757820; border-radius: 50%; animation: contact-spin .75s linear infinite; }
@keyframes contact-spin { to { transform: rotate(360deg); } }
.contact-pagination { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 18px; border-top: 1px solid #edf1ef; color: #989687; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-pagination > .contact-pager { display: flex; align-items: center; gap: 10px; }
.contact-pagination > .contact-page-size { display: inline-flex; align-items: center; justify-self: end; gap: 7px; }
.contact-tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.contact-tag-chip, .contact-note-mark { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border: 1px solid color-mix(in srgb, var(--tag-color, #72755b) 35%, #fff); border-radius: 999px; color: var(--tag-color, #72755b); background: color-mix(in srgb, var(--tag-color, #72755b) 10%, #fff); font-size: 11px; font-weight: 600; white-space: nowrap; }
.contact-note-mark { cursor: help; }
.contact-tag-fields { display: grid; gap: 10px; }
.contact-tag-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-tag-option { display: inline-flex; align-items: center; }
.contact-tag-choice { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--tag-color) 35%, #fff); border-radius: 999px; color: var(--tag-color); font-size: 12px; font-weight: 600; cursor: pointer; }
.contact-tag-choice:has(input:checked) { background: color-mix(in srgb, var(--tag-color) 14%, #fff); }
.contact-tag-remove { padding: 2px 5px; border: 0; color: #a1a38a; background: none; font-size: 15px; line-height: 1; cursor: pointer; }
.contact-tag-remove:hover { color: #c0392b; }
.contact-tag-new { display: flex; gap: 8px; }
.contact-tag-new input { flex: 1; min-width: 0; }
.contact-tag-fields textarea { width: 100%; resize: vertical; font: inherit; }
.contact-reviewed-at:empty { display: none; }
.contact-page-size select { min-height: 30px; padding: 0 6px; border: 1px solid #d7e4e0; border-radius: 8px; color: #65663f; background: #fff; font: inherit; }
.contact-feedback { padding: 10px 12px; border: 1px solid #e8e8d6; border-radius: 9px; color: #5c5e28; background: #f8f8f1; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.contact-feedback.is-error { border-color: #f0d4d0; color: #a1463f; background: #fff5f3; }
.contact-dialog { width: min(520px, calc(100vw - 24px)); max-width: none; max-height: min(88vh, 720px); overflow: auto; padding: 0; border: 1px solid #dce6e2; border-radius: 16px; color: var(--text); background: #fff; box-shadow: 0 28px 90px rgba(28, 28, 4,.28); }
.contact-dialog::backdrop { background: rgba(25, 26, 5,.5); backdrop-filter: blur(3px); }
.contact-form { padding: 22px; }
.contact-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid #e8eeea; }
.contact-dialog-head .eyebrow { margin-bottom: 6px; }
.contact-dialog-head h2 { margin: 0; color: #3d3e1e; font-size: calc(20px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.contact-dialog-head p:not(.eyebrow) { margin: 6px 0 0; color: #928e7e; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.contact-dialog-close { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid #e3eae6; border-radius: 9px; color: #888570; background: #fff; font-size: calc(20px * var(--portal-text-scale)); line-height: 1; cursor: pointer; }
.contact-dialog-close:hover { color: #424321; background: #f7f8f3; }
.contact-form-fields { display: grid; gap: 14px; padding-top: 18px; }
.contact-form-fields label { display: grid; gap: 6px; color: #5e5f3f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.contact-form-fields label > span { display: flex; align-items: baseline; gap: 5px; }
.contact-form-fields label > span small { color: #a29e94; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 560; }
.contact-form-fields input { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #dce6e2; border-radius: 8px; color: #444526; background: #fff; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-form-fields input:focus { border-color: #bebf83; box-shadow: 0 0 0 3px rgba(105, 107, 23, .09); outline: 0; }
.contact-form-fields input::placeholder { color: #b2aea6; }
.contact-phone-entry { display: flex; min-width: 0; align-items: stretch; gap: 6px; }
.contact-phone-entry > select { width: min(42%, 142px); min-width: 112px; min-height: 42px; flex: 0 0 auto; padding: 0 7px; border: 1px solid #dce6e2; border-radius: 8px; color: #5e5f3f; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.contact-phone-entry > select:focus, .contact-phone-custom-code input:focus { border-color: #bebf83; box-shadow: 0 0 0 3px rgba(105, 107, 23, .09); outline: 0; }
.contact-phone-custom-code:focus-within { border-color: #bebf83; box-shadow: 0 0 0 3px rgba(105, 107, 23, .09); }
.contact-phone-entry > input { min-width: 0; flex: 1 1 auto; }
.contact-phone-custom-code { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; padding-left: 7px; border: 1px solid #dce6e2; border-radius: 8px; color: #878471; background: #fff; }
.contact-phone-custom-code[hidden] { display: none; }
.contact-phone-custom-code input { width: 43px !important; min-height: 40px !important; padding: 0 5px !important; border: 0 !important; box-shadow: none !important; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)) !important; text-align: center; }
.contact-phone-custom-code input:focus { box-shadow: none !important; }
.contact-form-fields label small { color: #9a9689; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.45; }
.contact-consent-fields { display: grid; gap: 12px; min-width: 0; margin: 16px 0 0; padding: 13px; border: 1px solid #e2eae4; border-radius: 10px; background: #fcfcf9; }
.contact-consent-fields legend { padding: 0 5px; color: #61766d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .035em; }
.contact-consent-intro, .contact-consent-source > small { margin: 0; color: #82918a; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.45; }
.contact-consent-channel-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.contact-consent-channel { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 8px 10px; border: 1px solid #e2eae4; border-radius: 8px; background: #fff; cursor: pointer; }
.contact-consent-channel input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #656710; }
.contact-consent-channel input:focus-visible { outline: 3px solid rgba(105, 107, 23, .2); outline-offset: 2px; }
.contact-consent-channel span { display: grid; gap: 2px; min-width: 0; }
.contact-consent-channel b { color: #38544c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.contact-consent-channel i { color: #8a9994; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; }
.contact-consent-channel.is-active { border-color: #e9e9d3; background: #f8f8f1; }
.contact-consent-channel.is-active i { color: #5c5e28; }
.contact-consent-summary { display: flex; flex-wrap: nowrap; gap: 3px; }
.contact-consent-summary .consent-pill { padding: 0 6px; }
.campaign-consent-channel-status { display: flex; width: fit-content; align-items: center; gap: 5px; flex-wrap: wrap; }
.campaign-consent-channel-status i { color: #888775; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; font-weight: 650; }
.campaign-consent-channel-status i.is-on { color: #5c5e28; }
.campaign-consent-channel-status i.is-off { color: #94744e; }
.contact-role-fields { display: grid; gap: 10px; min-width: 0; margin: 16px 0 0; padding: 13px; border: 1px solid #e2eae4; border-radius: 10px; background: #fcfcf9; }
.contact-role-fields legend { padding: 0 5px; color: #61766d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .035em; }
.contact-role-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.contact-role-toggle input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #6b63ad; }
.contact-role-toggle input:focus-visible { outline: 3px solid rgba(107,99,173,.2); outline-offset: 2px; }
.contact-role-toggle span { display: grid; gap: 4px; }
.contact-role-toggle strong { color: #38544c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.contact-role-toggle small { color: #82918a; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.45; }
.contact-consent-source { display: grid; gap: 6px; color: #5e5f3f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.contact-consent-source > span { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; }
.contact-consent-source > span small { color: #a29e94; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 560; }
.contact-consent-source input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #dce6e2; border-radius: 8px; color: #444526; background: #fff; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-consent-source input:focus { border-color: #bebf83; box-shadow: 0 0 0 3px rgba(105, 107, 23, .09); outline: 0; }
.contact-consent-source input:read-only { color: #778a85; background: #f4f7f4; }
.contact-consent-source input::placeholder { color: #b2aea6; }
.contact-form-error { margin-top: 12px; padding: 10px 11px; border: 1px solid #efd6d1; border-radius: 8px; color: #a04e43; background: #fff5f3; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.contact-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 18px; }
.contact-form-actions .table-action { min-height: 38px; padding: 0 12px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-cancel-button { display: inline-flex; min-width: 100px; min-height: 38px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid #d8e3de; border-radius: 8px; color: #6a644d; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.contact-cancel-button:hover:not(:disabled) { border-color: #cfcfb2; color: #51521d; background: #f9faf5; }
.contact-cancel-button:disabled { color: #a39c95; background: #edf1ee; cursor: default; }
.contact-form-actions .contact-save-button { min-width: 126px; }
.table-action { min-height: 28px; padding: 0 9px; border: 1px solid #dce6e2; border-radius: 7px; color: #6a6649; background: #fff; font-family: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.table-action:hover:not(:disabled) { border-color: #d6d6b5; color: #6e7106; background: #fcfcf8; }
.table-action:disabled { color: #bfbbb4; background: #fafbfa; cursor: default; }

@media (max-width: 760px) {
  .contact-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .contact-search { width: 100%; }
  .contact-count { padding-left: 2px; white-space: normal; }
  .contact-create-button { min-height: 35px; padding-inline: 10px; }
  .contact-export-button { min-height: 35px; padding-inline: 9px; }
  .contact-toolbar-actions { gap: 6px; }
  .contact-list-heading { padding: 16px 15px 13px; }
  .contact-list-heading p:not(.eyebrow) { max-width: 260px; }
  .contact-identity { min-width: 0; }
  .contact-identity strong { max-width: min(65vw, 280px); }
  .contact-value { max-width: 68vw; }
  .contact-state { min-height: 210px; }
  .contact-pagination { padding-inline: 13px; grid-template-columns: 1fr auto; }
  .contact-pagination > .contact-pager { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .contact-form { padding: 17px; }
  .contact-dialog-head h2 { font-size: calc(18px * var(--portal-text-scale)); }
  .contact-consent-fields { gap: 11px; padding: 11px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.conversation-channel-banner { display: flex; align-items: center; gap: 11px; margin: -2px 0 12px; padding: 11px 14px; border: 1px solid #efe4cf; border-radius: 11px; background: #fffaf1; }
.conversation-channel-banner.is-connected { border-color: #e8e8d8; background: #f9faf5; }
.conversation-channel-banner > .status-light { width: 8px; height: 8px; flex: 0 0 auto; }
.conversation-channel-banner > div { min-width: 0; flex: 1; }
.conversation-channel-banner strong { display: block; color: #57523a; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; }
.conversation-channel-banner p { margin: 3px 0 0; color: #8d877b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.conversation-channel-banner .ops-inline-link { flex: 0 0 auto; }
.conversation-workspace { display: grid; grid-template-columns: minmax(270px, .82fr) minmax(0, 1.5fr); height: min(690px, max(340px, calc(100vh - 290px))); min-height: 340px; overflow: hidden; border: 1px solid #dfe8e5; border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgba(54, 55, 11, .035); }
.conversation-inbox-panel { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto minmax(0,1fr); overflow: hidden; border-right: 1px solid #e7eeeb; background: #fff; }
.conversation-inbox-heading { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0,1fr); justify-items: center; gap: 10px; padding: 16px 16px 12px; text-align: center; }
.conversation-inbox-heading > div:first-child { display: grid; justify-items: center; }
.conversation-inbox-heading .eyebrow { margin: 0 0 4px; }
.conversation-inbox-heading h2 { margin: 0; color: #434425; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.02em; }
.conversation-inbox-meta { display: flex; width: 100%; max-width: 100%; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.conversation-refresh-button { display: inline-flex; min-height: 30px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 1px solid #d9e2de; border-radius: 8px; color: #6a6748; background: var(--white); font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.conversation-refresh-button:hover { transform: translateY(-1px); border-color: #d8da9d; color: #707206; }
.conversation-refresh-button svg { width: 13px; height: 13px; }
.conversation-handoff-button { display: inline-flex; min-height: 30px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 1px solid #e3e4d5; border-radius: 8px; color: #49664f; background: #fafaf6; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.conversation-handoff-button:hover { border-color: #cdcfa6; color: #4f501e; background: #f8f8ed; }
.conversation-handoff-button svg { width: 13px; height: 13px; }
.conversation-search-tools { position: relative; z-index: 3; display: flex; min-width: 0; align-items: center; gap: 6px; margin: 0 13px 10px; }
.conversation-queue-inbox-control { display: grid; min-width: 0; gap: 4px; margin: 0 13px 8px; padding: 8px 9px; border: 1px solid #edeee5; border-radius: 9px; background: #fbfbf8; }
.conversation-queue-inbox-control label { display: grid; min-width: 0; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; color: #746a5d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.conversation-queue-inbox-control select { width: 100%; min-width: 0; min-height: 30px; padding: 5px 8px; border: 1px solid #dce7e1; border-radius: 7px; color: #545636; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-queue-inbox-control select:disabled { color: #4c6c60; background: #f7f8f3; opacity: 1; }
.conversation-queue-inbox-control small { overflow: hidden; color: #8a9993; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.conversation-search-tool { position: relative; display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; padding: 0; border: 1px solid #e1e9e6; border-radius: 9px; color: #787361; background: #fcfcfa; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease; }
.conversation-search-tool:hover { border-color: #dbdbc2; color: #585a19; background: #f9faf5; }
.conversation-search-tool:focus-visible { outline: 2px solid rgba(106, 107, 25, .28); outline-offset: 2px; }
.conversation-search-tool-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; shape-rendering: geometricPrecision; }
.conversation-filter-toggle.has-active-filters { border-color: #d3d4a2; color: #56581a; background: #f7f8ee; }
.conversation-filter-count { position: absolute; top: -5px; right: -5px; display: grid; min-width: 16px; height: 16px; place-items: center; padding: 0 4px; border: 2px solid #fff; border-radius: 99px; color: #fff; background: #5f611a; font-size: 8px; font-weight: 750; line-height: 1; }
.conversation-filter-popover { position: relative; z-index: 5; flex: 0 0 auto; }
.conversation-filter-menu { position: absolute; top: calc(100% + 7px); left: 0; display: grid; width: min(244px,calc(100vw - 34px)); max-height: min(330px,calc(100dvh - 110px)); gap: 3px; overflow: auto; padding: 7px; border: 1px solid #e7e8dc; border-radius: 12px; background: #fff; box-shadow: 0 15px 35px rgba(46, 46, 16, .17),0 2px 6px rgba(46, 46, 16, .05); }
.conversation-filter-menu[hidden], .conversation-filter-submenu[hidden] { display: none; }
.conversation-filter-menu-section { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 1px solid transparent; border-radius: 8px; color: #545437; background: transparent; text-align: left; cursor: pointer; }
.conversation-filter-menu-section:hover, .conversation-filter-menu-section.is-open { border-color: #edeee1; background: #fafaf6; }
.conversation-filter-menu-section > span { display: grid; min-width: 0; gap: 2px; }
.conversation-filter-menu-section strong { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.conversation-filter-menu-section small { overflow: hidden; color: #85958e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.conversation-filter-chevron { width: 7px; height: 7px; flex: 0 0 7px; margin-right: 2px; border-right: 1.5px solid #879a91; border-bottom: 1.5px solid #879a91; transform: rotate(-45deg); transition: transform .14s ease; }
.conversation-filter-menu-section.is-open .conversation-filter-chevron { transform: rotate(45deg) translate(-1px,-1px); }
.conversation-filter-submenu { display: grid; gap: 2px; margin: -2px 5px 4px 10px; padding: 2px 0 2px 9px; border-left: 1px solid #ecede4; animation: conversation-filter-reveal .14s ease-out; }
.conversation-filter-option { display: flex; min-height: 32px; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; color: #72685e; background: transparent; text-align: left; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.conversation-filter-option:hover { color: #55561a; background: #fafaf6; }
.conversation-filter-option.is-selected { border-color: #ebebdb; color: #55561c; background: #f8f8f0; font-weight: 680; }
.conversation-filter-option svg { width: 13px; height: 13px; flex: 0 0 13px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.conversation-filter-menu-footer { display: flex; min-height: 27px; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 4px 0; padding: 6px 4px 1px; border-top: 1px solid #edf1ee; }
.conversation-filter-menu-footer p { margin: 0; color: #91a09a; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-filter-menu-footer button { padding: 3px 5px; border: 0; border-radius: 5px; color: #5b5c1c; background: transparent; font: inherit; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.conversation-filter-menu-footer button:hover { background: #f6f7ed; }
.conversation-search { display: flex; min-width: 0; min-height: 36px; flex: 1 1 auto; align-items: center; gap: 8px; margin: 0; padding: 0 10px; border: 1px solid #e1e9e6; border-radius: 9px; background: #fcfcfa; }
.conversation-search:focus-within { border-color: #c4c596; background: #fff; box-shadow: 0 0 0 3px rgba(104, 106, 25, .08); }
.conversation-search-icon { display: block; width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; shape-rendering: geometricPrecision; color: #9b9787; }
.conversation-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #565736; background: transparent; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-search input::placeholder { color: #a9a69a; }
.conversation-queue { position: relative; z-index: 0; }
.conversation-inbox-panel.has-open-filter-menu { position: relative; z-index: 5; overflow: visible; }
@keyframes conversation-filter-reveal { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
.conversation-default-inbox-field { grid-column: 1 / -1; padding-top: 1px; }
.conversation-default-inbox-field > small { color: #939181; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; }
.conversation-default-inbox-field > small.is-error,
.conversation-default-inbox-field select.is-error { color: #a63b3b; border-color: #d99a9a; }
.conversation-queue { width: 100%; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.conversation-list { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0,1fr); }
.conversation-row { display: flex; width: 100%; max-width: 100%; min-width: 0; align-items: center; gap: 10px; padding: 12px 13px; border: 0; border-bottom: 1px solid #f0f3f1; color: inherit; background: #fff; text-align: left; cursor: pointer; transition: background .14s ease; }
.conversation-row:hover { background: #fbfbf8; }
.conversation-row.is-active { background: #f6f7ed; box-shadow: inset 3px 0 #686b11; }
.conversation-avatar { position: relative; display: grid; overflow: hidden; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid #e8e8d8; border-radius: 12px; color: #606218; background: linear-gradient(145deg,#f8f8ed,#f7f7eb); font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; }
.conversation-avatar.is-large { width: 39px; height: 39px; border-radius: 13px; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-avatar.is-inline { width: 18px; height: 18px; border-radius: 6px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-avatar-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.conversation-avatar-fallback { display: grid; width: 100%; height: 100%; place-items: center; }
.conversation-avatar.has-image:not(.is-failed) .conversation-avatar-fallback { opacity: 0; }
.conversation-avatar.is-failed .conversation-avatar-image { display: none; }
.conversation-row-copy { display: grid; min-width: 0; flex: 1; gap: 5px; }
.conversation-row-top, .conversation-row-bottom { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.conversation-row-top strong { overflow: hidden; color: #404023; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.conversation-contact-name { display: inline-flex; min-width: 0; align-items: center; gap: 6px; }
.conversation-row-top time { flex: 0 0 auto; color: #8d8977; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-row-bottom > span:first-child { overflow: hidden; color: #7d7a63; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.conversation-row-tags { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.conversation-row-tags small { color: #8b8770; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.conversation-row-tags .conversation-row-whatsapp-source { max-width: 94px; overflow: hidden; padding: 3px 6px; border: 1px solid #e9ead6; border-radius: 99px; color: #595a25; background: #f8f8f0; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.conversation-row-tags .conversation-row-whatsapp-source.is-unidentified { border-color: #eadfc5; color: #826b3c; background: #fff9ed; }
.conversation-row-tags b { display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border-radius: 99px; color: #fff; background: #25D366; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.conversation-row-tags b.is-priority { border: 1px solid #efc8bc; color: #a64b36; background: #fff0e9; }
.conversation-row-labels { display: flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; }
.conversation-row-labels small { display: inline-flex; min-width: 0; max-width: 46%; min-height: 20px; align-items: center; overflow: hidden; padding: 0 7px; border: 1px solid transparent; border-radius: 99px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.conversation-label-chip { border-color: #e8e9d5 !important; color: #54561d; background: #f7f8ee; }
.conversation-row-bot-state { border-color: #e6e6d4 !important; color: #5c5d29; background: #f7f8ee; }
.conversation-row-bot-state.is-handoff { border-color: #ecd8b4 !important; color: #8a6227; background: #fff7e8; }
.conversation-row-bot-state.is-paused { border-color: #ead1cb !important; color: #9a5143; background: #fff3f0; }
.conversation-assignee-chip { border-color: #eaebd3 !important; color: #5c5e2a; background: #f8f9ef; }
.conversation-unassigned-chip { border-color: #ecdcb9 !important; color: #8a682e; background: #fff8e9; }
.conversation-queue-state { display: flex; min-height: 250px; flex-direction: column; align-items: center; justify-content: center; padding: 22px 18px; text-align: center; }
.conversation-queue-state .contact-state-mark { margin-bottom: 11px; }
.conversation-queue-state .contact-loader { margin: 0; }
.conversation-queue-state strong { color: #5d5a3f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.conversation-queue-state p { max-width: 250px; margin: 6px 0 0; color: #9a9789; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.conversation-queue-state .table-action { margin-top: 12px; }
.conversation-empty-mark { display: grid; width: 32px; height: 32px; place-items: center; margin-bottom: 10px; border: 1px solid #e8e8d8; border-radius: 11px; color: #616224; background: #f9f9f3; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.conversation-empty-mark svg { width: 15px; height: 15px; }
.conversation-list-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-top: 1px solid #edf1ef; color: #8a8673; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-list-footer > div { display: flex; align-items: center; gap: 7px; }
.conversation-list-footer .table-action { min-width: 27px; min-height: 25px; padding: 0 5px; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-thread { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto auto auto minmax(0,1fr) auto; background: #f7f9f8; }
.conversation-thread-empty { grid-row: 1 / -1; }
.conversation-thread-head { appearance: none; display: flex; width: 100%; min-width: 0; grid-row: 1; align-items: center; gap: 11px; padding: 13px 17px; border: 0; border-bottom: 1px solid #e6edeb; color: inherit; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: background .14s ease; }
.conversation-thread-head::after { width: 8px; height: 8px; flex: 0 0 8px; margin-left: 2px; border-top: 1.5px solid #969283; border-right: 1.5px solid #969283; content: ''; transform: rotate(45deg); transition: transform .14s ease; }
.conversation-thread-head:hover { background: #fdfdfb; }
.conversation-thread-head[aria-expanded="true"]::after { transform: rotate(135deg); }
.conversation-thread-person { display: grid; min-width: 0; flex: 1; gap: 3px; }
.conversation-thread-person strong { overflow: hidden; color: #4a4b2d; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.conversation-thread-person span { overflow: hidden; color: #999688; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.conversation-thread-person .conversation-thread-route { overflow: hidden; color: #598072; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.conversation-status-pill { display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; border: 1px solid #eaeadb; border-radius: 99px; color: #65662f; background: #f9f9f3; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; white-space: nowrap; }
.conversation-status-pill.is-resolved { border-color: #e5e8e7; color: #898678; background: #f6f7f6; }
.conversation-crm-link { display: inline-flex; align-items: center; gap: 5px; color: #89856c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-decoration: none; white-space: nowrap; }
.conversation-crm-link svg { width: 12px; height: 12px; }
.conversation-thread-actions { display: flex; min-height: 40px; grid-row: 2; flex-wrap: wrap; align-items: center; gap: 7px; padding: 6px 14px; border-bottom: 1px solid #e6edeb; background: #fbfcfb; }
.conversation-control-button { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #dce6e2; border-radius: 7px; color: #706b53; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; transition: border-color .14s ease, background .14s ease, color .14s ease; }
.conversation-control-button:hover:not(:disabled) { border-color: #d1d2b4; color: #51531d; background: #fbfbf4; }
.conversation-control-button.is-primary { border-color: #616312; color: #fff; background: #616312; }
.conversation-control-button.is-primary:hover:not(:disabled) { border-color: #57590e; background: #57590e; }
.conversation-control-button.is-warning { border-color: #ecd8b4; color: #85612d; background: #fffaf0; }
.conversation-control-button.is-warning:hover:not(:disabled) { border-color: #dcc391; color: #76531f; background: #fff4dc; }
.conversation-urgency-toggle { gap: 7px; border-color: #e3d6c4; color: #81653c; background: #fffaf2; }
.conversation-urgency-toggle:hover:not(:disabled) { border-color: #ddbd8e; color: #77511e; background: #fff4e1; }
.conversation-urgency-toggle.is-active { border-color: #edc4b8; color: #a04834; background: #fff1ec; }
.conversation-urgency-toggle.is-active:hover:not(:disabled) { border-color: #df9f90; color: #913b2a; background: #ffe7df; }
.conversation-urgency-indicator { display: grid; width: 17px; height: 17px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; line-height: 1; }
.conversation-control-button:disabled { color: #a8a49b; background: #f1f4f2; cursor: default; }
.conversation-assignment-note { margin-left: auto; color: #7d7a63; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-action-error { flex: 1 1 100%; margin: 0; color: #a04e43; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.conversation-source-save { min-height: 31px; padding: 0 10px; border: 1px solid #6e6f34; border-radius: 7px; color: #fff; background: #6e6f34; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; cursor: pointer; }
.conversation-source-save:hover:not(:disabled) { border-color: #5c5d29; background: #5c5d29; }
.conversation-source-save:disabled { border-color: #dfe7e2; color: #97a49d; background: #edf2ee; cursor: default; }
.conversation-source-error { flex: 1 1 100%; color: #a04e43; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-messages { min-height: 0; grid-row: 4; overflow: auto; padding: 18px clamp(12px,3vw,30px); overscroll-behavior: contain; }
.conversation-message-list { display: grid; gap: 14px; }
.conversation-history-warning { width: fit-content; max-width: min(100%, 520px); margin: 0 auto 10px; padding: 7px 11px; border: 1px solid #eadfc5; border-radius: 9px; color: #746344; background: #fffaf0; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; text-align: center; }
.conversation-message-row { display: grid; max-width: min(560px,86%); gap: 5px; justify-items: start; }
.conversation-message-row.is-outgoing { justify-self: end; justify-items: end; }
.conversation-message-meta { display: flex; max-width: 100%; align-items: center; gap: 9px; padding: 0 3px; }
.conversation-message-meta strong { overflow: hidden; max-width: 220px; color: #8a8771; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.conversation-message-meta time { color: #a9a69b; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.conversation-message-bubble { max-width: 100%; padding: 10px 12px; border: 1px solid #e3eae7; border-radius: 4px 12px 12px 12px; color: #5c5940; background: #fff; box-shadow: 0 2px 5px rgba(54, 55, 11, .025); font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.conversation-message-row.is-outgoing .conversation-message-bubble { border-color: #eaead7; border-radius: 12px 4px 12px 12px; color: #525232; background: #f5f6e9; }
.conversation-no-text { color: #a09c91; font-style: italic; }
.conversation-delivery { display: inline-flex; align-items: center; gap: 4px; color: #a39f94; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-delivery-ticks { color: #708a80; font-size: 12px; font-weight: 750; letter-spacing: -2px; line-height: 1; }
.conversation-delivery.is-read .conversation-delivery-ticks { color: #88a11b; }
.conversation-delivery.is-failed { color: #b42318; font-weight: 650; }
.conversation-retry-button { min-height: 24px; padding: 3px 8px; border: 1px solid #e2b9b2; border-radius: 7px; color: #9e3e35; background: #fff8f6; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.conversation-retry-button:hover:not(:disabled) { border-color: #ca8074; background: #fff1ed; }
.conversation-retry-button:disabled { opacity: .56; cursor: not-allowed; }
.conversation-retry-error { max-width: 250px; color: #a04e43; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: right; }
.conversation-attachment-note { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; padding: 4px 6px; border: 1px solid #e5ebe8; border-radius: 6px; color: #8a8671; background: rgba(255,255,255,.62); font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-attachment-note svg { width: 12px; height: 12px; }
.conversation-message-state, .conversation-thread-empty { display: flex; min-height: 100%; flex-direction: column; align-items: center; justify-content: center; padding: 24px; color: #93907f; text-align: center; }
.conversation-message-state > strong, .conversation-thread-empty > strong { color: #666349; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 710; }
.conversation-message-state p, .conversation-thread-empty p { max-width: 300px; margin: 6px 0 0; color: #9a9789; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.conversation-message-state .contact-loader { margin-bottom: 11px; }
.conversation-message-state .table-action { margin-top: 12px; }
.conversation-thread-empty .conversation-empty-mark { width: 39px; height: 39px; border-radius: 13px; }
.conversation-composer-wrap { grid-row: 5; padding: 11px 14px 13px; border-top: 1px solid #e6edeb; background: #fff; }
.conversation-composer { overflow: hidden; border: 1px solid #dce6e2; border-radius: 10px; background: #fff; transition: border-color .14s ease, box-shadow .14s ease; }
.conversation-composer:focus-within { border-color: #c4c597; box-shadow: 0 0 0 3px rgba(104, 106, 25, .07); }
.conversation-composer textarea { display: block; width: 100%; min-height: 66px; max-height: 150px; resize: vertical; padding: 10px 11px 7px; border: 0; outline: 0; color: #515133; background: transparent; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.conversation-composer textarea::placeholder { color: #a8a49b; }
.conversation-composer textarea:disabled { opacity: .65; }
.conversation-composer-foot { display: flex; min-height: 36px; align-items: center; gap: 8px; padding: 4px 7px 7px 11px; }
.conversation-composer-foot > span:first-child { min-width: 0; flex: 1; overflow: hidden; color: #9b988a; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.conversation-composer-foot > span:nth-child(2) { flex: 0 0 auto; color: #adaba1; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-send-button { display: inline-flex; min-height: 28px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 7px; color: #fff; background: #636510; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.conversation-send-button:hover:not(:disabled) { background: #595b0d; }
.conversation-send-button:disabled { color: #aaa69d; background: #edf1ef; cursor: default; }
.conversation-send-button svg { width: 12px; height: 12px; }
.conversation-reply-error { margin-bottom: 8px; padding: 8px 10px; border: 1px solid #efd6d1; border-radius: 8px; color: #a04e43; background: #fff5f3; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.conversation-workspace button:focus-visible, .conversation-composer textarea:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }

@media (max-width: 760px) {
  .conversation-channel-banner { align-items: flex-start; margin-top: 0; padding: 10px 11px; }
  .conversation-channel-banner .ops-inline-link { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .conversation-workspace { height: auto; min-height: 0; grid-template-columns: minmax(0,1fr); overflow: visible; }
  .conversation-inbox-panel { min-height: 300px; max-height: 370px; grid-template-rows: auto auto auto minmax(0,1fr); border-right: 0; border-bottom: 1px solid #e7eeeb; border-radius: 13px 13px 0 0; }
  .conversation-inbox-panel.has-open-filter-menu { z-index: 5; }
  .conversation-inbox-heading { padding: 13px 12px 10px; }
  .conversation-inbox-meta { gap: 6px; }
  .conversation-queue-inbox-control { margin-inline: 11px; }
  .conversation-refresh-button { min-height: 28px; padding-inline: 7px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .conversation-search-tools { margin-inline: 11px; }
  .conversation-row { padding: 10px 11px; }
  .conversation-queue-state { min-height: 160px; }
  .conversation-thread { min-height: 400px; grid-template-rows: auto auto auto minmax(220px,1fr) auto; border-radius: 0 0 13px 13px; }
  .conversation-thread-head { padding: 11px; }
  .conversation-thread-actions { padding: 7px 11px; }
  .conversation-source-picker { align-items: flex-start; flex-direction: column; gap: 7px; padding: 8px 11px; }
  .conversation-source-picker-controls { width: 100%; }
  .conversation-source-picker-controls select { width: auto; min-width: 0; flex: 1 1 auto; }
  .conversation-source-save { flex: 0 0 auto; }
  .conversation-assignment-note { margin-left: auto; }
  .conversation-message-row { max-width: 94%; }
  .conversation-messages { min-height: 220px; padding: 14px 11px; }
  .conversation-composer-wrap { padding: 9px 9px 10px; }
  .conversation-composer textarea { min-height: 58px; }
  .conversation-composer-foot { padding-inline: 8px; }
  .conversation-composer-foot > span:first-child { font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .conversation-composer-foot > span:nth-child(2) { display: none; }
  .conversation-crm-link { max-width: 74px; overflow: hidden; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
}

.intelligence-workspace { display: grid; gap: 13px; }
.intelligence-catalog { overflow: hidden; border: 1px solid #dfe8e4; border-radius: 14px; background: #fff; box-shadow: 0 5px 17px rgba(54, 55, 11, .03); }
.intelligence-catalog-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 17px 20px 14px; border-bottom: 1px solid #edf1ef; }
.intelligence-catalog-heading h2 { margin: 0; color: #3f4023; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.025em; }
.intelligence-catalog-heading p:not(.eyebrow) { margin: 5px 0 0; color: #918e7c; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.intelligence-catalog-count, .intelligence-catalog-workspace > header > span { flex: 0 0 auto; color: #8b8777; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.intelligence-catalog-workspaces { display: grid; }
.intelligence-catalog-workspace { padding: 13px 20px 15px; border-bottom: 1px solid #edf1ef; }
.intelligence-catalog-workspace:last-child { border-bottom: 0; }
.intelligence-catalog-workspace > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.intelligence-catalog-workspace > header h3 { min-width: 0; margin: 0; overflow: hidden; color: #696948; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; text-overflow: ellipsis; }
.intelligence-catalog-document { padding: 10px 12px; border: 1px solid #e8eeea; border-radius: 10px; background: #fcfdfc; }
.intelligence-catalog-document + .intelligence-catalog-document { margin-top: 8px; }
.intelligence-catalog-document > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.intelligence-catalog-document > header > div { display: grid; min-width: 0; gap: 4px; }
.intelligence-catalog-document > header strong { overflow: hidden; color: #515132; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-catalog-document > header small, .intelligence-catalog-table-copy small { color: #979487; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.intelligence-catalog-open { display: inline-flex; min-height: 30px; flex: 0 0 auto; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid #dce7e2; border-radius: 7px; color: #59591c; background: #fff; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; text-decoration: none; }
.intelligence-catalog-open:hover { border-color: #d2d2b5; background: #fafaf5; }
.intelligence-catalog-open svg { width: 12px; height: 12px; }
.intelligence-catalog-locked { color: #979488; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-catalog-tables { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.intelligence-catalog-tables li { min-width: 0; }
.intelligence-catalog-tables li > a, .intelligence-catalog-table-disabled { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #edf1ef; border-radius: 8px; color: #7d7b63; background: #fff; text-decoration: none; }
.intelligence-catalog-tables li > a:hover { border-color: #e4e3d3; color: #59591a; background: #fbfaf8; }
.intelligence-catalog-tables li > a > svg, .intelligence-catalog-table-disabled > svg { width: 14px; height: 14px; flex: 0 0 auto; color: #9a9577; }
.intelligence-catalog-tables li > a > svg:last-child { width: 12px; height: 12px; margin-left: auto; }
.intelligence-catalog-table-copy { display: grid; min-width: 0; gap: 2px; }
.intelligence-catalog-table-copy strong { overflow: hidden; color: #616041; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-catalog-note { margin: 9px 0 0; color: #949284; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-catalog-state { display: grid; justify-items: start; gap: 5px; padding: 17px 20px; color: #8e8b78; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-catalog-state > strong { color: #6e6c52; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-catalog-state > p { margin: 0; line-height: 1.5; }
.intelligence-catalog-state.is-warning { background: #fffdf8; }
.intelligence-catalog button:focus-visible, .intelligence-catalog a:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }
.intelligence-workspace #intelligenceList .contact-state > .contact-create-button { margin-top: 9px; }
.intelligence-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.intelligence-stat { display: grid; min-width: 0; gap: 5px; padding: 15px 17px; border: 1px solid #e2ebe7; border-radius: 12px; background: linear-gradient(145deg,#fff 0%,#fdfdfb 100%); box-shadow: 0 3px 12px rgba(54, 55, 11, .025); }
.intelligence-stat > span { color: #9c998a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .1em; }
.intelligence-stat > strong { overflow: hidden; color: #494a2a; font-size: calc(21px * var(--portal-text-scale)); font-weight: 760; letter-spacing: -.045em; text-overflow: ellipsis; }
.intelligence-stat > small { color: #959382; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.intelligence-stat-source > strong { display: flex; align-items: center; gap: 8px; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: -.02em; }
.intelligence-stat-source > strong svg { width: 17px; height: 17px; color: #666819; }
.intelligence-panel { overflow: hidden; border: 1px solid #dfe8e4; border-radius: 14px; background: #fff; box-shadow: 0 5px 17px rgba(54, 55, 11, .03); }
.intelligence-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 20px 16px; }
.intelligence-panel-head .eyebrow { margin-bottom: 6px; }
.intelligence-panel-head h2 { margin: 0; color: #3f4023; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.025em; }
.intelligence-panel-head p:not(.eyebrow) { margin: 6px 0 0; color: #918e7c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.intelligence-controls { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 13px; border-bottom: 1px solid #edf1ef; }
.intelligence-tabs { display: flex; min-width: 0; gap: 5px; }
.intelligence-tab { display: inline-flex; min-height: 35px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: #8a8672; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.intelligence-tab svg { width: 14px; height: 14px; }
.intelligence-tab small { min-width: 18px; padding: 2px 5px; border-radius: 99px; color: #949180; background: #f0f4f1; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: center; }
.intelligence-tab:hover { color: #555718; background: #fafaf6; }
.intelligence-tab.is-active { border-color: #e9e9d6; color: #5f6111; background: #f7f8ee; }
.intelligence-tab.is-active small { color: #5d5f19; background: #efefdd; }
.intelligence-search-wrap { display: flex; width: min(320px,45%); min-height: 34px; align-items: center; gap: 7px; padding: 0 7px 0 9px; border: 1px solid #e0e9e5; border-radius: 8px; background: #fbfcfb; }
.intelligence-search-wrap:focus-within { border-color: #c4c597; background: #fff; box-shadow: 0 0 0 3px rgba(104, 106, 25, .07); }
.intelligence-search-wrap > svg { width: 14px; height: 14px; flex: 0 0 auto; color: #989482; }
.intelligence-search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: #565736; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-search-wrap input::placeholder { color: #a9a69b; }
.intelligence-search-wrap .table-action { min-height: 25px; flex: 0 0 auto; padding: 0 7px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-panel > .contact-feedback { margin: 12px 20px 0; }
.intelligence-panel > #intelligenceList { min-height: 230px; }
.intelligence-record-list { display: grid; }
.intelligence-record { display: flex; min-width: 0; align-items: flex-start; gap: 14px; padding: 16px 20px; border-bottom: 1px solid #edf1ef; }
.intelligence-record:last-child { border-bottom: 0; }
.intelligence-record-main { min-width: 0; flex: 1; }
.intelligence-record-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.intelligence-record-kicker { color: #99958a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.intelligence-record h3 { margin: 4px 0 0; color: #474829; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.015em; }
.intelligence-status { display: inline-flex; min-height: 22px; flex: 0 0 auto; align-items: center; padding: 0 8px; border: 1px solid #e5e9e6; border-radius: 99px; color: #8a8779; background: #f7f8f6; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; white-space: nowrap; }
.intelligence-status.is-published { border-color: #e9e9d3; color: #5c5e28; background: #f8f8f1; }
.intelligence-record-copy { max-width: 930px; margin: 10px 0 0; color: #7b7760; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.intelligence-record-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 11px; color: #a09c93; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-edit { flex: 0 0 auto; }
.tournament-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 12px; }
.tournament-facts > span { display: grid; gap: 3px; }
.tournament-facts small { color: #a19d94; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: .09em; }
.tournament-facts strong { color: #676345; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.intelligence-limit-note { margin: 0; padding: 10px 20px; border-top: 1px solid #edf1ef; color: #99968a; background: #fcfcfa; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid #e8e9dd; border-radius: 11px; background: #f9f9f3; }
.intelligence-note > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid #e7e7d7; border-radius: 8px; color: #8b995c; background: #fff; }
.intelligence-note svg { width: 13px; height: 13px; }
.intelligence-note p { margin: 2px 0 0; color: #748178; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.intelligence-note p strong { color: #58684d; font-weight: 720; }
.intelligence-form-fields { display: grid; gap: 14px; padding-top: 18px; }
.intelligence-form-fields label { display: grid; gap: 6px; color: #5e5f3f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.intelligence-form-fields input:not([type=checkbox]), .intelligence-form-fields select, .intelligence-form-fields textarea { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #dce6e2; border-radius: 8px; color: #444526; background: #fff; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-form-fields input:focus, .intelligence-form-fields select:focus, .intelligence-form-fields textarea:focus { border-color: #bebf83; box-shadow: 0 0 0 3px rgba(105, 107, 23, .09); outline: 0; }
.intelligence-form-fields textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.intelligence-form-fields textarea[name=Regras] { min-height: 92px; }
.intelligence-form-fields input::placeholder, .intelligence-form-fields textarea::placeholder { color: #b2aea6; }
.intelligence-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.intelligence-publish { display: flex !important; align-items: flex-start; gap: 9px !important; padding: 11px; border: 1px solid #e6ece6; border-radius: 9px; background: #fbfbf8; }
.intelligence-publish input { width: 15px; height: 15px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #636511; }
.intelligence-publish > span { display: grid; gap: 4px; }
.intelligence-publish > span strong { color: #605c46; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-publish > span small { color: #959385; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.45; }
.intelligence-workspace button:focus-visible, .intelligence-form-fields input:focus-visible, .intelligence-form-fields select:focus-visible, .intelligence-form-fields textarea:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }

@media (max-width: 560px) {
  .intelligence-catalog-heading { align-items: flex-start; flex-direction: column; padding: 15px 14px 12px; }
  .intelligence-catalog-workspace { padding-inline: 12px; }
  .intelligence-catalog-document { padding: 9px; }
  .intelligence-catalog-document > header { align-items: flex-start; flex-direction: column; }
  .intelligence-catalog-open { min-height: 34px; }
  .intelligence-catalog-tables { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 760px) {
  .intelligence-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .intelligence-stat { padding: 12px 13px; }
  .intelligence-stat-source { grid-column: 1 / -1; }
  .intelligence-panel-head { align-items: flex-start; flex-direction: column; padding: 16px 14px 13px; }
  .intelligence-panel-head .contact-create-button { width: 100%; }
  .intelligence-controls { align-items: stretch; flex-direction: column; gap: 9px; padding: 0 14px 12px; }
  .intelligence-tabs { width: 100%; }
  .intelligence-tab { min-width: 0; flex: 1; justify-content: center; gap: 5px; padding-inline: 5px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-tab svg { display: none; }
  .intelligence-search-wrap { width: 100%; }
  .intelligence-record { gap: 9px; padding: 14px; }
  .intelligence-record h3 { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-record-top { gap: 8px; }
  .intelligence-record-meta { gap: 5px 10px; }
  .intelligence-edit { padding-inline: 7px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-limit-note { padding-inline: 14px; }
  .intelligence-form-fields { gap: 11px; padding-top: 14px; }
  .intelligence-form-grid { gap: 9px; }
}

@media (max-width: 420px) {
  .intelligence-tab { gap: 3px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-tab small { min-width: 15px; padding-inline: 4px; }
  .intelligence-record { flex-direction: column; }
  .intelligence-record-top { width: 100%; }
  .intelligence-edit { align-self: flex-end; }
  .tournament-facts { gap: 9px 14px; }
  .intelligence-form-grid { grid-template-columns: minmax(0,1fr); }
  .intelligence-form .contact-form-actions { position: sticky; bottom: -17px; padding: 12px 0 0; background: linear-gradient(transparent,#fff 25%); }
}

.campaigns-workspace { display: grid; gap: 12px; }
.campaign-workspace-toolbar { display: flex; min-height: 35px; align-items: center; justify-content: space-between; gap: 12px; }
.campaign-refresh-context { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.campaign-refresh-label { color: #949183; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .12em; }
.campaign-refresh-time { padding-left: 8px; border-left: 1px solid #dbe3df; color: #98948a; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-service-chip { display: inline-flex; min-height: 23px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #e2e8e4; border-radius: 99px; color: #8a8877; background: #fafbf9; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; white-space: nowrap; }
.campaign-service-chip i { width: 5px; height: 5px; border-radius: 50%; background: #c0c9c5; }
.campaign-service-chip.is-good { border-color: #e8e8d2; color: #60612d; background: #f9faf5; }
.campaign-service-chip.is-good i { background: #7d7f37; box-shadow: 0 0 0 3px #f3f4e7; }
.campaign-refresh-button { display: inline-flex; min-height: 33px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid #dce5e0; border-radius: 8px; color: #6e6c51; background: #fff; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.campaign-refresh-button:hover:not(:disabled) { border-color: #d8d9b1; color: #666806; background: #fff; }
.campaign-refresh-button:disabled { color: #949086; cursor: wait; }
.campaign-refresh-button svg { width: 13px; height: 13px; }
.campaign-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.campaign-metric { display: grid; min-width: 0; min-height: 99px; align-content: center; gap: 5px; padding: 13px 15px; border: 1px solid #e1e8e4; border-radius: 11px; background: #fff; box-shadow: 0 3px 10px rgba(51, 52, 14, .025); }
.campaign-metric > span { overflow: hidden; color: #949381; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.campaign-metric > strong { color: #38391a; font-size: calc(24px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.05em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.campaign-metric > small { color: #989689; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.campaign-metric.is-green > strong { color: #565718; }
.campaign-metric.is-gold > strong { color: #a47836; }
.campaign-metric.is-teal > strong { color: #616310; }
.campaigns-panels { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(255px,.85fr); align-items: start; gap: 12px; }
.campaign-panel { min-width: 0; overflow: hidden; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(51, 52, 14, .025); }
.campaign-panel-heading { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px 12px; border-bottom: 1px solid #edf1ee; }
.campaign-panel-heading .eyebrow { margin-bottom: 6px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-panel-heading h2 { margin: 0; color: #444426; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.02em; }
.campaign-panel-heading > div > p:last-child { margin: 5px 0 0; color: #949186; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.campaign-panel-link { display: inline-flex; min-height: 29px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid #e0e7e3; border-radius: 7px; color: #78745d; background: #fff; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; text-decoration: none; white-space: nowrap; }
.campaign-panel-link:hover { border-color: #d7d8af; color: #656706; }
.campaign-panel-link svg { width: 12px; height: 12px; }
.campaign-readonly-label, .campaign-access-label { color: #98958b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; letter-spacing: .08em; white-space: nowrap; }
.campaign-panel-content { min-height: 151px; }
.campaign-record-list { display: grid; }
.campaign-record-actions { display: grid; flex-shrink: 0; justify-items: end; gap: 9px; }
.campaign-open-button { display: flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: #52532b; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.campaign-open-button svg { width: 12px; height: 12px; }
.campaign-list-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 17px; border-bottom: 1px solid #edf1ee; }
.campaign-filter-tabs { display: flex; gap: 3px; }
.campaign-filter-tabs button { padding: 6px 9px; border: 0; border-radius: 6px; background: transparent; color: #89827b; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.campaign-filter-tabs button.is-active { color: #484921; background: #f3f3ec; font-weight: 700; }
.campaign-list-search { display: flex; align-items: center; gap: 6px; max-width: 190px; padding: 7px 9px; border: 1px solid #e5ece7; border-radius: 8px; }
.campaign-list-search svg { width: 13px; height: 13px; color: #91a29c; }
.campaign-list-search input { width: 100%; min-width: 0; border: 0; outline: 0; font: inherit; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); background: transparent; }
.campaign-empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 13px; border-radius: 12px; background: #f5f1e6; color: #9e8954; }
.campaign-empty-icon svg { width: 20px; height: 20px; }
.campaign-empty .contact-create-button { margin: 15px auto 0; }
.campaign-editor { width: min(940px, calc(100vw - 36px)); max-height: calc(100dvh - 36px); padding: 0; border: 1px solid #d9e4dd; border-radius: 18px; color: #464728; box-shadow: 0 30px 100px #34351a40; }
.campaign-editor::backdrop { background: #2f2f1670; backdrop-filter: blur(3px); }
.campaign-editor-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px 25px 18px; border-bottom: 1px solid #e9eeea; }
.campaign-editor-head h2 { margin: 4px 0 5px; font-size: calc(22px * var(--portal-text-scale)); letter-spacing: -.035em; }
.campaign-editor-head p:not(.eyebrow) { margin: 0; color: #7c8b85; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.campaign-editor-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 26px; padding: 24px 25px; background: #fdfdfb; }
.campaign-editor-fields { display: grid; gap: 14px; }
.campaign-editor-fields label { display: grid; gap: 7px; color: #52675f; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.campaign-editor-fields input, .campaign-editor-fields select, .campaign-editor-fields textarea { width: 100%; padding: 10px 11px; box-sizing: border-box; border: 1px solid #dce6dd; border-radius: 8px; background: #fff; color: #414127; font: inherit; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 400; }
.campaign-editor-fields textarea { min-height: 200px; resize: vertical; line-height: 1.65; }
.campaign-editor-fields :is(input,textarea,select):focus { outline: 2px solid #9d9e5b50; border-color: #9b9c6a; }
.campaign-editor-helper { margin: -4px 0 0; color: #8a978f; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.campaign-email-preview { min-width: 0; align-self: start; padding: 18px; border: 1px solid #e4e9df; border-radius: 12px; background: #f6f6f0; }
.campaign-preview-label { display: block; margin-bottom: 16px; color: #94a28b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: .1em; }
.campaign-preview-envelope { display: grid; gap: 5px; padding: 15px 17px; border-radius: 9px 9px 0 0; border: 1px solid #e6e7db; background: #fff; }
.campaign-preview-envelope > span { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); color: #92a08b; }
.campaign-preview-envelope strong { font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); overflow-wrap: anywhere; }
.campaign-preview-body { min-height: 220px; max-height: 350px; overflow: auto; padding: 20px 17px; border: 1px solid #e6e7db; border-top: 0; border-radius: 0 0 9px 9px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.8; }
.campaign-preview-footer { padding-top: 13px; color: #8d9b85; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.campaign-editor-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 17px 25px; border-top: 1px solid #e6ece4; }
.campaign-editor-foot > span { display: flex; gap: 6px; align-items: center; color: #8d998b; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-editor-foot svg { width: 14px; height: 14px; }
.campaign-editor-foot > div { display: flex; gap: 9px; }
.campaign-editor-feedback { padding: 12px 25px; background: #fff4ee; color: #ac6248; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-editor-feedback.is-success { color: #666734; background: #f7f7eb; }
.campaign-lifecycle { display: grid; gap: 14px; margin: 0 25px 19px; padding: 16px 18px; border: 1px solid #e8e9dd; border-radius: 12px; background: linear-gradient(145deg,#fafaf4,#f6f6f0); }
.campaign-lifecycle[hidden] { display: none; }
.campaign-lifecycle-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.campaign-lifecycle-heading > div:first-child { display: grid; gap: 5px; }
.campaign-lifecycle-heading > div:first-child .campaign-preview-label { margin: 0; }
.campaign-lifecycle-heading > div:first-child strong { color: #4c4d2a; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-lifecycle-audience { display: grid; gap: 3px; text-align: right; }
.campaign-lifecycle-audience > span { color: #89978e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .08em; }
.campaign-lifecycle-audience > strong { color: #50512d; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-lifecycle-audience > small { color: #84928d; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-lifecycle-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.campaign-lifecycle-actions button, .campaign-schedule-field input { min-height: 37px; padding: 0 12px; border: 1px solid #d7e2d7; border-radius: 8px; color: #555633; background: #fff; font: inherit; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.campaign-lifecycle-actions button:disabled, .campaign-schedule-field input:disabled { opacity: .55; cursor: not-allowed; }
.campaign-lifecycle-actions .campaign-action-primary { border-color: #494a21; color: #fff; background: #494a21; }
.campaign-lifecycle-actions .campaign-action-primary:hover:not(:disabled) { background: #3d3e1b; }
.campaign-lifecycle-actions .campaign-action-secondary:hover:not(:disabled) { border-color: #9ab6a0; background: #fafaf6; }
.campaign-lifecycle-actions .campaign-action-danger { border-color: #eddad4; color: #995d50; background: #fffaf8; }
.campaign-schedule-field { display: grid; gap: 5px; color: #83908b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.campaign-schedule-field input { min-width: 205px; color: #625545; font-weight: 450; }
.campaign-lifecycle-empty { margin: 0; color: #7c8d85; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.campaign-action-feedback { padding: 10px 12px; border-radius: 8px; color: #9a5d4c; background: #fff1e9; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.campaign-action-feedback.is-success { color: #666734; background: #f4f5e7; }
@media (max-width: 760px) {
  .campaign-editor { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 13px; }
  .campaign-editor-head, .campaign-editor-grid, .campaign-editor-foot { padding: 17px; }
  .campaign-lifecycle { margin: 0 17px 17px; padding: 13px; }
  .campaign-editor-grid { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .campaign-editor-head h2 { font-size: calc(20px * var(--portal-text-scale)); }
  .campaign-editor-foot { flex-wrap: wrap; }
  .campaign-editor-foot > div { margin-left: auto; }
  .campaign-list-search { max-width: none; flex: 1; }
}
.campaign-record { padding: 14px 17px 12px; border-bottom: 1px solid #edf1ee; }
.campaign-record:last-child { border-bottom: 0; }
.campaign-record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.campaign-record-heading > div { min-width: 0; }
.campaign-record-kicker { display: block; margin-bottom: 5px; overflow: hidden; color: #9b895f; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: .09em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.campaign-record h3 { margin: 0; overflow-wrap: anywhere; color: #464728; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; letter-spacing: -.015em; }
.campaign-record-heading p { margin: 4px 0 0; overflow-wrap: anywhere; color: #8d8b7d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.campaign-status { display: inline-flex; min-height: 21px; flex: 0 0 auto; align-items: center; padding: 0 8px; border: 1px solid #e4e9e5; border-radius: 99px; color: #8e8c7f; background: #f8f9f7; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; white-space: nowrap; }
.campaign-status.is-good { border-color: #e8e9d4; color: #5c5d29; background: #f8f8f1; }
.campaign-status.is-live { border-color: #e6e6c7; color: #595b12; background: #f9f9ee; }
.campaign-record-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f3f0; }
.campaign-record-metrics > span { display: grid; min-width: 0; gap: 4px; }
.campaign-record-metrics small { overflow: hidden; color: #a39f98; font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.campaign-record-metrics strong { overflow: hidden; color: #706d53; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.campaign-audience-list { display: grid; padding: 2px 15px; }
.campaign-audience-toolbar { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #edf1ee; background: #fefefb; }
.campaign-audience-toolbar .campaign-list-search { width: min(340px,50%); min-height: 35px; }
.campaign-audience-state-filter { display: inline-flex; align-items: center; gap: 7px; color: #85938e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-audience-state-filter select { min-height: 33px; padding: 0 25px 0 9px; border: 1px solid #e1e9e3; border-radius: 7px; color: #526c65; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-audience-summary { margin-left: auto; color: #8b9993; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.campaign-audience-row { display: flex; width: 100%; min-width: 0; min-height: 57px; align-items: center; gap: 9px; padding: 0; border: 0; border-bottom: 1px solid #eef2ef; background: transparent; text-align: left; cursor: pointer; }
.campaign-audience-row:last-child { border-bottom: 0; }
.campaign-audience-row:hover, .campaign-audience-row.is-selected { background: #fafaf6; }
.campaign-audience-mark { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border: 1px solid #e3ebe6; border-radius: 8px; color: #96897a; background: #fafaf7; }
.campaign-audience-mark svg { width: 13px; height: 13px; }
.campaign-audience-name { display: grid; min-width: 0; flex: 1; gap: 4px; }
.campaign-audience-name strong { overflow: hidden; color: #5e5f3f; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.campaign-audience-name small { color: #9f9c92; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-audience-row.is-archived .campaign-audience-name strong, .campaign-audience-row.is-archived .campaign-audience-name small { color: #899491; }
.campaign-audience-count { display: grid; flex: 0 0 auto; gap: 3px; color: #53542e; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; text-align: right; font-variant-numeric: tabular-nums; }
.campaign-audience-count small { color: #a5a09a; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 560; }
.campaign-audience-chevron { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; color: #9aaba4; }
.campaign-audience-chevron svg { width: 12px; height: 12px; }
.campaign-footnote { margin: 0; padding: 0 15px 13px; color: #a49f99; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.campaign-subscriber-panel { min-width: 0; overflow: hidden; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; box-shadow: 0 5px 18px rgba(51, 52, 14, .025); }
.campaign-subscriber-toolbar { display: flex; min-height: 55px; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #edf1ee; }
.campaign-subscriber-toolbar .campaign-list-search { max-width: 320px; flex: 1; }
.campaign-subscriber-filter { display: flex; align-items: center; gap: 7px; color: #84918d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-subscriber-filter select { min-height: 31px; padding: 0 26px 0 9px; border: 1px solid #e3eae5; border-radius: 7px; color: #6a6254; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-subscriber-total { margin-left: auto; color: #84918d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.campaign-subscriber-table { display: grid; }
.campaign-subscriber-head, .campaign-subscriber-row { display: grid; grid-template-columns: minmax(190px,1fr) minmax(180px,.72fr) minmax(120px,.45fr) minmax(62px,auto); align-items: center; gap: 14px; padding: 10px 17px; }
.campaign-subscriber-head { min-height: 33px; border-bottom: 1px solid #edf1ee; color: #96a19e; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .08em; }
.campaign-subscriber-row { min-height: 57px; border-bottom: 1px solid #f0f3f0; color: #776e64; }
.campaign-subscriber-row:last-child { border-bottom: 0; }
.campaign-subscriber-person { display: grid; min-width: 0; gap: 4px; }
.campaign-subscriber-person strong { overflow: hidden; color: #5b5540; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.campaign-subscriber-person small { overflow: hidden; color: #938d85; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.audience-channel-dot { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #7e803d; vertical-align: middle; }
.audience-channel-dot.is-whatsapp { background: #6a6c1f; }
.audience-channel-dot.is-muted { background: #c88d69; }
.campaign-subscriber-status { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 5px; flex-wrap: wrap; padding: 5px 8px; border: 1px solid #e9e8dd; border-radius: 99px; color: #8c7958; background: #fbf8ef; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; line-height: 1.35; }
.campaign-subscriber-status.is-confirmed { border-color: #e8e9d5; color: #60622f; background: #f8f8f1; }
.campaign-subscriber-status.is-unsubscribed { border-color: #eee0dc; color: #9c6457; background: #fcf5f2; }
.campaign-subscriber-row time { color: #938d85; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-subscriber-pagination { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 15px; border-top: 1px solid #edf1ee; color: #938d85; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-subscriber-pagination > div { display: flex; gap: 6px; }
.campaign-subscriber-pagination button { min-height: 29px; padding: 0 9px; border: 1px solid #e0e7e3; border-radius: 7px; color: #78745d; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.campaign-subscriber-pagination button:disabled { opacity: .5; cursor: default; }
.campaign-subscriber-loading { min-height: 130px; border: 0; border-radius: 0; box-shadow: none; }
.campaign-empty { display: grid; min-height: 150px; align-content: center; justify-items: center; gap: 6px; padding: 22px; text-align: center; }
.campaign-empty strong { color: #6e6a53; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.campaign-empty p { max-width: 310px; margin: 0; color: #a09c94; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.campaign-state-box { display: flex; min-height: 132px; align-items: center; gap: 10px; padding: 17px; }
.campaign-state-box.is-warning { background: #fffdfa; }
.campaign-state-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid #e7ece7; border-radius: 9px; color: #8a9b94; background: #fafaf7; }
.campaign-state-box.is-warning .campaign-state-icon { border-color: #f0e3c9; color: #ac8145; background: #fcf8ee; }
.campaign-state-icon svg { width: 14px; height: 14px; }
.campaign-state-box > div { display: grid; gap: 5px; }
.campaign-state-box strong { color: #67654d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.campaign-state-box p { margin: 0; color: #98948b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.campaign-notice-stack { display: grid; gap: 8px; }
.campaign-state-box.is-compact { min-height: 0; padding: 10px 12px; }
.campaign-state-box.is-compact .campaign-state-icon { width: 24px; height: 24px; border-radius: 7px; }
.campaign-state-box.is-compact > div { gap: 3px; }
.campaign-connection-notice { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border: 1px solid #e8e8dc; border-radius: 10px; color: #748177; background: #fbfbf5; }
.campaign-connection-notice > svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: #9b9b69; }
.campaign-connection-notice > div { display: grid; gap: 5px; }
.campaign-connection-notice p { margin: 0; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.campaign-send-readiness { border-color: #efe4c8; color: #806a39; background: #fdfaf2; }
.campaign-send-readiness > svg { color: #a4843e; }
.campaign-send-readiness p strong { color: #6f592d; font-weight: 730; }
.campaign-refresh-warning { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid #eee4cf; border-radius: 9px; color: #89764f; background: #fdfaf3; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.campaign-refresh-warning svg { width: 13px; height: 13px; flex: 0 0 auto; }
.campaign-loading { display: flex; min-height: 180px; align-items: center; justify-content: center; gap: 12px; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; }
.campaign-loading > div { display: grid; gap: 5px; }
.campaign-loading strong { color: #69664c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.campaign-loading p { margin: 0; color: #9b988e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaigns-workspace button:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }

.automation-workspace { display: grid; gap: 10px; margin-bottom: 13px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg,#fff,#fbfbf8); }
.automation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.automation-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.automation-metric { display: grid; min-width: 0; min-height: 91px; align-content: center; gap: 5px; padding: 12px 14px; border: 1px solid #e4eae5; border-radius: 10px; background: #fff; }
.automation-metric > span { overflow: hidden; color: #949381; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .07em; text-overflow: ellipsis; white-space: nowrap; }
.automation-metric > strong { color: #3a3b1c; font-size: calc(25px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.automation-metric > small { color: #969289; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-state { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid #e9e9df; border-radius: 9px; background: #fbfbf6; }
.automation-state > .status-light { margin: 4px 1px 0 0; }
.automation-state p { display: grid; gap: 3px; margin: 0; }
.automation-state strong { color: #58665c; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.automation-state span:not(.status-light) { color: #85918a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.automation-state.is-live { border-color: #e9e9d8; background: #f9faf5; }
.automation-state.is-live strong { color: #656635; }
@media (max-width: 760px) {
  .automation-workspace { gap: 8px; padding: 12px; }
  .automation-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .automation-metric { min-height: 82px; padding: 9px; }
  .automation-metric > span { font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: .04em; }
  .automation-metric > strong { font-size: calc(22px * var(--portal-text-scale)); }
  .automation-metric > small { font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-state { padding: 9px; }
}

@media (max-width: 980px) {
  .campaign-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .campaigns-panels { grid-template-columns: minmax(0,1fr); }
}

@media (max-width: 760px) {
  .campaigns-workspace { gap: 10px; }
  .campaign-workspace-toolbar { align-items: flex-start; }
  .campaign-refresh-context { gap: 6px; }
  .campaign-refresh-time { border: 0; padding-left: 0; }
  .campaign-refresh-button { min-height: 30px; padding-inline: 8px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .campaign-refresh-button svg { width: 12px; height: 12px; }
  .campaign-summary-grid { gap: 7px; }
  .campaign-metric { min-height: 87px; padding: 10px 11px; border-radius: 9px; }
  .campaign-metric > strong { font-size: calc(21px * var(--portal-text-scale)); }
  .campaign-metric > small { font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .campaign-panel-heading { min-height: 74px; padding: 12px 13px 11px; }
  .campaign-record { padding: 12px 13px 10px; }
  .campaign-audience-list { padding-inline: 12px; }
  .campaign-subscriber-toolbar { align-items: stretch; flex-wrap: wrap; padding: 10px 13px; }
  .campaign-subscriber-toolbar .campaign-list-search { max-width: none; flex-basis: 100%; }
  .campaign-subscriber-total { margin: 0 0 0 auto; align-self: center; }
  .campaign-subscriber-head, .campaign-subscriber-row { grid-template-columns: minmax(0,1fr) minmax(110px,.65fr); gap: 9px; padding-inline: 13px; }
  .campaign-subscriber-head > :last-child { display: none; }
  .campaign-subscriber-row time { grid-column: 1 / -1; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
}

/* Automation builder and operations cards */
.automation-dashboard { display: grid; gap: 13px; margin-bottom: 14px; }
.automation-summary-grid { gap: 10px; }
.automation-metric { min-height: 102px; gap: 8px; padding: 15px 16px; border-color: #dfe8e5; border-radius: 14px; box-shadow: 0 3px 12px rgba(41, 42, 14, .025); }
.automation-metric > span { color: #8e8b7a; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: .1em; }
.automation-metric > strong { color: #383713; font-size: calc(29px * var(--portal-text-scale)); }
.automation-metric > small { color: #9a9689; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-integrations { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 3px 1px; }
.automation-integrations > span { display: inline-flex; min-height: 29px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #e1e9e5; border-radius: 99px; color: #787560; background: rgba(255, 255, 255,.82); font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; }
.automation-integrations i { width: 7px; height: 7px; border-radius: 50%; background: #c9c4c0; box-shadow: 0 0 0 3px #eef2ef; }
.automation-integrations i.is-ready { background: #6f711c; box-shadow: 0 0 0 3px #f2f2e1; }
.automation-integrations .is-muted { color: #97948c; background: #f1f3f0; }
.automation-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid #e7e8db; border-radius: 12px; color: #565734; background: #fafaf3; }
.automation-notice > div { display: grid; min-width: 0; gap: 3px; }
.automation-notice strong { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-notice p { margin: 0; color: #877c70; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.automation-notice code { display: block; max-width: 100%; overflow-wrap: anywhere; margin-top: 6px; padding: 8px 9px; border-radius: 7px; color: #655b4c; background: #eff0e7; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-notice button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #e3e4d5; border-radius: 8px; color: #655647; background: #fff; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.automation-notice.is-error { border-color: #f0d9d4; color: #8a4e43; background: #fdf5f2; }
.automation-notice.is-error p { color: #966c64; }
.automation-notice.is-good { border-color: #e6e7d3; }
.automation-workspace { gap: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid #dfe7e3; border-radius: 16px; background: #fff; box-shadow: 0 8px 28px rgba(45, 46, 16, .035); }
.automation-workspace-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 21px 23px 19px; }
.automation-workspace-heading .eyebrow { margin: 0 0 6px; color: #979385; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .14em; }
.automation-workspace-heading h2 { margin: 0; color: #3c3d1b; font-size: calc(19px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.automation-workspace-heading p:not(.eyebrow) { max-width: 600px; margin: 6px 0 0; color: #949282; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.automation-primary-action { display: inline-flex; min-height: 40px; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid #38390f; border-radius: 9px; color: #fbfbf5; background: #38390f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; cursor: pointer; box-shadow: 0 4px 10px rgba(52, 53, 11, .12); }
.automation-primary-action:hover { background: #484a15; }
.automation-primary-action svg { width: 15px; height: 15px; }
.automation-view-only { padding: 8px 10px; border: 1px solid #e4eae6; border-radius: 8px; color: #8e8a7d; background: #f7f8f5; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-tab-content { min-height: 210px; padding: 18px; }
.automation-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: stretch; }
.automation-card { display: flex; min-width: 0; flex-direction: column; gap: 13px; padding: 17px; border: 1px solid #e1e9e4; border-radius: 13px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.automation-card:hover { transform: translateY(-1px); border-color: #dbdbc7; box-shadow: 0 9px 24px rgba(56, 56, 20, .07); }
.automation-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.automation-card-mark, .automation-create-mark { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid #eaeadb; border-radius: 10px; color: #5f6118; background: #f8f8f1; }
.automation-card-mark svg { width: 16px; height: 16px; }
.automation-card-status { padding: 5px 9px; border: 1px solid #ebe7d9; border-radius: 99px; color: #8b7546; background: #fcf8ed; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; }
.automation-card-status.is-active { border-color: #e9e9d6; color: #686a36; background: #f8f8f0; }
.automation-card-status.is-paused { border-color: #e4e7e1; color: #6e7d79; background: #f5f6f3; }
.automation-card-main .eyebrow { margin: 0 0 5px; color: #989583; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: .11em; }
.automation-card-main h3, .automation-module-card h3 { margin: 0; color: #40411e; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; letter-spacing: -.02em; line-height: 1.35; }
.automation-card-main > p:not(.eyebrow), .automation-module-card > p { margin: 6px 0 0; color: #8f8c7c; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.automation-card-logic { display: grid; gap: 8px; padding: 11px 12px; border: 1px solid #edf1ed; border-radius: 9px; background: #fafaf7; }
.automation-card-logic > span { display: grid; min-width: 0; gap: 4px; }
.automation-card-logic small { color: #99a5a0; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: .11em; }
.automation-card-logic strong { overflow-wrap: anywhere; color: #706b55; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; line-height: 1.45; }
.automation-card-logic strong b { color: #787a0d; font-weight: 740; }
.automation-card-outcomes { display: grid; gap: 5px; color: #928f81; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.automation-progress { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: #76705b; background: #f7f7ec; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-progress strong { color: #5c5e1b; font-variant-numeric: tabular-nums; }
.automation-card-error { margin: 0; padding: 8px 10px; border-radius: 7px; color: #945c51; background: #fcf1ed; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.automation-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 2px; }
.automation-card-actions button, .automation-empty button, .automation-module-action { min-height: 31px; padding: 0 9px; border: 1px solid #dfe8e3; border-radius: 7px; color: #746f58; background: #fff; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.automation-card-actions button:hover, .automation-empty button:hover, .automation-module-action:hover { border-color: #d4d5b6; color: #555611; background: #fafbf6; }
.automation-card-actions button.is-primary { border-color: #575813; color: #fff; background: #575813; }
.automation-card-actions button.is-danger { margin-left: auto; color: #a2685e; }
.automation-create-card { position: relative; display: grid; min-height: 240px; align-content: center; justify-items: center; gap: 13px; padding: 19px; border: 1px dashed #c5c693; border-radius: 13px; color: inherit; background: linear-gradient(145deg,#fbfbf5,#fafaf2); text-align: center; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.automation-create-card:hover { transform: translateY(-1px); border-color: #737527; background: linear-gradient(145deg,#fafaee,#fafaee); }
.automation-create-mark { width: 38px; height: 38px; flex: 0 0 auto; border-color: #e6e6cd; color: #585a11; background: #f4f4e6; }
.automation-create-mark svg { width: 18px; height: 18px; }
.automation-create-card > .automation-create-copy { display: grid; justify-items: center; gap: 8px; }
.automation-create-card small { color: #928169; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: .13em; }
.automation-create-card strong { color: #444619; font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.automation-create-card em { max-width: 250px; color: #928c7d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; line-height: 1.6; }
.automation-create-arrow { display: inline-flex; align-items: center; margin-left: 4px; color: #a5a66d; vertical-align: middle; }
.automation-create-arrow svg { width: 16px; height: 16px; }
.automation-module-card { display: flex; min-height: 220px; flex-direction: column; align-items: flex-start; gap: 11px; padding: 18px; border: 1px solid #dfe9e3; border-radius: 13px; background: linear-gradient(150deg,#fff,#fafaf6); }
.automation-library-section { display: grid; gap: 12px; margin-bottom: 24px; }
.automation-library-section > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 2px 1px; }
.automation-library-section > header > div { display: grid; gap: 3px; }
.automation-library-section .eyebrow { margin: 0; color: #978e84; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .12em; }
.automation-library-section > header h3 { margin: 0; color: #4c4d28; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: -.02em; }
.automation-library-section > header p:not(.eyebrow) { margin: 0; color: #908a83; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.automation-library-section > header > span { display: grid; min-width: 27px; height: 27px; place-items: center; padding: 0 7px; border: 1px solid #e0eae4; border-radius: 99px; color: #6f7146; background: #f7f8f3; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.automation-library-section.is-staged { margin-top: 9px; padding-top: 18px; border-top: 1px solid #e8eeea; }
.automation-library-section.is-staged > header h3 { color: #787463; }
.automation-module-card.is-unavailable { border-style: dashed; background: linear-gradient(150deg,#fcfcf9,#f5f6f1); }
.automation-module-badge { padding: 5px 8px; border: 1px solid #e8e8d7; border-radius: 99px; color: #6c6d37; background: #f8f8f0; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: .06em; }
.automation-module-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.automation-module-summary span { padding: 5px 7px; border: 1px solid #e9eeea; border-radius: 6px; color: #868074; background: #fff; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-module-setup { margin: -3px 0 0; padding-left: 8px; border-left: 2px solid #d7d7ba; color: #857d72; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.automation-module-action { display: inline-flex; width: 100%; min-height: 36px; align-items: center; justify-content: space-between; margin-top: 2px; padding: 0 10px; }
.automation-module-action svg { width: 14px; height: 14px; }
.automation-module-permission { margin-top: auto; color: #8b9691; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-empty { display: grid; min-height: 165px; align-content: center; justify-items: center; gap: 8px; padding: 24px; border: 1px dashed #dce6e0; border-radius: 12px; background: #fcfcf9; text-align: center; }
.automation-empty strong { color: #5d5f3a; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-empty p { max-width: 390px; margin: 0; color: #949183; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.automation-empty button { margin-top: 3px; }
.automation-run-list { display: grid; gap: 8px; }
.automation-run-row { display: grid; grid-template-columns: 32px minmax(150px,1fr) auto; gap: 9px 11px; align-items: center; padding: 12px 14px; border: 1px solid #e4ebe6; border-radius: 10px; background: #fff; }
.automation-run-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #606227; background: #f7f7ec; }
.automation-run-icon.has-issues { color: #a56e3c; background: #fbf4e8; }
.automation-run-icon svg { width: 15px; height: 15px; }
.automation-run-ident { display: grid; gap: 4px; min-width: 0; }
.automation-run-ident strong { overflow: hidden; color: #545532; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.automation-run-ident span, .automation-run-counts { color: #969387; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-run-status { padding: 5px 8px; border-radius: 99px; color: #547d69; background: #f7f7f0; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.automation-run-counts { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.automation-run-events { grid-column: 2 / -1; padding-top: 8px; border-top: 1px solid #edf1ed; color: #7b7660; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-run-events summary { width: fit-content; cursor: pointer; }
.automation-run-events > div { display: grid; grid-template-columns: 130px minmax(100px,.6fr) 1fr; gap: 10px; padding-top: 8px; }
.automation-run-events time, .automation-run-events span { color: #99938b; }
.automation-dashboard button:focus-visible, .automation-editor-dialog button:focus-visible { outline: 3px solid rgba(114, 117, 0, .28); outline-offset: 2px; }
.automation-editor-dialog { width: min(1200px,calc(100vw - 28px)); max-width: none; height: min(920px,calc(100vh - 24px)); max-height: min(920px,calc(100vh - 24px)); overflow: hidden; padding: 0; border: 1px solid #dce7e2; border-radius: 20px; color: #34341a; background: #fafaf7; box-shadow: 0 30px 100px rgba(28, 29, 3,.34); }
.automation-editor-dialog::backdrop { background: rgba(26, 25, 5,.62); backdrop-filter: blur(5px); }
.automation-editor-dialog form { display: flex; height: 100%; max-height: 100%; flex-direction: column; }
.automation-editor-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 30px 20px; border-bottom: 1px solid #e0e9e4; background: linear-gradient(110deg,#fff,#f9faf5); }
.automation-editor-head .eyebrow { margin: 0 0 7px; color: #648c80; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .14em; }
.automation-editor-head h2 { margin: 0; color: #3c3d1a; font-size: calc(27px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.04em; }
.automation-editor-head p:not(.eyebrow) { max-width: 720px; margin: 8px 0 0; color: #837d6e; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.automation-editor-head > button { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border: 1px solid #e4ebe6; border-radius: 9px; color: #84806d; background: #fff; font-size: calc(19px * var(--portal-text-scale)); cursor: pointer; }
.automation-editor-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 22px 28px; }
.automation-editor-main { display: grid; gap: 16px; }
.automation-builder-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: stretch; }
.automation-builder-grid > .automation-builder-section:first-child { grid-column: auto; }
.automation-flow-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(235px,.78fr); gap: 14px; align-items: start; }
.automation-builder-grid > .automation-builder-section, .automation-flow-section { display: grid; align-content: start; gap: 12px; }
.automation-trigger-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.automation-trigger-start, .automation-trigger-event, .automation-trigger-kind { grid-column: 1 / -1; }
.automation-trigger-frequency, .automation-trigger-interval, .automation-trigger-calendar { grid-column: auto; }
.automation-trigger-calendar-wide { grid-column: 1 / -1; }
.automation-audience-input { display: flex; width: 100%; min-width: 0; align-items: center; gap: 8px; }
.automation-audience-input input { flex: 1; }
.automation-audience-input small { flex: 0 0 auto; color: #898074; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 560; white-space: nowrap; }
.automation-builder-section { min-width: 0; padding: 18px; border: 1px solid #dfe9e3; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(44, 45, 22, .03); }
.automation-flow-section { width: 100%; justify-self: stretch; }
.automation-builder-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 3px; }
.automation-builder-heading > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #eaead7; border-radius: 9px; color: #54561a; background: #f5f6e9; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; }
.automation-builder-heading h3 { margin: 1px 0 0; color: #51522c; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; letter-spacing: -.015em; }
.automation-builder-heading p { margin: 4px 0 0; color: #898276; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.automation-editor-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; align-items: end; }
.automation-editor-fields label, .automation-step-fields label { display: grid; min-width: 0; gap: 6px; color: #706b52; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; line-height: 1.35; }
.automation-editor-fields input, .automation-editor-fields select, .automation-step-fields input, .automation-step-fields select, .automation-step-fields textarea { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #d7e3dc; border-radius: 9px; color: #494a2d; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-editor-fields textarea, .automation-step-fields textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.automation-editor-fields input:focus, .automation-editor-fields select:focus, .automation-step-fields input:focus, .automation-step-fields select:focus, .automation-step-fields textarea:focus { outline: 3px solid rgba(125, 128, 0, .14); border-color: #a3a450; }
.automation-editor-fields label:first-child:nth-last-child(1), .automation-editor-fields label.automation-step-wide { grid-column: 1 / -1; }
.automation-editor-fields > p { align-self: center; margin: 0; padding: 10px 11px; border: 1px solid #e6ede8; border-radius: 9px; color: #857c71; background: #fafaf7; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.automation-helper-wide { grid-column: 1 / -1; }
.automation-selected-contact-summary { grid-column: 1 / -1; color: #7c7060; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.automation-selected-contact-list { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 7px; }
.automation-selected-contact-list > span { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 9px; padding: 7px 8px 7px 10px; border: 1px solid #dce8e0; border-radius: 9px; background: #f7faf8; }
.automation-selected-contact-list strong { overflow: hidden; color: #5d553d; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.automation-selected-contact-list small { overflow: hidden; color: #7a8d87; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.automation-selected-contact-list button { grid-column: 2; grid-row: 1 / span 2; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #e3eae5; border-radius: 7px; color: #8c615b; background: #fff; font-size: 15px; cursor: pointer; }
.automation-contact-picker-search { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; }
.automation-contact-picker-search > label { display: grid; min-width: 0; gap: 6px; color: #706b52; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.automation-contact-picker-search > button, .automation-contact-picker-pagination button { min-height: 40px; padding: 0 12px; border: 1px solid #d7e3dc; border-radius: 8px; color: #6a5f48; background: #fff; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.automation-contact-picker-results { grid-column: 1 / -1; max-height: 250px; overflow: auto; border: 1px solid #e2ebe5; border-radius: 9px; background: #fff; }
.automation-contact-picker-state { padding: 13px; color: #788a85; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-contact-option { display: flex !important; min-height: 53px; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px !important; padding: 8px 10px; border-bottom: 1px solid #eef2ef; cursor: pointer; }
.automation-contact-option:last-child { border-bottom: 0; }
.automation-contact-option.is-selected { background: #f0f7f3; }
.automation-contact-option input[type="checkbox"] { width: 17px; min-width: 17px; min-height: 17px; margin: 0; accent-color: #5a401d; }
.automation-contact-option > span { display: grid; min-width: 0; gap: 2px; }
.automation-contact-option strong { overflow: hidden; color: #585438; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.automation-contact-option small, .automation-contact-option em { overflow: hidden; color: #7a8d87; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; font-weight: 470; text-overflow: ellipsis; white-space: nowrap; }
.automation-contact-picker-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid #eef2ef; color: #867b72; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-contact-picker-pagination > div { display: flex; gap: 5px; }
.automation-contact-picker-pagination button { min-height: 30px; padding: 0 9px; }
.automation-contact-picker-pagination button:disabled, .automation-contact-picker-search button:disabled { opacity: .5; cursor: default; }
.automation-step-list { display: grid; gap: 10px; }
.automation-empty-step { padding: 24px 18px; border: 1px dashed #e1e2d3; border-radius: 11px; color: #897e72; background: #fafaf7; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: center; }
.automation-step { overflow: hidden; border: 1px solid #dfe9e3; border-radius: 11px; background: #fff; }
.automation-step > header { display: flex; min-height: 46px; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 11px; border-bottom: 1px solid #e9f0eb; background: #fafaf7; }
.automation-step-type { display: inline-flex; align-items: center; gap: 8px; color: #62633c; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-step-type svg { width: 16px; height: 16px; color: #626425; }
.automation-step-controls { display: flex; align-items: center; gap: 5px; }
.automation-step-controls > span { margin-right: 4px; color: #82938e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: .07em; }
.automation-step-controls button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid #e0e9e3; border-radius: 8px; color: #7c7160; background: #fff; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.automation-step-controls button:disabled { opacity: .4; cursor: default; }
.automation-step-controls button:last-child { color: #9c6258; }
.automation-step-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; padding: 14px; }
.automation-step-fields small { color: #857c71; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.5; }
.automation-step-wide { grid-column: 1 / -1; }
.automation-message-field { display: grid; min-width: 0; gap: 7px; }
.automation-message-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.automation-message-heading > label { display: block; }
.automation-message-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.automation-message-tools > small { flex: 1 1 100%; }
.automation-message-tools .sms-character-count { flex: 0 0 auto; }
.automation-sms-rules { flex: 1 1 240px !important; }
.automation-add-step { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; }
.automation-add-step > span { width: 100%; margin-bottom: 2px; color: #7c7060; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.automation-add-step button { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid #dfe9e3; border-radius: 8px; color: #6e634f; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.automation-add-step button svg { width: 14px; height: 14px; }
.automation-add-step button:disabled { color: #9ba5a1; background: #f3f5f1; cursor: not-allowed; }
.automation-editor-aside { position: sticky; top: 0; align-self: start; display: grid; gap: 11px; }
.automation-review-card { display: grid; gap: 9px; padding: 17px; border: 1px solid #e8e9dc; border-radius: 13px; background: #f9f9f2; }
.automation-review-card .eyebrow { margin: 0; color: #678b7e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .12em; }
.automation-review-card > strong { color: #444518; font-size: calc(38px * var(--portal-text-scale)); font-variant-numeric: tabular-nums; line-height: 1; }
.automation-review-card > span, .automation-review-card small { color: #85796d; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.automation-review-card > button { min-height: 40px; margin-top: 3px; border: 1px solid #dcddc6; border-radius: 9px; color: #595a2e; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.automation-review-card.is-secondary { background: #fff; }
.automation-readiness-row { display: flex; justify-content: space-between; gap: 7px; padding: 7px 0; border-bottom: 1px solid #edf1ec; color: #857c6f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-readiness-row strong { color: #65663d; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-readiness-row strong.is-muted { color: #97948c; font-weight: 620; }
.automation-review-foot { margin: 2px 0 0; color: #81928c; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.automation-editor-error { margin: 0 24px 12px; padding: 11px 13px; border: 1px solid #f0d9d3; border-radius: 9px; color: #94564c; background: #fcf3ef; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-editor-error[hidden] { display: none; }
.automation-editor-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 9px; padding: 14px 28px; border-top: 1px solid #e0e9e4; background: #fff; }
.automation-editor-footer button { min-height: 43px; padding: 0 16px; border-radius: 9px; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.automation-editor-footer .automation-save-draft { border: 1px solid #dce6e0; color: #746f5d; background: #fff; }
.automation-editor-footer .contact-save-button { border: 1px solid #565813; color: #fff; background: #565813; }
.automation-editor-footer button:disabled, .automation-review-card > button:disabled { opacity: .55; cursor: wait; }
@media (max-width: 980px) {
  .automation-editor-main, .automation-builder-grid, .automation-flow-grid { gap: 10px; }
  .automation-flow-grid { grid-template-columns: minmax(0,1fr) minmax(185px,220px); }
  .automation-editor-scroll { padding: 14px; }
}
@media (max-width: 760px) {
  .automation-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .automation-metric { min-height: 86px; padding: 10px 11px; }
  .automation-metric > strong { font-size: calc(23px * var(--portal-text-scale)); }
  .automation-metric > span { font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-metric > small { font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-workspace-heading { align-items: flex-start; padding: 16px; }
  .automation-workspace-heading h2 { font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-workspace-heading p:not(.eyebrow) { max-width: 370px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-primary-action { min-height: 35px; padding: 0 9px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-primary-action svg { width: 13px; height: 13px; }
  .automation-tab-content { padding: 10px; }
  .automation-card-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .automation-create-card { min-height: 145px; padding: 14px; }
  .automation-module-card { min-height: 200px; }
  .automation-run-row { grid-template-columns: 30px minmax(0,1fr) auto; padding: 10px; }
  .automation-run-counts, .automation-run-events { grid-column: 1 / -1; }
  .automation-run-events > div { grid-template-columns: 1fr; gap: 3px; }
  .automation-editor-dialog { width: calc(100vw - 14px); height: calc(100dvh - 14px); max-height: calc(100dvh - 14px); border-radius: 14px; }
  .automation-editor-head { padding: 17px; }
  .automation-editor-head h2 { font-size: calc(21px * var(--portal-text-scale)); }
  .automation-editor-head p:not(.eyebrow) { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-editor-scroll { padding: 12px; }
  .automation-builder-grid, .automation-flow-grid { grid-template-columns: minmax(0,1fr); }
  .automation-builder-grid > .automation-builder-section:first-child { grid-column: auto; }
  .automation-flow-section, .automation-editor-aside { grid-column: auto; grid-row: auto; }
  .automation-editor-aside { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .automation-trigger-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .automation-trigger-start, .automation-trigger-event, .automation-trigger-kind { grid-column: 1 / -1; }
  .automation-review-card { padding: 13px; }
  .automation-review-card > strong { font-size: calc(31px * var(--portal-text-scale)); }
  .automation-builder-section { padding: 15px; }
  .automation-editor-fields { gap: 8px; }
  .automation-editor-footer { flex-wrap: wrap; padding: 11px; }
  .automation-editor-footer button { flex: 1 1 auto; min-width: 100px; padding-inline: 10px; }
}
@media (max-width: 420px) {
  .automation-workspace-heading { flex-direction: column; }
  .automation-primary-action { align-self: stretch; justify-content: center; }
  .automation-editor-aside { grid-template-columns: minmax(0,1fr); }
  .automation-editor-fields, .automation-step-fields, .automation-trigger-fields { grid-template-columns: minmax(0,1fr); }
  .automation-trigger-start, .automation-trigger-event, .automation-trigger-kind, .automation-trigger-frequency, .automation-trigger-interval, .automation-trigger-calendar, .automation-trigger-calendar-wide { grid-column: auto; }
  .automation-helper-wide, .automation-step-wide { grid-column: auto; }
  .automation-integrations > span { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
}

@media (max-width: 420px) {
  .campaign-workspace-toolbar { gap: 7px; }
  .campaign-refresh-context { max-width: calc(100% - 78px); }
  .campaign-refresh-label { width: 100%; }
  .campaign-service-chip { min-height: 21px; padding-inline: 6px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .campaign-refresh-button { gap: 4px; padding-inline: 6px; }
  .campaign-metric { min-height: 82px; padding: 9px; }
  .campaign-metric > span { font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .campaign-metric > strong { font-size: calc(19px * var(--portal-text-scale)); }
  .campaign-panel-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .campaign-panel-link { align-self: flex-start; }
  .campaign-lifecycle-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .campaign-lifecycle-audience { text-align: left; }
  .campaign-lifecycle-actions { align-items: stretch; flex-direction: column; }
  .campaign-lifecycle-actions button, .campaign-schedule-field input { width: 100%; box-sizing: border-box; }
  .campaign-schedule-field { width: 100%; }
  .campaign-record-heading { gap: 7px; }
  .campaign-record-metrics { gap: 5px; }
  .campaign-record-metrics small { font-size: calc((5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: .04em; }
  .campaign-record-metrics strong { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .campaign-state-box { min-height: 120px; padding: 13px; }
  .campaign-connection-notice { padding: 9px; }
}

/* Dialogs keep their close and primary actions reachable on short viewports. */
dialog[open] {
  box-sizing: border-box;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
  overscroll-behavior: contain;
}
.contact-dialog, .campaign-editor, .command-dialog { overflow-x: hidden; overflow-y: auto; }
.contact-dialog-head, .campaign-editor-head {
  position: sticky;
  z-index: 5;
  top: 0;
  background: #fff;
}
.contact-form-actions, .campaign-editor-foot {
  position: sticky;
  z-index: 5;
  bottom: 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -8px 18px rgba(255, 255, 255,.92);
}
.contact-dialog { max-height: calc(100dvh - 24px); }
.campaign-editor { max-height: calc(100dvh - 24px); }
.command-dialog { max-height: calc(100dvh - 24px); }
.intelligence-form .contact-form-actions { bottom: 0; margin-inline: -17px; padding: 12px 17px max(12px, env(safe-area-inset-bottom)); }

.contact-search-mode select { min-height: 38px; padding: 0 9px; border: 1px solid #d7e4e0; border-radius: 9px; color: #65663f; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.contact-import-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid #d7e4e0; border-radius: 9px; color: #65663f; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; cursor: pointer; }
.contact-import-button:hover { border-color: #c9c9a7; color: #555711; background: #f9faf5; }
.contact-import-button svg { width: 14px; height: 14px; }
.contact-toolbar-actions .contact-create-button { white-space: nowrap; }
.contact-document-cell { color: #8a8671; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.contact-document-summary { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.contact-document-field .contact-document-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contact-document-switch { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 2px; border: 1px solid #e1e9e5; border-radius: 7px; background: #f5f8f5; }
.contact-document-switch button { min-width: 34px; min-height: 23px; padding: 0 7px; border: 0; border-radius: 5px; color: #959382; background: transparent; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; cursor: pointer; }
.contact-document-switch button.is-active { color: #575911; background: #fff; box-shadow: 0 1px 4px #3333141a; }
.contact-import-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 24px 17px; border-bottom: 1px solid #e7eeea; background: #fff; }
.contact-import-head h2 { margin: 0; color: #3d3e1e; font-size: calc(21px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.contact-import-head > div:first-child > p:not(.eyebrow) { max-width: 600px; margin: 6px 0 0; color: #878471; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.contact-import-head .eyebrow { margin: 0 0 6px; color: #898171; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 790; letter-spacing: .12em; }
.contact-import-head-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.contact-import-text-button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #dbe6e1; border-radius: 8px; color: #5c5d30; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.contact-import-text-button:hover { border-color: #c7c8a7; color: #555711; background: #f9faf5; }
.contact-import-text-button:disabled { opacity: .58; cursor: wait; }
.contact-import-content { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 16px; overflow: auto; padding: 18px 24px 22px; background: #fafaf7; overscroll-behavior: contain; }
.contact-import-dropzone { display: grid; min-height: 194px; place-items: center; padding: 18px; border: 1px dashed #a8beb6; border-radius: 13px; background: #fff; text-align: center; transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease; }
.contact-import-dropzone.is-dragging { border-color: #61621c; background: #f8f8f0; box-shadow: 0 0 0 3px #61621c1c; }
.contact-import-dropzone > label { display: grid; justify-items: center; gap: 7px; color: #484923; cursor: pointer; }
.contact-import-drop-icon, .contact-import-file-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #595b1a; background: #f4f4e9; }
.contact-import-drop-icon svg, .contact-import-file-icon svg { width: 17px; height: 17px; transform: rotate(180deg); }
.contact-import-dropzone strong { font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.contact-import-dropzone small, .contact-import-dropzone > p { margin: 0; color: #8b8878; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-browse { display: inline-flex; min-height: 33px; align-items: center; margin-top: 3px; padding: 0 12px; border: 1px solid #e4e5d8; border-radius: 8px; color: #525323; background: #fdfdfb; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.contact-import-dropzone input[type="file"], .contact-import-replace input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.contact-import-dropzone:focus-within, .contact-import-replace:focus-within { outline: 3px solid #61621c33; outline-offset: 2px; }
.contact-import-file-ready { display: flex; min-height: 62px; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid #e7e8dc; border-radius: 11px; background: #fff; }
.contact-import-file-ready > span:nth-child(2) { display: grid; min-width: 0; flex: 1 1 auto; gap: 3px; }
.contact-import-file-ready strong { overflow: hidden; color: #51522c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.contact-import-file-ready small { color: #949182; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-replace { display: inline-flex; min-height: 32px; flex: 0 0 auto; align-items: center; padding: 0 10px; border: 1px solid #dbe6e1; border-radius: 7px; color: #5c5d30; background: #fff; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.contact-import-section { display: grid; gap: 13px; padding: 16px; border: 1px solid #e2eae5; border-radius: 12px; background: #fff; }
.contact-import-section-heading { display: flex; align-items: flex-start; gap: 10px; }
.contact-import-step-number { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid #e7e8db; border-radius: 8px; color: #5e602a; background: #f6f6ef; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; }
.contact-import-section-heading > div { display: grid; gap: 3px; }
.contact-import-section-heading strong, .contact-import-before-analysis strong, .contact-import-empty-state strong { color: #53542e; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.contact-import-section-heading small { color: #949281; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-map-head, .contact-import-review-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.contact-import-map-head > div, .contact-import-review-head > div { display: grid; gap: 4px; }
.contact-import-map-head strong, .contact-import-review-head strong { color: #5b5c38; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.contact-import-map-head small, .contact-import-review-head small { color: #959385; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-map-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 10px; }
.contact-import-map-group { display: grid; gap: 9px; padding: 11px; border: 1px solid #e8eeea; border-radius: 9px; background: #fcfcfa; }
.contact-import-map-group h3 { margin: 0; color: #949085; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 790; letter-spacing: .07em; text-transform: uppercase; }
.contact-import-mapping { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.contact-import-mapping label { display: grid; min-width: 0; gap: 5px; color: #7b7760; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.contact-import-mapping label em { color: #b26b3d; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; font-weight: 740; }
.contact-import-mapping select { width: 100%; min-width: 0; min-height: 35px; padding: 0 8px; border: 1px solid #dce6e2; border-radius: 7px; color: #585937; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-mapping select:focus-visible, .contact-import-filter button:focus-visible, .contact-import-replace:focus-within { outline: 3px solid #61621c33; outline-offset: 2px; }
.contact-import-ignored, .contact-import-safety { margin: 0; color: #878372; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.contact-import-ignored { padding: 8px 10px; border-radius: 7px; color: #6d7776; background: #f6f7f3; overflow-wrap: anywhere; }
.contact-import-before-analysis, .contact-import-empty-state { display: flex; align-items: flex-start; gap: 10px; }
.contact-import-before-analysis p, .contact-import-empty-state p { margin: 4px 0 0; color: #8b8878; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.contact-import-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.contact-import-summary > div { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border: 1px solid #e4ebe6; border-radius: 9px; color: #848271; background: #fcfcfa; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-summary strong { color: #555631; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-summary .is-new { background: #fafaf4; }
.contact-import-summary .is-update { background: #fafbf5; }
.contact-import-summary .is-skip { background: #fcf8f1; }
.contact-import-options { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 11px; border: 1px solid #e7eeea; border-radius: 9px; }
.contact-import-options legend { padding: 0 5px; color: #878473; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.contact-import-options label { display: flex; min-width: min(260px,100%); flex: 1 1 220px; align-items: flex-start; gap: 8px; padding: 8px; border: 1px solid #edf1ed; border-radius: 8px; background: #fff; cursor: pointer; }
.contact-import-options input { margin: 2px 0 0; accent-color: #5a5c1b; }
.contact-import-options label span { display: grid; gap: 3px; }
.contact-import-options label strong { color: #656147; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-options label small { color: #969288; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-progress { display: grid; gap: 6px; color: #767054; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-progress progress { width: 100%; height: 6px; accent-color: #5a5c1b; }
.contact-import-filter { display: flex; flex-wrap: wrap; gap: 5px; }
.contact-import-filter button { display: inline-flex; min-height: 28px; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; color: #878471; background: #f8f8f4; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.contact-import-filter button[aria-pressed="true"] { border-color: #e2e3d4; color: #4f501b; background: #f6f6ee; }
.contact-import-filter button span { color: #99958a; font-variant-numeric: tabular-nums; }
.contact-import-preview-table { max-height: 285px; overflow: auto; border: 1px solid #e5ece7; border-radius: 8px; }
.contact-import-preview-table table { width: 100%; border-collapse: collapse; text-align: left; }
.contact-import-preview-table th, .contact-import-preview-table td { max-width: 280px; padding: 8px 9px; border-bottom: 1px solid #edf1ef; overflow: hidden; color: #706d52; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; vertical-align: top; }
.contact-import-preview-table td small { display: block; max-width: 420px; margin-top: 3px; overflow: hidden; color: #9a7063; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.contact-import-preview-table th { position: sticky; top: 0; color: #969384; background: #f8faf8; font-weight: 760; }
.contact-import-row-number, .contact-import-preview-table th:first-child { width: 46px; color: #969384 !important; font-variant-numeric: tabular-nums; }
.contact-import-status { display: inline-flex; padding: 4px 7px; border-radius: 6px; color: #595b2b; background: #f5f6ed; white-space: nowrap; }
.contact-import-status.is-update { color: #6d763f; background: #f7f9ed; }
.contact-import-status.is-skip { color: #987246; background: #faf3e8; }
.contact-import-status.is-error { color: #a14d43; background: #fff0ed; }
.contact-import-no-rows { padding: 18px !important; color: #969287 !important; text-align: center; }
.contact-import-hint { margin: 0; color: #959482; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.contact-import-result { display: grid; gap: 3px; margin: 0; padding: 10px 12px; border: 1px solid #ebebdb; border-radius: 8px; color: #5c5e28; background: #f8f8f1; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-result strong { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-result small { color: #9b584e; }
.contact-import-result.is-error, .contact-import-feedback.is-error { border-color: #efd6d1; color: #a04e43; background: #fff6f3; }
.contact-import-feedback { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #e7ece8; border-radius: 8px; color: #706c56; background: #fff; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-notice { margin: 0; color: #5c5e28; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 24px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #e2eae5; background: #fff; }
.contact-import-footer-note { min-width: 0; color: #918e82; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-import-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; }
.contact-import-actions .table-action { min-height: 38px; padding: 0 12px; }
.contact-import-actions .contact-save-button { min-width: 146px; }
.broadcast-whatsapp-panel { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; padding: 14px 17px; border: 1px solid #eadfca; border-radius: 12px; background: #fffaf1; }
.broadcast-whatsapp-panel.is-connected { border-color: #e8e8d8; background: #f9faf5; }
.broadcast-whatsapp-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #5c5e1a; background: #f5f5e9; }
.broadcast-whatsapp-icon svg { width: 17px; height: 17px; }
.broadcast-whatsapp-panel > div { min-width: 0; flex: 1; }
.broadcast-whatsapp-panel .eyebrow { margin: 0 0 4px; color: #89978d; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .1em; }
.broadcast-whatsapp-panel h2 { margin: 0; color: #525333; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.broadcast-whatsapp-panel p:not(.eyebrow) { margin: 4px 0 0; color: #748781; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-whatsapp-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: #987446; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; white-space: nowrap; }
.broadcast-whatsapp-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.broadcast-whatsapp-panel.is-connected .broadcast-whatsapp-status { color: #64652c; }

/* Unified Knowledge and internal-record workspace. */
.intelligence-panel-head { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; }
.intelligence-panel-head > div:first-child { grid-column: 1; grid-row: 1; min-width: 0; }
.intelligence-panel-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.intelligence-total-count { grid-column: 2; grid-row: 1; justify-self: center; color: #8a8775; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; white-space: nowrap; }
.intelligence-panel-actions { grid-column: 3; grid-row: 1; }
.intelligence-panel-actions .heading-action,
.intelligence-panel-actions .contact-create-button { min-height: 35px; }
.intelligence-panel-actions .heading-action { display: inline-flex; align-items: center; gap: 6px; padding-inline: 11px; border: 1px solid #dce7e2; border-radius: 8px; color: #5f6036; background: #fff; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; text-decoration: none; }
.intelligence-panel-actions .heading-action:hover { border-color: #d2d2b5; color: #565810; background: #fafaf6; }
.intelligence-panel-actions .heading-action svg { width: 13px; height: 13px; }
.intelligence-controls { align-items: flex-start; }
.intelligence-filters { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; }
.intelligence-filter { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: #898674; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.intelligence-filter:hover { color: #555718; background: #fafaf6; }
.intelligence-filter.is-active { border-color: #e9e9d6; color: #5f6111; background: #f7f8ee; }
.intelligence-filter small { min-width: 18px; padding: 2px 5px; border-radius: 99px; color: #949180; background: #f0f4f1; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: center; }
.intelligence-filter.is-active small { color: #5d5f19; background: #efefdd; }
.intelligence-tools { display: flex; min-width: 0; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.intelligence-tools .intelligence-search-wrap { width: min(260px, 32vw); }
.intelligence-select-wrap { display: inline-flex; min-height: 34px; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid #e0e9e5; border-radius: 8px; color: #939180; background: #fbfcfb; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-select-wrap select { max-width: 130px; border: 0; outline: 0; color: #5d5e3c; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.intelligence-list-summary { padding: 10px 20px 0; color: #a09c91; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record { position: relative; gap: 16px; padding-block: 18px; }
.intelligence-record::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: #86883f; content: ''; opacity: .8; }
.intelligence-record.is-internal::before { background: #9582c1; }
.intelligence-record-labels { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 7px; }
.intelligence-protected-badge { display: inline-flex; width: fit-content; min-height: 20px; align-items: center; gap: 4px; padding: 0 7px; border: 1px solid #eadfca; border-radius: 999px; color: #806c47; background: #fbf7ed; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; line-height: 1.2; white-space: nowrap; }
.intelligence-type-badge { display: inline-flex; min-height: 22px; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid #e9ead6; border-radius: 99px; color: #575822; background: #f8f8f2; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; white-space: nowrap; }
.intelligence-type-badge > span { color: #6f9380; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .06em; }
.intelligence-type-badge.is-internal { border-color: #e4def0; color: #705b98; background: #f7f4fb; }
.intelligence-type-badge.is-internal > span { color: #8c7aa9; }
.intelligence-category { color: #949282; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-status.is-draft { border-color: #eee2c7; color: #967741; background: #fbf8ef; }
.intelligence-status.is-active { border-color: #e9e9d3; color: #5c5e28; background: #f8f8f1; }
.intelligence-status.is-review { border-color: #f0e2c7; color: #997345; background: #fcf7ee; }
.intelligence-status.is-archived { border-color: #e5e8e7; color: #8b897c; background: #f5f6f5; }
.intelligence-record h3 { font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-copy { max-width: 1000px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-full { margin-top: 8px; color: #686646; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-full summary { width: fit-content; color: #5d5e24; font-weight: 680; cursor: pointer; }
.intelligence-record-full p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.intelligence-record-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.intelligence-tag { display: inline-flex; min-height: 20px; align-items: center; padding: 0 7px; border-radius: 5px; color: #7e7a68; background: #f2f5f2; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-actions { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 6px; }
.intelligence-record-actions .table-action { min-height: 30px; padding-inline: 8px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-decoration: none; }
.intelligence-record-actions .table-action svg { width: 12px; height: 12px; }
.intelligence-delete { color: #a05950; }
.intelligence-type-chooser { display: flex; min-height: 100%; flex: 1 1 auto; flex-direction: column; padding: 0 0 14px; }
.intelligence-dialog.is-chooser[open] { width: min(620px, calc(100vw - 28px)); height: fit-content; min-height: 0; max-height: calc(100dvh - 28px); }
.intelligence-dialog.is-chooser .intelligence-type-chooser { min-height: 0; flex: 0 0 auto; }
.intelligence-type-chooser > .contact-dialog-head { padding: 22px 24px 17px; }
.intelligence-type-chooser > .contact-dialog-head p:not(.eyebrow) { max-width: 460px; margin: 7px 0 0; color: #8a8775; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.intelligence-type-options { display: grid; gap: 10px; padding: 4px 24px 20px; }
.intelligence-type-option { display: flex; min-height: 84px; align-items: center; gap: 13px; padding: 14px; border: 1px solid #e1e9e4; border-radius: 12px; color: #565736; background: #fff; text-align: left; cursor: pointer; }
.intelligence-type-option:hover { border-color: #cbcba4; background: #fbfbf8; }
.intelligence-type-option.is-internal:hover { border-color: #c9bbde; background: #faf8fc; }
.intelligence-option-mark { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: #62632d; background: #f7f7ec; }
.intelligence-type-option.is-internal .intelligence-option-mark { color: #7965a0; background: #f3eff9; }
.intelligence-option-mark svg { width: 17px; height: 17px; }
.intelligence-type-option > span:nth-child(2) { display: grid; min-width: 0; flex: 1 1 auto; gap: 5px; }
.intelligence-type-option strong { color: #515132; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-type-option small { color: #908d7e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.intelligence-type-option > svg { width: 14px; height: 14px; flex: 0 0 auto; color: #99958a; }
.intelligence-type-chooser .contact-form-actions { margin: auto 24px 0; padding: 12px 0 0; }
.intelligence-delete-dialog[open] { width: min(520px, calc(100vw - 28px)); height: auto; min-height: 0; align-self: center; }
.intelligence-delete-form { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.intelligence-delete-form .contact-dialog-head { padding: 21px 23px 15px; }
.intelligence-delete-form .contact-dialog-head p:not(.eyebrow) { margin: 7px 0 0; color: #8a8778; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; overflow-wrap: anywhere; }
.intelligence-delete-content { display: grid; gap: 9px; padding: 8px 23px 22px; }
.intelligence-delete-type { width: fit-content; padding: 4px 8px; border-radius: 99px; color: #8a5b52; background: #fbf1ed; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.intelligence-delete-content label { color: #5f5d41; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.intelligence-delete-content input { min-height: 39px; padding: 8px 10px; border: 1px solid #e3d9d5; border-radius: 8px; color: #59573e; background: #fff; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-delete-content input:focus { border-color: #c48a7e; box-shadow: 0 0 0 3px rgba(173,103,89,.09); outline: 0; }
.intelligence-delete-form .contact-form-actions { justify-content: flex-end; gap: 8px; padding-inline: 23px; }
.intelligence-delete-form .campaign-action-danger:disabled { opacity: .45; cursor: not-allowed; }
.intelligence-workspace button:focus-visible, .intelligence-workspace a:focus-visible, .intelligence-dialog button:focus-visible, .intelligence-dialog input:focus-visible, .intelligence-dialog select:focus-visible, .intelligence-dialog textarea:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }

@media (max-width: 760px) {
  .contact-search-mode select { min-height: 35px; padding-inline: 6px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .contact-toolbar-actions { width: 100%; flex-wrap: wrap; }
  .contact-import-button, .contact-export-button, .contact-create-button { flex: 1 1 auto; min-height: 35px; padding-inline: 8px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .contact-import-form { padding: 17px; }
  .contact-import-mapping { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-import-form .contact-form-actions { margin-inline: -17px; padding-inline: 17px; flex-wrap: wrap; }
  .contact-import-form .contact-form-actions > button { flex: 1 1 30%; min-width: 0; padding-inline: 7px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .broadcast-whatsapp-panel { align-items: flex-start; flex-wrap: wrap; padding: 12px; }
  .broadcast-whatsapp-status { margin-left: 49px; }
  .contact-document-cell { white-space: normal; }
  .intelligence-panel-head { align-items: flex-start; }
  .intelligence-panel-actions { width: 100%; justify-content: flex-start; }
  .intelligence-panel-actions .contact-create-button { width: auto; flex: 0 0 auto; }
  .intelligence-controls { align-items: stretch; }
  .intelligence-tools { justify-content: flex-start; }
  .intelligence-tools .intelligence-search-wrap { width: 100%; }
  .intelligence-record { align-items: stretch; flex-direction: column; }
  .intelligence-record-actions { width: 100%; }
  .intelligence-record-actions .table-action { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 420px) {
  .intelligence-panel-actions { gap: 6px; }
  .intelligence-total-count { width: 100%; }
  .intelligence-panel-actions .heading-action, .intelligence-panel-actions .contact-create-button { flex: 1 1 auto; justify-content: center; }
  .intelligence-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .intelligence-filter { justify-content: center; gap: 4px; padding-inline: 5px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-select-wrap { flex: 1 1 auto; justify-content: space-between; }
  .intelligence-type-chooser > .contact-dialog-head { padding: 17px 17px 14px; }
  .intelligence-type-options { padding-inline: 17px; }
  .intelligence-type-option { gap: 9px; padding: 11px; }
  .intelligence-delete-form .contact-dialog-head { padding: 17px 17px 13px; }
  .intelligence-delete-content { padding-inline: 17px; }
  .intelligence-delete-form .contact-form-actions { padding-inline: 17px; }
}

/* Long editors use an inner scrolling region so the footer never covers the last fields. */
.contact-dialog[open], .contact-import-dialog[open], .intelligence-dialog[open], .campaign-editor[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  height: min(860px, calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom))));
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
}
/* A dialog built on a <section> (Admin → Permissões) scrolls the same way when it has the scroll region. */
.contact-dialog[open] > form, .campaign-editor[open] > form, .contact-dialog[open] > section:has(> .contact-form-scroll) {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}
.contact-form { min-height: 0; padding: 0; }
.contact-dialog-head, .campaign-editor-head {
  position: static;
  top: auto;
  flex: 0 0 auto;
  padding: 20px 22px 16px;
}
.campaign-editor-head { padding: 22px 25px 18px; }
.contact-form-scroll, .campaign-editor-scroll, .intelligence-form-scroll, .contact-import-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.contact-form-scroll { padding: 18px 22px 20px; }
.contact-form-scroll .contact-form-fields { padding-top: 0; }
.contact-form-actions, .campaign-editor-foot {
  position: static;
  inset: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 22px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #e6ece7;
  background: #fff;
  box-shadow: none;
}
.contact-import-dialog[open] { width: min(1000px, calc(100vw - 28px)); height: min(760px, calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)))); }
.contact-import-dialog[open]:not(.has-file) { height: auto; min-height: 0; }
.contact-import-dialog[open]:not(.has-file) .contact-import-form { flex: 0 1 auto; overflow: visible; }
.contact-import-dialog[open]:not(.has-file) .contact-import-content { flex: 0 0 auto; overflow: visible; }
.contact-import-form {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.contact-import-form .contact-import-head { flex: 0 0 auto; padding: 20px 24px 17px; }
.contact-import-form .contact-import-content { padding: 18px 24px 22px; }
.intelligence-dialog[open] { height: min(740px, calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)))); }
.intelligence-form { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; padding: 0; }
.intelligence-form .contact-dialog-head { flex: 0 0 auto; padding: 20px 22px 16px; }
.intelligence-form-scroll { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; overflow: hidden; }
.intelligence-form-fields { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 18px 22px; }
.intelligence-form .contact-form-error { flex: 0 0 auto; margin: 0 22px 10px; }
.intelligence-form .contact-form-actions { margin: 0; padding: 12px 22px max(12px, env(safe-area-inset-bottom)); }
.campaign-editor[open] { width: min(940px, calc(100vw - 36px)); }
.campaign-editor > form { width: 100%; }
.campaign-editor-head { flex: 0 0 auto; }
.campaign-editor-scroll { flex: 1 1 auto; }
.campaign-editor-foot { padding: 14px 25px max(14px, env(safe-area-inset-bottom)); }
.command-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.command-dialog[open] .command-box { display: flex; min-height: 0; flex-direction: column; overflow: hidden; }
.command-dialog[open] .command-results { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }

@media (max-width: 760px) {
  .contact-dialog-head { padding: 17px 17px 14px; }
  .contact-form-scroll { padding: 14px 17px 17px; }
  .contact-form-actions, .contact-import-form .contact-form-actions, .intelligence-form .contact-form-actions { padding: 10px 17px max(10px, env(safe-area-inset-bottom)); }
  .contact-import-form .contact-import-head { padding: 17px; }
  .contact-import-form .contact-import-content { gap: 12px; padding: 12px 17px 15px; }
  .contact-import-map-groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-import-footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 10px 17px max(10px, env(safe-area-inset-bottom)); }
  .contact-import-actions { width: 100%; }
  .contact-import-actions > button { flex: 1 1 0; min-width: 0; padding-inline: 8px; }
  .intelligence-form-fields { padding: 14px 17px; }
  .intelligence-form .contact-dialog-head { padding: 17px 17px 14px; }
  .campaign-editor-head { padding: 17px; }
  .campaign-editor-foot { padding: 12px 17px max(12px, env(safe-area-inset-bottom)); }
}

/* Visível para and automatic entries (3D.23.4) */
.intelligence-type-badge.is-bots { border-color: #d6e4dc; color: #3d7a5a; background: #f2f8f4; }
.intelligence-type-badge.is-automatic { border-color: #e6dfcc; color: #86681f; background: #fbf8ef; }
.intelligence-visibility { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--line, #e8eae3); border-radius: 10px; }
.intelligence-visibility legend { padding: 0 4px; font-weight: 600; }
.intelligence-visibility-scope, .intelligence-visibility-bots { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.intelligence-visibility label { display: inline-flex; align-items: center; gap: 6px; }
.intelligence-visibility:has(input[value="all"]:checked) .intelligence-visibility-bots { display: none; }

/* Fontes automáticas in #inteligencia: the same card as Bases do ambiente (.intelligence-catalog). */
.knowledge-sources-note { margin: 0; padding: 10px 20px; border-bottom: 1px solid #edf1ef; color: #86681f; background: #fffdf8; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.knowledge-sources-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 20px 18px; }
.knowledge-source-choice { display: grid; align-content: start; justify-items: start; gap: 5px; padding: 13px 14px; border: 1px dashed #cfdcd7; border-radius: 10px; color: #515132; background: #fcfdfc; font: inherit; text-align: left; cursor: pointer; }
.knowledge-source-choice:hover:not(:disabled) { border-style: solid; border-color: #c6c598; background: #fbfbf6; }
.knowledge-source-choice:disabled { opacity: .6; cursor: not-allowed; }
.knowledge-source-choice strong { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.knowledge-source-choice span { color: #86836f; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.knowledge-source-choice em { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; color: #59591c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; font-weight: 700; }
.knowledge-source-choice em svg { width: 12px; height: 12px; }
.knowledge-source-list { display: grid; margin: 0; padding: 0; list-style: none; }
.knowledge-source { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 13px 20px; border-bottom: 1px solid #edf1ef; }
.knowledge-source:last-child { border-bottom: 0; }
.knowledge-source.is-paused .knowledge-source-main { opacity: .72; }
.knowledge-source-main { display: grid; min-width: 0; gap: 3px; color: #76765d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.knowledge-source-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.knowledge-source-title strong { color: #515132; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.knowledge-source-kind, .knowledge-source-status { display: inline-flex; min-height: 18px; align-items: center; padding: 0 7px; border-radius: 5px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.knowledge-source-kind { color: #7e7a68; background: #f2f5f2; }
.knowledge-source-status.is-ok { color: #2d7a4f; background: #eef7f1; }
.knowledge-source-status.is-running { color: #59591c; background: #f8f8ed; }
.knowledge-source-status.is-paused, .knowledge-source-status.is-waiting { color: #86681f; background: #fbf8ef; }
.knowledge-source-status.is-error { color: #a4421f; background: #fcf1ec; }
.knowledge-source-url { overflow: hidden; color: #5f5f21; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-source-error { color: #a4421f; }
.knowledge-source-notice { color: #2d7a4f; }
.knowledge-source-entries { margin-top: 3px; }
.knowledge-source-entries summary { width: fit-content; color: #4e4d33; font-weight: 650; cursor: pointer; }
.knowledge-source-entries ul { display: grid; gap: 3px; margin: 6px 0 0; padding-left: 18px; }
.knowledge-source-entries small { color: #86681f; }
.knowledge-source-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
/* The "Nova fonte" dialog sizes to its content (the form used to be wider than the dialog). */
.intelligence-dialog.is-source[open] { width: min(640px, calc(100vw - 28px)); height: fit-content; min-height: 0; max-height: calc(100dvh - 28px); }
.knowledge-source-form { display: flex; width: 100%; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.knowledge-source-form .contact-dialog-head { flex: 0 0 auto; }
.knowledge-source-fields { display: grid; min-height: 0; flex: 1 1 auto; align-content: start; gap: 14px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px; }
.knowledge-source-field { display: grid; min-width: 0; gap: 5px; color: #515132; font-size: 13px; font-weight: 600; }
.knowledge-source-field input { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d5e0dc; border-radius: 8px; font: inherit; font-weight: 400; }
.knowledge-source-edit-hint { color: #86836f; font-size: 12px; }
.knowledge-source-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.knowledge-source-mode legend { margin-bottom: 6px; padding: 0; color: #515132; font-size: 13px; font-weight: 600; }
.knowledge-source-option { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border: 1px solid #dfe8e4; border-radius: 10px; cursor: pointer; }
.knowledge-source-option:has(input:checked) { border-color: #cccb8e; background: #fbfbf4; }
.knowledge-source-option input { margin: 2px 0 0; }
.knowledge-source-option span { display: grid; gap: 3px; }
.knowledge-source-option strong { color: #515132; font-size: 13px; }
.knowledge-source-option small, .knowledge-source-hint { color: #76765d; font-size: 12px; font-weight: 400; line-height: 1.4; }
.knowledge-source-hint { display: block; margin-top: -6px; }
.knowledge-source-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 140px; gap: 10px; }
.knowledge-source-preview { padding: 12px 14px; border: 1px dashed #d5e0dc; border-radius: 10px; background: #fcfdfc; font-size: 13px; }
.knowledge-source-preview p { margin: 0; }
.knowledge-source-preview-empty, .knowledge-source-reading { color: #86836f; }
.knowledge-source-preview ol { display: grid; gap: 6px; max-height: 300px; margin: 8px 0 0; padding-left: 18px; overflow-y: auto; }
.knowledge-schedule-events { display: grid; gap: 3px; margin: 4px 0 8px; padding: 0; list-style: none; }
.knowledge-schedule-events li { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-weight: 400; }
.knowledge-schedule-events time { flex: none; width: 44px; color: #86836f; font-variant-numeric: tabular-nums; }
.knowledge-schedule-events small { margin-left: auto; color: #86836f; white-space: nowrap; }
.knowledge-source-preview li span { display: block; color: #76765d; }
.knowledge-source-form .contact-form-error { margin: 0; }
.knowledge-source-form .contact-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
/* Bases do ambiente folds and loads only when opened. */
.intelligence-catalog > summary { cursor: pointer; list-style: none; }
.intelligence-catalog > summary::-webkit-details-marker { display: none; }
.intelligence-catalog > summary:hover h2 { color: #545517; }
details.intelligence-catalog:not([open]) > .intelligence-catalog-heading { border-bottom: 0; }
.intelligence-catalog-side { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.intelligence-catalog-chevron { width: 7px; height: 7px; margin: 0 4px 3px 0; border-right: 2px solid #8b8777; border-bottom: 2px solid #8b8777; transform: rotate(45deg); transition: transform .15s; }
details.intelligence-catalog[open] .intelligence-catalog-chevron { margin-bottom: -2px; transform: rotate(-135deg); }
@media (max-width: 640px) {
  .knowledge-sources-start, .knowledge-source-mode, .knowledge-source-row { grid-template-columns: minmax(0, 1fr); }
  .knowledge-sources-start { padding-inline: 14px; }
  .knowledge-source { flex-direction: column; padding-inline: 14px; }
  .knowledge-source-actions { justify-content: flex-start; }
}
/* Delegated staff identity and access controls. */
.staff-admin-workspace { display: grid; gap: 18px; margin: 0; padding: 24px; border: 1px solid #dfe8e3; border-radius: 18px; background: #fcfcf9; box-shadow: 0 10px 30px rgba(44, 45, 22, .045); }
.staff-admin-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.staff-admin-heading > div:first-child { max-width: 760px; }
.staff-admin-heading h2 { margin: 0; color: #323314; font-size: calc(24px * var(--portal-text-scale)); letter-spacing: -.035em; }
.staff-admin-heading p:not(.eyebrow) { margin: 8px 0 0; color: #817c6c; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.staff-admin-heading > div:last-child { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }
.staff-admin-heading > div:last-child button { min-height: 42px; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-access-guidance { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid #eaeadb; border-radius: 11px; background: #fafaf4; }
.staff-access-guidance strong { flex: 0 0 auto; color: #606130; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-access-guidance span { color: #857a6f; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.staff-account-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.staff-account-card { min-width: 0; padding: 18px; border: 1px solid #e0e9e3; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(44, 45, 22, .025); }
.staff-account-heading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.staff-account-avatar { position: relative; display: grid; overflow: hidden; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: #535413; background: #f4f4e8; font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; }
.staff-account-ident { display: grid; min-width: 0; flex: 1; gap: 4px; }
.staff-account-ident strong { overflow: hidden; color: #434424; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.staff-account-ident span { overflow: hidden; color: #8f897c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.staff-account-state { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #e9e9d8; border-radius: 999px; color: #5c5d29; background: #f7f7ec; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.staff-account-state.is-disabled { border-color: #f0dcd6; color: #9c5951; background: #fff1ee; }
.staff-account-state.is-pending { border-color: #efddb7; color: #906515; background: #fff8e8; }
.staff-account-state.is-orphan { border-color: #e3efd5; color: #6e875b; background: #f5fbf1; }
.staff-account-app-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px 54px; }
.staff-account-app-links span { padding: 6px 9px; border: 1px solid #e6ede8; border-radius: 7px; color: #7f7868; background: #f7f9f6; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-account-permissions { margin-top: 6px; border-top: 1px solid #e8efea; }
.staff-account-permissions > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 9px 1px 3px; color: #5d5e3b; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; }
.staff-account-permissions > summary small { color: #758b85; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; }
.staff-capability-scope { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 11px 0 14px; }
.staff-capability-tools { display: flex; grid-column: 1/-1; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 1px 2px 5px; color: #827970; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-capability-tools > div { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-capability-tools button { min-height: 29px; padding: 3px 9px; border: 1px solid #dce7df; border-radius: 7px; color: #666740; background: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.staff-capability-group { min-width: 0; padding: 9px; border: 1px solid #e4ebe5; border-radius: 9px; background: #fff; }
.staff-capability-group h3 { margin: 0 0 6px; color: #565736; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; }
.staff-capability-group > div { display: grid; gap: 4px; }
.staff-capability-choice { display: flex; min-width: 0; min-height: 30px; align-items: center; gap: 7px; padding: 4px 6px; border: 1px solid #e8eee9; border-radius: 7px; color: #6c654f; background: #fcfcfa; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.3; cursor: pointer; }
.staff-capability-choice input[type="checkbox"] { width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; flex: 0 0 auto; accent-color: #5c5e17; }
.staff-capability-choice:has(input:checked) { border-color: #e2e2ce; background: #f9f9f3; }
.staff-capability-choice:has(input:disabled) { cursor: default; }
.staff-create-capabilities { min-width: 0; }
.staff-account-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; margin: 12px 0; }
.staff-account-fields label, .staff-create-fields label { display: grid; min-width: 0; gap: 6px; color: #6f6b52; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.staff-account-fields input:not([type="checkbox"]), .staff-create-fields input:not([type="checkbox"]), .audience-list-fields input, .audience-list-fields textarea, .audience-list-fields select { width: 100%; min-width: 0; min-height: 41px; padding: 8px 10px; border: 1px solid #d8e3dd; border-radius: 9px; color: #4c4c2a; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-account-fields small, .staff-create-fields fieldset > small { color: #8b8277; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 500; line-height: 1.45; }
.staff-account-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 5px; }
.staff-account-actions button { min-height: 37px; padding: 0 11px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-account-actions button:disabled, .staff-admin-heading button:disabled { opacity: .6; cursor: wait; }
.staff-account-admin-note { margin: 0 0 10px; color: #7a6a47; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.staff-orphan-group { display: grid; gap: 12px; padding-top: 19px; border-top: 1px solid #e3ebe6; }
.staff-orphan-group > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.staff-orphan-group > header > div { min-width: 0; }
.staff-orphan-group h3 { margin: 0; color: #525331; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.staff-orphan-group header p { max-width: 720px; margin: 5px 0 0; color: #857e73; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.staff-orphan-group header > span { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #e9eddf; border-radius: 999px; color: #7c8e65; background: #f9fbf7; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.staff-orphan-card { border-color: #e8ede2; background: #fdfdff; }
.staff-orphan-card .staff-account-app-links span { border-color: #eaefe5; background: #f9fbf7; }
.staff-orphan-protected { align-self: center; color: #868874; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-orphan-status { padding: 11px 13px; border: 1px solid #e8e3d5; border-radius: 9px; color: #806a3a; background: #fffcf3; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.staff-admin-message { margin: 0; padding: 12px 14px; border: 1px solid #e7e8d8; border-radius: 9px; color: #5c5d29; background: #f8f8f2; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.staff-admin-footnote, .staff-protected-note { margin: 0; color: #8b8277; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.staff-create-fields { display: grid; gap: 14px; }
.staff-create-fields fieldset { margin: 0; padding: 14px; border: 1px solid #e0e9e3; border-radius: 11px; }
.staff-create-fields legend { padding: 0 6px; color: #60613b; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.staff-create-fields fieldset > small { display: block; margin-top: 9px; }
.staff-create-dialog[open] { width: min(640px,calc(100vw - 32px)); height: auto; min-height: 0; max-height: calc(100dvh - 32px); align-self: center; }
.staff-create-dialog[open] > form { min-height: 0; flex: 0 1 auto; }
.staff-create-dialog .staff-create-fields { max-height: min(62dvh,560px); flex: 0 1 auto; }
.audience-list-dialog[open] { width: min(540px,calc(100vw - 24px)); }
.audience-list-fields { display: grid; align-content: start; gap: 13px; }
.audience-list-fields textarea { resize: vertical; }
.campaign-audience-row-wrap { min-width: 0; border-bottom: 1px solid #eef2ef; }
.campaign-audience-row-wrap:last-child { border-bottom: 0; }
.campaign-audience-row { border-bottom: 0; }
.campaign-audience-admin-actions { display: flex; gap: 6px; padding: 0 0 9px 35px; }
.campaign-audience-admin-actions button { min-height: 24px; padding: 0 8px; border: 1px solid #e3ebe6; border-radius: 6px; color: #807566; background: #fff; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.campaign-audience-admin-actions button:hover { border-color: #cfd0b6; color: #54551a; }
.audience-add-contacts { border-top: 1px solid #eaf0ec; background: #fdfdfa; }
.audience-add-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 14px 15px 6px; color: #908b80; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.audience-add-heading > div { display: grid; gap: 4px; }
.audience-add-heading h3 { margin: 0; color: #565734; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.audience-add-heading p:not(.eyebrow) { margin: 0; color: #969087; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.audience-add-heading > span { flex: 0 0 auto; color: #7c6f5d; }
.audience-eligible-list { display: grid; max-height: 290px; overflow: auto; padding: 0 15px 12px; }
.audience-eligible-list label { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 9px 3px; border-bottom: 1px solid #eff3f0; cursor: pointer; }
.audience-eligible-list input { width: 14px; height: 14px; flex: 0 0 auto; accent-color: #5c5e17; }
.audience-eligible-list label > span { display: grid; min-width: 0; gap: 3px; }
.audience-eligible-list strong, .audience-eligible-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audience-eligible-list strong { color: #5f603f; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.audience-eligible-list small { color: #999389; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.audience-member-remove { min-height: 25px; padding: 0 7px; border: 1px solid #ecdeda; border-radius: 6px; color: #a46057; background: #fff; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.audience-member-remove:hover { background: #fff5f2; }
.audience-member-remove:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 760px) {
  .staff-admin-workspace { gap: 12px; margin: 18px 0; padding: 14px; border-radius: 12px; }
  .staff-admin-heading { flex-direction: column; gap: 12px; }
  .staff-admin-heading > div:last-child { width: 100%; }
  .staff-admin-heading > div:last-child button { flex: 1; }
  .staff-admin-heading h2 { font-size: calc(17px * var(--portal-text-scale)); }
  .staff-account-list { grid-template-columns: minmax(0,1fr); }
  .staff-account-card { padding: 12px; }
  .staff-account-fields { grid-template-columns: minmax(0,1fr); }
  .staff-account-actions button { flex: 1 1 42%; }
  .staff-create-dialog[open] { width: calc(100vw - 20px); }
  .audience-add-heading { align-items: flex-start; }
  .campaign-audience-admin-actions { padding-left: 34px; }
}

@media (max-width: 520px) {
  .staff-capability-scope { grid-template-columns: minmax(0,1fr); }
  .staff-capability-tools { flex-wrap: wrap; }
}

.dashboard-report { margin-top: 3px; overflow: hidden; border: 1px solid #e3ebe7; border-radius: 16px; background: #fdfdfa; box-shadow: 0 10px 34px rgba(52, 53, 25, .035); }
.dashboard-report-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); min-width: 0; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid #e7eeea; background: linear-gradient(180deg,#fff 0%,#fcfcf9 100%); }
.dashboard-report-tabs { display: flex; grid-column: 2; min-width: 0; flex-wrap: wrap; justify-content: center; gap: 4px; }
.dashboard-report-refresh { grid-column: 3; justify-self: end; min-height: 35px; padding-inline: 11px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-tab { display: inline-flex; min-height: 37px; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; color: #868271; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; transition: background .16s ease,color .16s ease,border-color .16s ease; }
.dashboard-report-tab span { color: #b0aaa4; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .06em; }
.dashboard-report-tab:hover { color: #5a5c11; background: #f7f8f3; }
.dashboard-report-tab.is-active { border-color: #e8e8d7; color: #5a5c0d; background: #f7f7ec; box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.dashboard-report-tab.is-active span { color: #898b47; }
.dashboard-report-tab:focus-visible { outline: 3px solid rgba(106, 109, 9, .22); outline-offset: 1px; }
.dashboard-report-content { min-height: 300px; padding: 17px; }
.dashboard-report-content > .metrics-grid { margin: 0; }
.dashboard-report-content .dashboard-panels, .dashboard-report-content .dashboard-lower { margin-top: 10px; }
.dashboard-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 2px 0 14px; }
.dashboard-section-heading h2, .dashboard-email-toolbar h2 { margin: 0; color: #3f3f20; font-size: calc(18px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.dashboard-section-heading p:not(.eyebrow), .dashboard-email-toolbar p:not(.eyebrow) { margin: 5px 0 0; color: #949184; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dashboard-email-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 2px 0 14px; }
.dashboard-email-toolbar .eyebrow { margin-bottom: 5px; }
.dashboard-periods { display: flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid #e6ece7; border-radius: 8px; background: #f5f8f5; }
.dashboard-period-button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 6px; color: #898378; background: transparent; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 670; cursor: pointer; }
.dashboard-period-button:hover { color: #5c5e11; }
.dashboard-period-button.is-active { color: #595b11; background: #fff; box-shadow: 0 1px 4px rgba(51, 52, 22, .12); }
.dashboard-email-metrics { margin-bottom: 10px; }
.dashboard-email-consent { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 10px 0; }
.dashboard-email-consent > div { display: grid; min-width: 0; gap: 6px; padding: 11px 13px; border: 1px solid #e7ede8; border-radius: 9px; background: #fff; }
.dashboard-email-consent span { color: #918b82; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .09em; }
.dashboard-email-consent strong { overflow: hidden; color: #535431; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.dashboard-chart-panel { grid-column: 1 / -1; }
.dashboard-ranking-panel, .dashboard-links-panel, .intelligence-next-panel, .system-report-panel { min-height: 180px; }
.dashboard-chart-wrap { min-height: 210px; margin-top: 13px; }
.dashboard-trend-chart { display: block; width: 100%; height: auto; overflow: visible; }
.report-chart-grid { stroke: #e8efeb; stroke-width: 1; }
.report-chart-label { fill: #a49d97; font-family: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.report-chart-line { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.report-chart-line.is-views { stroke: #6e701a; }
.report-chart-line.is-clicks { stroke: #818532; }
.report-chart-line.is-bounces { stroke: #d2a353; stroke-dasharray: 4 4; }
.dashboard-chart-legend { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 6px; color: #908b80; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-chart-legend span::before { width: 7px; height: 7px; border-radius: 50%; background: #6e701a; content: ''; }
.dashboard-chart-legend .is-clicks::before { background: #818532; }
.dashboard-chart-legend .is-bounces::before { background: #d2a353; }
.dashboard-chart-empty, .dashboard-report-empty, .dashboard-report-loading { display: grid; align-content: center; justify-items: start; min-height: 132px; padding: 18px; border: 1px dashed #dfe9e3; border-radius: 9px; background: #fdfdf9; }
.dashboard-chart-empty strong, .dashboard-report-empty strong, .dashboard-report-loading strong { color: #656541; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-chart-empty p, .dashboard-report-empty p, .dashboard-report-loading p { max-width: 490px; margin: 5px 0 0; color: #948e86; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.dashboard-report-empty.compact { min-height: 100px; padding: 14px; border: 0; background: transparent; }
.dashboard-report-notice { margin: 0 0 10px; padding: 9px 11px; border: 1px solid #eee3c9; border-radius: 8px; color: #856933; background: #fffaf0; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dashboard-report-footnote { margin: 9px 2px 0; color: #96a19e; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.6; }
.dashboard-ranked-list, .dashboard-link-list, .dashboard-status-list { display: grid; gap: 0; margin: 8px 0 0; padding: 0; list-style: none; }
.dashboard-ranked-list li { display: grid; grid-template-columns: minmax(0,1fr) 72px 72px; align-items: center; gap: 9px; min-height: 45px; padding: 6px 0; border-bottom: 1px solid #edf1ed; }
.dashboard-ranked-list li:last-child, .dashboard-link-list li:last-child, .dashboard-status-list li:last-child { border-bottom: 0; }
.dashboard-ranked-name { display: grid; min-width: 0; gap: 4px; }
.dashboard-ranked-name strong { overflow: hidden; color: #656145; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-ranked-name small, .dashboard-ranked-list li > span:not(.dashboard-ranked-name) small { color: #a19c96; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-ranked-list li > span:not(.dashboard-ranked-name) { display: grid; justify-items: end; gap: 3px; }
.dashboard-ranked-list li > span:not(.dashboard-ranked-name) strong { color: #64663e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-link-list li, .dashboard-status-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 6px 0; border-bottom: 1px solid #edf1ed; }
.dashboard-link-list li span { overflow: hidden; color: #888562; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-link-list li strong, .dashboard-status-list li strong { flex: 0 0 auto; color: #5c5e39; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-status-list li span { color: #807a66; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.report-callout { display: flex; align-items: center; gap: 11px; margin: 10px 0; padding: 13px; border: 1px solid #ebebdb; border-radius: 10px; background: #fbfbf5; }
.report-callout.is-attention { border-color: #efe2c7; background: #fffaf1; }
.report-callout > span { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #54561d; background: #f2f2e1; font-weight: 800; }
.report-callout.is-attention > span { color: #9b7136; background: #f8edd4; }
.report-callout > div { flex: 1; }
.report-callout strong { color: #626241; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.report-callout p { margin: 4px 0 0; color: #938e87; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.report-callout button { flex: 0 0 auto; border: 0; color: #636511; background: none; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.intelligence-next-panel { background: radial-gradient(circle at 100% 0%,rgba(105, 107, 34, .07),transparent 42%),#fff; }
.intelligence-next-panel h2 { margin: 9px 0 4px; color: #474724; font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: -.03em; }
.intelligence-next-panel > p { margin: 0; color: #908b7e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-next-panel > div { display: grid; gap: 5px; margin: 16px 0; padding-top: 11px; border-top: 1px solid #eaf0eb; }
.intelligence-next-panel > div span { color: #979188; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .08em; }
.intelligence-next-panel > div strong { color: #575829; font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-content .system-report-panel { margin: 0; }
.dashboard-report-content .system-list { margin-top: 0; }
.contact-email-activity { margin: 16px 0 0; padding: 14px; border: 1px solid #e1ebe4; border-radius: 10px; background: linear-gradient(135deg,#fbfbf7,#fff); }
.contact-email-activity[hidden] { display: none; }
.contact-email-activity .eyebrow { margin: 0 0 4px; color: #82928d; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .1em; }
.contact-email-activity h3 { margin: 0 0 10px; color: #535431; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-email-activity-state { display: flex; align-items: center; gap: 8px; color: #928c84; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-email-activity-state .contact-loader { width: 15px; height: 15px; }
.contact-email-activity-empty { margin: 0; color: #908b81; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.contact-email-activity-metrics { display: flex; gap: 8px; margin-bottom: 8px; }
.contact-email-activity-metrics > div { display: grid; min-width: 85px; gap: 4px; padding: 8px 10px; border: 1px solid #e8efea; border-radius: 7px; background: #fff; }
.contact-email-activity-metrics span { color: #8b9995; font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .08em; }
.contact-email-activity-metrics strong { color: #5d5e2c; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-email-activity-list { display: grid; max-height: 210px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.contact-email-activity-list li { display: grid; grid-template-columns: 65px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 37px; padding: 6px 0; border-top: 1px solid #eaf0eb; }
.contact-email-activity-kind { color: #72743e; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.contact-email-activity-copy { display: grid; min-width: 0; gap: 3px; }
.contact-email-activity-copy strong { overflow: hidden; color: #67614a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.contact-email-activity-copy small { overflow: hidden; color: #9b958d; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.contact-email-activity-list time { color: #97a29f; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-email-activity-note { margin: 9px 0 0; color: #97a29e; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dashboard-campaign-statuses { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 11px; }
.dashboard-campaign-statuses span { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px; border: 1px solid #e7eee8; border-radius: 20px; color: #837c71; background: #fff; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-campaign-statuses strong { color: #636432; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-tracking-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; padding: 10px 13px; border: 1px solid #ebebdb; border-radius: 9px; color: #807566; background: #f9faf5; }
.campaign-tracking-note > span { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #5e6027; background: #f2f3e5; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; }
.campaign-tracking-note p { margin: 0; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.campaign-tracking-note strong { color: #5f6034; }
.campaign-tracking-note.is-aggregate { border-color: #eee5d4; background: #fffbf2; }
.campaign-tracking-note.is-aggregate > span { color: #9b773c; background: #f8efd9; }
.campaign-tracking-note.is-aggregate strong { color: #866a3a; }

/* Dispatch studio and reusable message templates. */
.template-launchbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; padding: 13px 16px; border: 1px solid #e8e9dc; border-radius: 11px; background: linear-gradient(100deg,#fafaf4,#fff 72%); }
.template-launchbar > div { display: grid; gap: 3px; }
.template-launchbar strong { color: #585935; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.template-launchbar span { color: #938d84; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-channel-tabs { display: flex; align-items: center; gap: 6px; margin: 0 0 13px; padding: 5px; border: 1px solid #e2e9e4; border-radius: 11px; background: #fff; }
.broadcast-channel-tabs > button { display: inline-flex; min-height: 37px; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; color: #817a71; background: transparent; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; }
.broadcast-channel-tabs > button svg { width: 14px; height: 14px; }
.broadcast-channel-tabs > button:hover { color: #555723; background: #f8f8f4; }
.broadcast-channel-tabs > button.is-active { border-color: #e9e9da; color: #50511b; background: #f7f7ec; box-shadow: 0 1px 2px #3b3c180b; }
.broadcast-channel-unavailable { margin-left: auto; padding: 6px 9px; border: 1px solid #eee8dc; border-radius: 7px; color: #987b4e; background: #fffbf3; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; }
.broadcast-page-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(330px,.8fr); align-items: start; gap: 13px; }
.broadcast-composer-panel, .broadcast-side-panel { min-width: 0; padding: 16px; border: 1px solid #e1e9e3; border-radius: 13px; background: #fff; box-shadow: 0 7px 25px #30311307; }
.broadcast-composer-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 13px; padding-bottom: 13px; border-bottom: 1px solid #edf1ed; }
.broadcast-composer-title > div { display: grid; gap: 3px; }
.broadcast-composer-title .eyebrow, .broadcast-side-heading .eyebrow { margin: 0; color: #899692; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .11em; }
.broadcast-composer-title h2, .broadcast-side-heading h2 { margin: 0; color: #4c4c2a; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: -.035em; }
.broadcast-composer-title p:not(.eyebrow) { margin: 1px 0 0; color: #918c85; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form { display: grid; gap: 11px; }
.broadcast-composer-form[hidden] { display: none !important; }
.broadcast-composer-form > label, .broadcast-composer-form .broadcast-audience-grid > label, .broadcast-composer-form .broadcast-contact-selector > label { display: grid; min-width: 0; gap: 5px; color: #78735f; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.broadcast-composer-form input, .broadcast-composer-form select, .broadcast-composer-form textarea, .template-manager-form input, .template-manager-form textarea { width: 100%; min-width: 0; border: 1px solid #dce6e0; border-radius: 8px; color: #585835; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 520; }
.broadcast-composer-form input, .broadcast-composer-form select, .template-manager-form input { min-height: 37px; padding: 0 10px; }
.broadcast-composer-form textarea, .template-manager-form textarea { padding: 10px; resize: vertical; line-height: 1.55; }
.broadcast-composer-form input::placeholder, .broadcast-composer-form textarea::placeholder, .template-manager-form input::placeholder { color: #a1aeaa; }
.broadcast-composer-form input:focus, .broadcast-composer-form select:focus, .broadcast-composer-form textarea:focus, .template-manager-form input:focus, .template-manager-form textarea:focus { border-color: #c0c181; outline: 3px solid #d1d39c1c; }
.broadcast-audience-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.campaign-template-select { display: flex; align-items: end; gap: 8px; }
.campaign-template-select > label { min-width: 0; flex: 1; }
.campaign-template-select select { margin-top: 5px; }
.campaign-template-select .campaign-panel-link { min-height: 36px; }
.broadcast-contact-selector { display: grid; gap: 8px; padding: 10px; border: 1px solid #e6ece7; border-radius: 9px; background: #fcfcf9; }
.broadcast-contact-selector > small { color: #85938f; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.broadcast-contact-results { display: grid; max-height: 190px; overflow: auto; border: 1px solid #e6ece8; border-radius: 7px; background: #fff; }
.broadcast-contact-result { display: grid; grid-template-columns: 16px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 48px; padding: 6px 9px; border-bottom: 1px solid #edf1ed; cursor: pointer; }
.broadcast-contact-result:last-child { border-bottom: 0; }
.broadcast-contact-result input { width: 14px; min-height: 14px; accent-color: #5f6117; }
.broadcast-contact-result > span { display: grid; min-width: 0; gap: 3px; }
.broadcast-contact-result strong { overflow: hidden; color: #666245; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.broadcast-contact-result small, .broadcast-contact-result em { overflow: hidden; color: #99928b; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-contact-result em { max-width: 94px; color: #6e703b; text-align: right; }
.broadcast-contact-result.is-disabled { cursor: not-allowed; opacity: .55; }
.broadcast-contact-empty { padding: 12px; color: #98928b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: center; }
.broadcast-selected-contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: #938d84; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-selected-contacts button { max-width: 190px; overflow: hidden; padding: 5px 7px; border: 1px solid #dfe9e3; border-radius: 15px; color: #736453; background: #fff; font: inherit; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.broadcast-email-live-preview { overflow: hidden; border: 1px solid #e4ebe6; border-radius: 9px; background: #fafaf7; }
.broadcast-email-live-preview > div { display: grid; gap: 4px; padding: 9px 11px; }
.broadcast-email-live-preview > div span, .campaign-preview-label { color: #98918b; font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 790; letter-spacing: .12em; }
.broadcast-email-live-preview > div strong { overflow: hidden; color: #69624c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.broadcast-email-live-preview iframe { display: block; width: 100%; height: 245px; border: 0; border-top: 1px solid #e7ede8; background: #fff; }
.broadcast-review-card { display: grid; gap: 11px; padding: 13px; border: 1px solid #eaeadb; border-radius: 10px; background: linear-gradient(150deg,#fbfbf5,#fff 76%); }
.broadcast-review-card[hidden] { display: none !important; }
.broadcast-review-head { display: flex; align-items: center; gap: 9px; }
.broadcast-review-check { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #585a1c; background: #f2f2e4; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; }
.broadcast-review-head > div { min-width: 0; }
.broadcast-review-head strong { color: #5c5d38; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-review-head p { overflow: hidden; margin: 3px 0 0; color: #80908b; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.broadcast-review-count { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; column-gap: 8px; padding: 10px; border: 1px solid #e4ece5; border-radius: 8px; background: #fff; }
.broadcast-review-count strong { color: #54561d; font-size: calc(25px * var(--portal-text-scale)); letter-spacing: -.05em; }
.broadcast-review-count span { color: #716657; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; }
.broadcast-review-count small { grid-column: 1/-1; color: #8c9995; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-email-review-frame { display: block; width: 100%; height: 310px; border: 1px solid #e5ece7; border-radius: 7px; background: #fff; }
.broadcast-schedule-row { display: flex; align-items: end; gap: 9px; }
.broadcast-schedule-row label { display: grid; flex: 1; gap: 5px; color: #7c7664; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.broadcast-schedule-row > span { padding-bottom: 10px; color: #93a09c; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-review-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.broadcast-review-actions button { min-height: 33px; padding: 0 10px; border: 1px solid #e7e7d9; border-radius: 7px; color: #6c6d43; background: #fff; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; }
.broadcast-review-actions .campaign-action-primary { border-color: #5a5c12; color: #fff; background: #5a5c12; }
.broadcast-review-actions button:disabled { cursor: not-allowed; opacity: .48; }
.broadcast-feedback, .broadcast-action-feedback { margin: 0; color: #66827a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-feedback.is-error { color: #a65349; }
.broadcast-side-heading { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 9px; padding-bottom: 12px; border-bottom: 1px solid #edf1ed; }
.broadcast-side-heading .eyebrow, .broadcast-side-heading h2 { grid-column: 1; }
.broadcast-side-heading .campaign-panel-link { grid-column: 2; grid-row: 1 / 3; }
.broadcast-filter-tabs { display: flex; gap: 4px; margin: 11px 0; }
.broadcast-filter-tabs button { min-height: 27px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; color: #918a83; background: transparent; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.broadcast-filter-tabs button.is-active { border-color: #dfe9e2; color: #5d5e2c; background: #f7f8f3; }
.broadcast-channel-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #56571d; background: #f7f7ec; }
.broadcast-channel-icon svg { width: 13px; height: 13px; }
.broadcast-channel-icon.whatsapp { color: #6a6c3b; background: #f7f7eb; }
.broadcast-progress { height: 4px; overflow: hidden; margin-top: 9px; border-radius: 9px; background: #edf2ee; }
.broadcast-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5d6010,#939543); transition: width .3s ease; }
.broadcast-progress-copy { display: block; margin-top: 5px; color: #879590; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-empty { display: grid; min-height: 120px; align-content: center; justify-items: center; padding: 16px; border: 1px dashed #e1e9e3; border-radius: 9px; color: #85938f; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: center; }
.broadcast-history-empty strong { color: #6e6353; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-empty p { max-width: 220px; margin: 5px 0 0; line-height: 1.5; }
.email-rich-editor { overflow: hidden; border: 1px solid #dce6e0; border-radius: 9px; background: #fff; }
.email-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid #e7ede8; background: #fafaf7; }
.email-editor-toolbar > button { min-width: 28px; min-height: 27px; padding: 0 7px; border: 1px solid transparent; border-radius: 5px; color: #7a7262; background: transparent; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.email-editor-toolbar > button:hover { border-color: #e7e8dc; color: #54551d; background: #fff; }
.email-editor-toolbar > button[data-email-command="bold"] { font-weight: 850; }
.email-editor-toolbar > button[data-email-command="italic"] { font-style: italic; }
.email-editor-toolbar > button[data-email-command="underline"] { text-decoration: underline; }
.email-editor-toolbar > span { flex: 1; }
.email-editor-visual { min-height: 190px; max-height: 430px; overflow: auto; padding: 14px; color: #605b43; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.65; outline: 0; }
.email-editor-visual:empty::before { color: #a3afaa; content: attr(data-placeholder); pointer-events: none; }
.email-editor-visual:focus { box-shadow: inset 0 0 0 2px #d9dab055; }
.email-editor-visual h2 { margin: 0 0 9px; color: #4d4e29; font-size: calc(18px * var(--portal-text-scale)); }
.email-editor-visual p { margin: 0 0 9px; }
.email-editor-visual a { color: #5d5f0f; }
.email-editor-source { display: block; width: 100%; min-height: 190px; max-height: 430px; overflow: auto; padding: 12px; border: 0; border-radius: 0; color: #565730; background: #fcfcfa; font-family: ui-monospace,Consolas,monospace; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; resize: vertical; }
.email-editor-source[hidden] { display: none !important; }
.email-editor-foot { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-top: 1px solid #edf1ed; color: #97a29f; background: #fcfcfa; font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-editor-helper { margin: 0; color: #948d87; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.template-manager-tabs { display: flex; gap: 5px; padding: 10px 18px 0; }
.template-manager-tabs button { min-height: 30px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; color: #81908c; background: transparent; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.template-manager-tabs button[aria-pressed="true"] { border-color: #eaebdd; color: #5a5b28; background: #f8f8f1; }
.template-manager-head { display: flex; flex: 0 0 auto; justify-content: flex-end; padding: 9px 12px 0; }
.template-manager-head .contact-dialog-close { width: 32px; height: 32px; }
.email-template-dialog { width: min(1120px,calc(100vw - 28px)); max-width: 1120px; padding: 0; border: 1px solid #dfe8e2; border-radius: 15px; color: var(--text); background: #fff; box-shadow: 0 25px 100px #191b0644; }
.email-template-dialog::backdrop { background: #191b0672; backdrop-filter: blur(3px); }
.email-template-dialog[open] { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100dvh - 28px); }
.template-manager-body { display: grid; min-height: 0; flex: 1 1 auto; grid-template-columns: minmax(200px,.7fr) minmax(0,1.3fr); gap: 13px; overflow: auto; padding: 14px 18px 18px; }
.template-manager-body[hidden] { display: none !important; }
.template-manager-list { align-self: start; overflow: hidden; border: 1px solid #e3ebe5; border-radius: 9px; background: #fcfcfa; }
.template-manager-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-bottom: 1px solid #e8eee9; }
.template-manager-list-head strong { color: #706654; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.template-list-heading-note { display: block; padding: 0 10px 9px; color: #85928e; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.template-manager-list-head .contact-create-button { min-height: 28px; padding: 0 8px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.template-list-items { display: grid; max-height: 390px; overflow: auto; padding: 5px; }
.template-list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 9px; border: 1px solid transparent; border-radius: 7px; color: #6d6750; background: transparent; text-align: left; cursor: pointer; }
.template-list-item:hover, .template-list-item.is-selected { border-color: #eaeadf; background: #fff; }
.template-list-item > span { display: grid; min-width: 0; gap: 3px; }
.template-list-item strong { overflow: hidden; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.template-list-item small { color: #909d98; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.template-list-item i { color: #bd9651; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; }
.template-list-empty { padding: 14px; color: #8a9793; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.template-manager-form { display: flex; min-width: 0; flex-direction: column; gap: 9px; }
.template-manager-fields { display: grid; min-height: 0; gap: 9px; }
.template-manager-fields > label { display: grid; gap: 5px; color: #756f5d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.sms-character-count { display: block; color: #82918c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; line-height: 1.4; }
.sms-character-count.is-over-limit { color: #a65349; font-weight: 760; }
.sms-link-shortening-note { display: inline-flex; min-height: 22px; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #d9e9e0; border-radius: 99px; color: #477761; background: #f4f9f6; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; line-height: 1.35; }
.sms-link-shortening-note > span { color: #548b6c; font-size: 10px; }
.broadcast-composer-form textarea.is-over-limit, .template-manager-form textarea.is-over-limit, .automation-step-fields textarea.is-over-limit { border-color: #d99489; outline-color: rgba(199, 104, 91, .18); }
.template-manager-fields > label textarea { min-height: 260px; font-family: ui-monospace,Consolas,monospace; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.template-manager-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; padding: 9px 0 0; border-top: 1px solid #edf1ed; }
.template-manager-actions button { min-height: 33px; }
.template-variable-reference { border: 1px solid #e3eae4; border-radius: 8px; color: #746b5c; background: #fcfcfa; }
.template-variable-reference > summary { display: flex; min-height: 34px; align-items: center; padding: 0 10px; color: #655844; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; }
.template-variable-content { display: grid; gap: 8px; padding: 0 10px 10px; }
.template-variable-group { display: grid; grid-template-columns: 100px minmax(0,1fr); align-items: start; gap: 8px; }
.template-variable-group > span { padding-top: 4px; color: #899892; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.template-variable-group > div { display: flex; flex-wrap: wrap; gap: 4px; }
.template-variable-group code, .template-variable-note code { padding: 2px 5px; border: 1px solid #e4eae4; border-radius: 5px; color: #5d523e; background: #fff; font-family: ui-monospace,Consolas,monospace; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); overflow-wrap: anywhere; }
.template-variable-note { margin: 0; color: #83908b; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.template-preview-button { min-height: 33px; padding: 0 11px; border: 1px solid #222; border-radius: 8px; color: #111; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; }
.template-preview-button:hover { background: #f3f5f2; }
.template-preview-button:focus-visible, .template-preview-foot button:focus-visible { outline: 3px solid #d1d43c; outline-offset: 2px; }
.template-preview-dialog { width: min(920px,calc(100vw - 28px)); max-width: 920px; padding: 0; border: 1px solid #dfe8e2; border-radius: 15px; color: var(--text); background: #fff; box-shadow: 0 25px 100px #191b0666; }
.template-preview-dialog::backdrop { background: #191b0688; backdrop-filter: blur(4px); }
.template-preview-dialog[open] { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100dvh - 28px); }
.template-preview-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #edf1ed; }
.template-preview-head .eyebrow { margin: 0 0 4px; color: #918b82; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .1em; }
.template-preview-head h2 { margin: 0; color: #4b4d2a; font-size: calc(17px * var(--portal-text-scale)); letter-spacing: -.03em; }
.template-preview-content { min-height: 160px; flex: 1 1 auto; overflow: auto; padding: 16px 18px; }
.template-preview-frame { display: block; width: 100%; height: min(68dvh,680px); border: 1px solid #e0e9e3; border-radius: 8px; background: #fff; }
.template-preview-whatsapp { width: min(100%,440px); min-height: 135px; margin-left: auto; padding: 14px; border: 1px solid #e6e7d7; border-radius: 12px 12px 3px 12px; color: #565737; background: #f4f4e6; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.template-preview-foot { display: flex; justify-content: flex-end; flex: 0 0 auto; padding: 0 18px 16px; }
.campaign-editor-feedback[hidden], .broadcast-feedback[hidden] { display: none; }
.dashboard-broadcast-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.dashboard-broadcast-list { min-height: 180px; padding: 0 17px 16px; }

@media (max-width: 760px) {
  .broadcast-page-grid { grid-template-columns: minmax(0,1fr); }
  .broadcast-composer-panel, .broadcast-side-panel { padding: 12px; }
  .broadcast-channel-tabs { overflow-x: auto; }
  .broadcast-channel-tabs > button { flex: 0 0 auto; padding-inline: 9px; }
  .broadcast-channel-unavailable { flex: 0 0 auto; margin-left: 0; }
  .broadcast-schedule-row { align-items: stretch; flex-direction: column; }
  .broadcast-schedule-row > span { padding-bottom: 0; }
  .email-template-dialog[open] { max-height: calc(100dvh - 18px); }
  .template-manager-head { padding: 6px 9px 0; }
  .template-manager-body { grid-template-columns: minmax(0,1fr); gap: 9px; padding: 9px 12px 14px; }
  .template-manager-list { max-height: 180px; }
  .template-list-items { max-height: 120px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .template-manager-fields > label textarea { min-height: 190px; }
  .template-variable-group { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .template-preview-dialog[open] { max-height: calc(100dvh - 18px); }
  .template-preview-head { padding: 12px 14px; }
  .template-preview-content { padding: 12px 14px; }
  .template-preview-frame { height: 64dvh; }
  .template-preview-foot { padding: 0 14px 12px; }
  .dashboard-broadcast-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .template-launchbar { align-items: flex-start; }
}

@media (max-width: 760px) {
  .dashboard-report-content { padding: 12px; }
  .dashboard-report-tabs { padding-inline: 7px; }
  .dashboard-report-tab { min-height: 34px; padding-inline: 9px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-report-grid { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .dashboard-chart-panel { grid-column: auto; }
  .dashboard-email-toolbar { align-items: flex-start; flex-direction: column; }
  .dashboard-periods { width: 100%; }
  .dashboard-period-button { flex: 1; }
  .dashboard-email-consent { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .dashboard-email-consent > div { padding: 9px; }
  .dashboard-ranked-list li { grid-template-columns: minmax(0,1fr) 55px 55px; gap: 6px; }
  .report-callout { align-items: flex-start; flex-wrap: wrap; }
  .report-callout button { margin-left: 36px; }
  .contact-email-activity { padding: 11px; }
  .contact-email-activity-list li { grid-template-columns: 55px minmax(0,1fr); }
  .contact-email-activity-list time { grid-column: 2; }
}

/* Campaign management uses one full-width workspace per task. */
.campaigns-panels { display: block; margin-top: 10px; }
.campaign-view-tabs { display: flex; width: fit-content; max-width: 100%; gap: 4px; margin: 14px 0 10px; padding: 4px; border: 1px solid #dfe8e4; border-radius: 10px; background: #f6f8f5; }
.campaign-view-tabs button { display: inline-flex; min-width: 142px; min-height: 38px; align-items: center; justify-content: center; gap: 9px; padding: 0 13px; border: 0; border-radius: 7px; color: #868470; background: transparent; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.campaign-view-tabs button small { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 99px; color: #8e897d; background: #e9eeea; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.campaign-view-tabs button.is-active { color: #787706; background: #fff; box-shadow: 0 1px 4px rgba(51, 51, 17, .1); }
.campaign-view-tabs button.is-active small { color: #787706; background: #fcfce9; }
.campaign-view-tabs button:focus-visible, .dispatch-create-button:focus-visible, .broadcast-composer-dialog button:focus-visible { outline: 3px solid #d1d43c; outline-offset: 2px; }
.campaign-view-panel[hidden] { display: none !important; }
.campaign-view-panel { min-width: 0; }
.campaign-view-panel > .campaign-panel { width: 100%; }
.campaign-view-panel .campaign-panel-heading { min-height: 88px; padding: 17px 20px; }
.campaign-view-panel .campaign-panel-heading .eyebrow { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-panel-heading h2 { font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-panel-heading > div > p:last-child { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-panel-link, .campaign-view-panel .contact-create-button { min-height: 36px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-list-toolbar { min-height: 52px; padding: 8px 16px; }
.campaign-view-panel .campaign-filter-tabs button { min-height: 31px; padding-inline: 12px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-list-search { width: min(290px, 42%); min-height: 35px; }
.campaign-view-panel .campaign-panel-content { min-height: 150px; }
.campaign-view-panel .campaign-record { padding: 17px 20px 15px; }
.campaign-view-panel .campaign-record-kicker { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-record h3 { font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-record-heading p { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-record-metrics small { font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-record-metrics strong { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-status { min-height: 24px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-audience-row { min-height: 64px; }
.campaign-view-panel .campaign-audience-name strong { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-audience-name small, .campaign-view-panel .campaign-audience-count small { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-view-panel .campaign-footnote, .campaign-view-panel .campaign-empty p { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

/* Disparos opens on results and channel choices; the long composer is on demand. */
.broadcast-workspace { display: grid; gap: 17px; }
.dispatch-section-heading, .dispatch-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dispatch-section-heading { margin-bottom: -5px; }
.dispatch-section-heading > div, .dispatch-results-heading > div:first-child { display: grid; gap: 4px; }
.dispatch-section-heading .eyebrow, .dispatch-results-heading .eyebrow { margin: 0; color: #918b81; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .11em; }
.dispatch-section-heading h2, .dispatch-results-heading h2 { margin: 0; color: #444524; font-size: calc(17px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.dispatch-section-heading p:not(.eyebrow), .dispatch-results-heading p:not(.eyebrow) { margin: 0; color: #939082; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dispatch-section-heading .campaign-panel-link, .dispatch-results-heading .campaign-panel-link { min-height: 36px; padding-inline: 12px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dispatch-section-heading .campaign-panel-link svg, .dispatch-results-heading .campaign-panel-link svg { width: 14px; height: 14px; }
.dispatch-channel-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.dispatch-channel-grid.is-two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.dispatch-channel-card { display: grid; min-width: 0; min-height: 205px; grid-template-rows: auto 1fr auto; gap: 13px; padding: 17px; border: 1px solid #dfe8e4; border-radius: 13px; background: #fff; box-shadow: 0 5px 18px rgba(51, 52, 14, .035); }
.dispatch-channel-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.dispatch-channel-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #f1f0d0; border-radius: 11px; color: #787706; background: #fcfce9; }
.dispatch-channel-icon svg { width: 17px; height: 17px; }
.dispatch-channel-state { display: inline-flex; max-width: 68%; min-height: 25px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #eadfcb; border-radius: 99px; color: #967546; background: #fffaf1; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; white-space: nowrap; }
.dispatch-channel-state i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.dispatch-channel-state.is-ready { border-color: #e8e9d4; color: #62632d; background: #f8f8f2; }
.dispatch-channel-copy .eyebrow { margin: 0 0 5px; color: #979089; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .1em; }
.dispatch-channel-copy h2 { margin: 0; color: #4b4c2e; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.025em; }
.dispatch-channel-copy p:not(.eyebrow) { max-width: 320px; margin: 5px 0 0; color: #8d897b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dispatch-create-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 11px; border: 1px solid #e0e0ce; border-radius: 8px; color: #545511; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; transition: .15s ease; }
.dispatch-create-button:hover:not(:disabled) { border-color: #b3b65e; color: #525305; background: #f9f9f1; }
.dispatch-create-button svg { width: 14px; height: 14px; }
.dispatch-sms-card.is-unavailable, .dispatch-email-card.is-unavailable { border-style: dashed; background: #f7f8f5; }
.dispatch-email-card.is-unavailable .dispatch-create-button { justify-content: center; color: #98948c; background: #f5f6f3; cursor: not-allowed; }
.dispatch-sms-card.is-unavailable .dispatch-create-button { justify-content: center; color: #98948c; background: #f5f6f3; cursor: not-allowed; }
.dispatch-create-button:disabled { opacity: .8; }
.broadcast-history-panel { min-width: 0; border: 1px solid #dfe8e4; border-radius: 13px; background: #fff; box-shadow: 0 5px 18px rgba(51, 52, 14, .025); }
.dispatch-results-heading { min-height: 72px; padding: 14px 18px; border-bottom: 1px solid #e9efeb; }
.broadcast-history-panel .dispatch-results-heading { border-bottom: 1px solid #e9efeb; }
.broadcast-filter-tabs { display: inline-flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid #e3e9e4; border-radius: 9px; background: #f6f8f5; }
.broadcast-filter-tabs button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 6px; color: #888574; background: transparent; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; cursor: pointer; }
.broadcast-filter-tabs button.is-active { color: #585a0d; background: #fff; box-shadow: 0 1px 3px rgba(46, 46, 15, .1); }
.broadcast-history-empty { min-height: 150px; padding: 22px; border: 0; border-radius: 0; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-empty strong { font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-empty p { max-width: 360px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

.broadcast-composer-dialog { width: min(980px,calc(100vw - 32px)); height: min(860px,calc(100dvh - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid #e4e5d8; border-radius: 16px; color: #565736; background: #fff; box-shadow: 0 24px 80px rgba(31, 32, 5, .24); }
.broadcast-composer-dialog::backdrop { background: rgba(26, 25, 5,.48); backdrop-filter: blur(3px); }
.broadcast-composer-dialog[open] { display: flex; flex-direction: column; }
.broadcast-composer-title { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 15px; margin: 0; padding: 20px 23px 17px; border-bottom: 1px solid #e8eeea; }
.broadcast-composer-title > div:first-child { display: grid; gap: 4px; }
.broadcast-composer-title .eyebrow { margin: 0; color: #948e85; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .11em; }
.broadcast-composer-title h2 { margin: 0; color: #454625; font-size: calc(20px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.04em; }
.broadcast-composer-title p:not(.eyebrow) { margin: 0; color: #918e7e; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-head-actions { display: flex; align-items: center; gap: 8px; }
.broadcast-composer-head-actions .campaign-panel-link { min-height: 34px; }
.broadcast-composer-scroll { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; padding: 15px 22px 20px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.broadcast-composer-dialog .broadcast-channel-tabs { display: inline-flex; width: fit-content; gap: 4px; margin: 0 0 12px; padding: 4px; border: 1px solid #dfe8e4; border-radius: 9px; background: #f5f8f5; }
.broadcast-composer-dialog .broadcast-channel-tabs button { display: inline-flex; min-height: 35px; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 6px; color: #898675; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.broadcast-composer-dialog .broadcast-channel-tabs button.is-active { color: #5a5c0a; background: #fff; box-shadow: 0 1px 4px rgba(46, 47, 14, .1); }
.broadcast-composer-dialog .broadcast-channel-tabs svg { width: 14px; height: 14px; }
.broadcast-composer-dialog .broadcast-whatsapp-panel { margin-bottom: 14px; padding: 12px 14px; }
.broadcast-composer-dialog .broadcast-whatsapp-panel .eyebrow { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-dialog .broadcast-whatsapp-panel h2 { font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-dialog .broadcast-whatsapp-panel p:not(.eyebrow) { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 15px; }
.broadcast-composer-form > label, .broadcast-composer-form .broadcast-audience-grid > label, .broadcast-composer-form .broadcast-contact-selector > label { gap: 6px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form input, .broadcast-composer-form select, .broadcast-composer-form textarea { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form > .broadcast-audience-grid, .broadcast-composer-form > .broadcast-contact-selector, .broadcast-composer-form > .campaign-template-select, .broadcast-composer-form > .email-rich-editor, .broadcast-composer-form > .campaign-editor-helper, .broadcast-composer-form > .broadcast-email-live-preview, .broadcast-composer-form > .broadcast-schedule-row, .broadcast-composer-form > .broadcast-feedback, .broadcast-composer-form > .broadcast-review-card { grid-column: 1 / -1; }
#broadcastEmailForm > label:nth-of-type(3), #broadcastWhatsappForm > label:nth-of-type(2) { grid-column: 1 / -1; }
#broadcastWhatsappForm > label:first-of-type, #broadcastWhatsappForm > .broadcast-contact-selector, #broadcastWhatsappForm > .campaign-template-select, #broadcastWhatsappForm > .broadcast-schedule-row, #broadcastWhatsappForm > button, #broadcastWhatsappForm > .broadcast-feedback, #broadcastWhatsappForm > .broadcast-review-card { grid-column: 1 / -1; }
.broadcast-composer-form .email-editor-visual { min-height: 190px; }
.broadcast-composer-form .email-editor-toolbar { flex-wrap: wrap; }
.broadcast-composer-form .broadcast-email-live-preview { margin: 0; }
.broadcast-composer-form .broadcast-email-live-preview iframe { height: 230px; }
.broadcast-composer-form > .contact-create-button { justify-self: start; min-height: 39px; padding-inline: 15px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px max(12px,env(safe-area-inset-bottom)); border-top: 1px solid #e5ece7; background: #fff; }
.broadcast-composer-footer > span { color: #928e84; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-footer .campaign-action-secondary { min-height: 34px; padding-inline: 13px; }

@media (max-width: 980px) {
  .dispatch-channel-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dispatch-sms-card { grid-column: 1 / -1; justify-self: center; width: min(100%,calc((100% - 12px) / 2)); }
}
@media (max-width: 760px) {
  .campaign-view-tabs { width: 100%; }
  .campaign-view-tabs button { min-width: 0; flex: 1; }
  .campaign-view-panel .campaign-panel-heading { align-items: flex-start; flex-direction: column; }
  .campaign-view-panel .campaign-list-toolbar { align-items: stretch; flex-direction: column; }
  .campaign-view-panel .campaign-list-search { width: 100%; }
  .dispatch-section-heading, .dispatch-results-heading { align-items: flex-start; flex-direction: column; }
  .dispatch-section-heading .campaign-panel-link, .dispatch-results-heading .campaign-panel-link { align-self: flex-start; }
  .dispatch-channel-grid, .dispatch-channel-grid.is-two { grid-template-columns: minmax(0,1fr); }
  .dispatch-channel-card { min-height: 180px; }
  .dispatch-sms-card { grid-column: auto; justify-self: stretch; width: auto; }
  .broadcast-history-panel .dispatch-results-heading { gap: 10px; }
  .broadcast-filter-tabs { max-width: 100%; }
  .broadcast-filter-tabs button { flex: 1; padding-inline: 8px; }
  .broadcast-composer-dialog { width: calc(100vw - 14px); height: calc(100dvh - 14px); max-height: calc(100dvh - 14px); border-radius: 13px; }
  .broadcast-composer-title { align-items: flex-start; padding: 15px; }
  .broadcast-composer-title h2 { font-size: calc(17px * var(--portal-text-scale)); }
  .broadcast-composer-head-actions { gap: 5px; }
  .broadcast-composer-head-actions .campaign-panel-link { padding-inline: 8px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .broadcast-composer-scroll { padding: 12px; }
  .broadcast-composer-form { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .broadcast-composer-form > * { grid-column: 1 / -1 !important; }
  .broadcast-composer-footer { padding-inline: 13px; }
  .broadcast-composer-footer > span { max-width: 65%; line-height: 1.4; }
}
@media (max-width: 420px) {
  .dispatch-channel-heading { align-items: flex-start; }
  .dispatch-channel-state { max-width: calc(100% - 50px); font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dispatch-results-heading { padding: 13px; }
  .broadcast-composer-title { gap: 7px; }
  .broadcast-composer-head-actions .campaign-panel-link { font-size: 0; }
  .broadcast-composer-head-actions .campaign-panel-link svg { width: 16px; height: 16px; }
}

/* Disparos: focused navigation, editable dispatch rows, and a three-step composer. */
.broadcast-workspace { gap: 18px; }
.broadcast-workspace-heading { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 14px; min-height: 48px; }
.broadcast-workspace-heading > .broadcast-view-tabs { justify-self: center; }
.broadcast-workspace-heading > .broadcast-workspace-actions, .broadcast-workspace-heading > span:last-child { justify-self: end; }
.broadcast-workspace-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.broadcast-view-tabs { display: flex; width: fit-content; gap: 4px; padding: 4px; border: 1px solid #e0e8e3; border-radius: 12px; background: #edf2ee; }
.broadcast-view-tabs button { display: inline-flex; min-height: 40px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; color: #827b72; background: transparent; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.broadcast-view-tabs button small { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border-radius: 99px; color: #81786f; background: #e2e9e4; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; }
.broadcast-view-tabs button.is-active { color: #535411; background: #fff; box-shadow: 0 2px 7px rgba(51, 52, 19, .09); }
.broadcast-view-tabs button.is-active small { color: #595b10; background: #f2f2e4; }
.broadcast-view-panel { display: grid; gap: 17px; min-width: 0; }
.broadcast-view-panel[hidden] { display: none !important; }
.broadcast-page-message { margin: -6px 0 0; padding: 10px 13px; border: 1px solid #e7e8d4; border-radius: 9px; color: #545622; background: #f8f8ed; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-page-message[hidden] { display: none !important; }
.dispatch-channel-card { min-height: 184px; gap: 10px; padding: 16px; border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.dispatch-channel-card:hover { transform: translateY(-2px); border-color: #dcdcc8; box-shadow: 0 13px 30px rgba(53, 54, 22, .08); }
.dispatch-channel-copy h2 { font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dispatch-channel-copy p:not(.eyebrow) { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dispatch-create-button { min-height: 39px; padding-inline: 13px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-panel { border: 1px solid #e1e9e3; border-radius: 14px; background: #fff; box-shadow: 0 5px 20px rgba(47, 47, 13, .035); }
.broadcast-history-panel .dispatch-results-heading { padding: 16px 18px; }
.broadcast-history-panel { min-width: 0; }
.broadcast-history-panel .dispatch-results-heading { align-items: center; border-bottom: 1px solid #e8eeea; }
.broadcast-history-tools { display: flex; align-items: center; gap: 9px; }
.broadcast-history-tools .campaign-list-search { width: 190px; min-height: 35px; }
.broadcast-filter-tabs { gap: 2px; padding: 3px; border-radius: 9px; }
.broadcast-filter-tabs button { min-height: 30px; padding-inline: 10px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-empty { min-height: 130px; display: grid; align-content: center; justify-items: center; gap: 5px; padding: 22px; text-align: center; }
.broadcast-history-empty strong { color: #5f5441; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-empty p { margin: 0; color: #82908c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.campaign-audience-panel { overflow: hidden; }
.broadcast-view-panel .campaign-panel-heading { min-height: 86px; padding: 17px 20px; }
.broadcast-view-panel .campaign-panel-heading h2 { font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-view-panel .campaign-panel-heading p:last-child { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

.broadcast-composer-dialog { width: min(1080px,calc(100vw - 34px)); height: min(850px,calc(100dvh - 34px)); max-height: calc(100dvh - 34px); border-color: #dce7e0; border-radius: 18px; background: #f6f8f5; box-shadow: 0 30px 100px rgba(27, 28, 4, .3); }
.broadcast-composer-dialog::backdrop { background: rgba(25, 25, 4,.58); backdrop-filter: blur(5px); }
.broadcast-composer-title { min-height: 82px; padding: 18px 25px; border: 0; background: #fff; }
.broadcast-composer-title h2 { font-size: calc(22px * var(--portal-text-scale)); }
.broadcast-composer-title p:not(.eyebrow) { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-title .eyebrow { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: .13em; }
.broadcast-composer-head-actions .campaign-panel-link { min-height: 37px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-head-actions .campaign-panel-link svg { width: 15px; height: 15px; }
.broadcast-composer-progress { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 9px; padding: 14px 20px; border-bottom: 1px solid #e6ece7; background: #fff; }
.broadcast-composer-progress > i { width: clamp(22px,7vw,78px); height: 1px; background: #dce5df; }
.broadcast-composer-progress button { display: inline-flex; align-items: center; gap: 8px; padding: 4px; border: 0; color: #8a9691; background: transparent; font: inherit; cursor: pointer; }
.broadcast-composer-progress button span { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #dbe4dd; border-radius: 50%; color: #81908a; background: #fafaf7; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; }
.broadcast-composer-progress button strong { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.broadcast-composer-progress button[aria-current="step"] { color: #555711; }
.broadcast-composer-progress button[aria-current="step"] span { border-color: #5a5c11; color: #fff; background: #5a5c11; box-shadow: 0 0 0 4px #f0f0e1; }
.broadcast-composer-progress button.is-complete span { border-color: #cccca2; color: #545518; background: #f7f7ec; }
.broadcast-composer-progress button:disabled { cursor: default; }
.broadcast-composer-scroll { padding: 22px 25px 25px; background: linear-gradient(180deg,#f6f8f5,#f4f7f4); }
.broadcast-composer-form { display: block; width: min(970px,100%); margin: 0 auto; }
.broadcast-composer-form[hidden], .broadcast-composer-step[hidden] { display: none !important; }
.broadcast-composer-step { padding: 25px 27px; border: 1px solid #e0e9e2; border-radius: 15px; background: #fff; box-shadow: 0 9px 25px rgba(47, 48, 17, .045); }
.broadcast-step-intro { display: flex; align-items: center; gap: 13px; margin-bottom: 23px; }
.broadcast-step-intro > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid #e9ead5; border-radius: 13px; color: #565818; background: #f7f8ee; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; }
.broadcast-step-intro > div { display: grid; gap: 3px; }
.broadcast-step-intro .eyebrow { margin: 0; color: #7b9189; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .13em; }
.broadcast-step-intro h3 { margin: 0; color: #444524; font-size: calc(19px * var(--portal-text-scale)); font-weight: 750; letter-spacing: -.035em; }
.broadcast-step-intro p:last-child { margin: 0; color: #908982; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-settings-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 14px 18px; align-items: start; }
.broadcast-settings-grid > label, .broadcast-settings-grid .broadcast-email-audience-settings > label, .broadcast-audience-grid > label, .broadcast-content-fields > label { display: grid; gap: 7px; color: #6d6353; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; }
.broadcast-settings-grid input, .broadcast-settings-grid select, .broadcast-audience-grid select, .broadcast-content-fields input, .broadcast-content-fields textarea, .broadcast-review-options input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #dce6df; border-radius: 9px; color: #48492a; background: #fff; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-settings-grid input:focus, .broadcast-settings-grid select:focus, .broadcast-audience-grid select:focus, .broadcast-content-fields input:focus, .broadcast-content-fields textarea:focus, .broadcast-review-options input:focus { border-color: #b2b46e; outline: 3px solid #e6e7cb; outline-offset: 1px; }
.broadcast-email-audience-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.broadcast-email-audience-settings > label:first-child { grid-column: 1 / -1; }
.broadcast-settings-grid .broadcast-audience-grid { grid-column: 1 / -1; gap: 13px; }
.broadcast-settings-grid > .broadcast-contact-selector { grid-column: 1 / -1; margin: 0; padding: 14px; border: 1px solid #e4ebe5; border-radius: 11px; background: #fbfbf8; }
.broadcast-settings-grid .broadcast-contact-selector > label { display: grid; gap: 7px; color: #6d6353; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.broadcast-contact-results { display: grid; max-height: 205px; overflow: auto; margin-top: 10px; border: 1px solid #e6ece7; border-radius: 9px; background: #fff; }
.broadcast-contact-result { min-height: 47px; grid-template-columns: 17px minmax(0,1fr) auto; gap: 10px; padding: 7px 11px; }
.broadcast-contact-result strong { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-contact-result small { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-contact-result em { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-selected-contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; color: #82918c; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-selected-contacts button { min-height: 27px; padding: 0 8px; border: 1px solid #e8e9dc; border-radius: 99px; color: #4d7067; background: #f7f8f3; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.broadcast-consent-note { display: flex; align-items: center; gap: 9px; margin: 18px 0 0; padding: 11px 13px; border: 1px solid #ededdf; border-radius: 9px; color: #667f71; background: #fafaf3; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-consent-note svg { width: 15px; height: 15px; flex: 0 0 auto; color: #75773b; }
.broadcast-audience-locked { display: grid; gap: 4px; margin-top: 14px; padding: 13px 15px; border: 1px solid #eaeadb; border-radius: 10px; color: #516b64; background: #f9faf5; }
.broadcast-audience-locked[hidden] { display: none !important; }
.broadcast-audience-locked strong { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-audience-locked span { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.broadcast-audience-locked small { color: #82918a; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form .broadcast-feedback { margin-top: 11px; padding: 10px 12px; border-radius: 8px; color: #a54d45; background: #fff2ee; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 23px; padding-top: 17px; border-top: 1px solid #edf1ed; }
.broadcast-step-actions > span { color: #8a9792; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-step-actions > button, .broadcast-review-actions > button { min-height: 41px; padding-inline: 15px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-step-actions .campaign-action-secondary { min-height: 39px; }
.broadcast-content-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(270px,.85fr); gap: 20px; align-items: start; }
.broadcast-content-fields { display: grid; gap: 13px; min-width: 0; }
.broadcast-composer-form .campaign-template-select { align-items: end; gap: 10px; margin: 0; }
.broadcast-composer-form .campaign-template-select > label { display: grid; flex: 1; gap: 7px; color: #6d6353; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; }
.broadcast-composer-form .campaign-template-select select { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #dce6df; border-radius: 9px; color: #48492a; background: #fff; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form .campaign-template-select .campaign-panel-link { min-height: 39px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.broadcast-editor-label { margin: 2px 0 -8px; color: #6d6353; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; }
.broadcast-composer-form .email-rich-editor { border-color: #dce6df; border-radius: 10px; }
.broadcast-composer-form .email-editor-toolbar { padding: 7px; background: #fafaf7; }
.broadcast-composer-form .email-editor-toolbar button { min-height: 30px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form .email-editor-visual { min-height: 230px; padding: 15px; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form .email-editor-source { min-height: 230px; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-form .campaign-editor-helper { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.broadcast-email-live-preview { margin: 0; overflow: hidden; border: 1px solid #e0e8e2; border-radius: 11px; background: #fafaf7; }
.broadcast-email-live-preview > div { gap: 5px; padding: 11px 13px; border-bottom: 1px solid #e7ece8; }
.broadcast-email-live-preview > div span, .broadcast-whatsapp-live-preview > span { color: #8a9691; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .1em; }
.broadcast-email-live-preview > div strong { color: #645948; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-email-live-preview iframe { height: 300px; background: #fff; }
.broadcast-personalization-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.broadcast-personalization-tools small { margin-left: auto; color: #8c9994; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.message-variable-picker { position: relative; z-index: 20; flex: 0 0 auto; color: #61593d; }
.message-variable-picker > summary { display: inline-flex; min-height: 28px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #e8e9dc; border-radius: 99px; color: #5e5f2d; background: #fafaf4; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; cursor: pointer; list-style: none; }
.message-variable-picker > summary::-webkit-details-marker { display: none; }
.message-variable-picker > summary::after { width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: rotate(45deg); transition: transform .14s ease; }
.message-variable-picker[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.message-variable-picker > summary:hover { border-color: #d6d5b5; color: #53521a; background: #f8f7ee; }
.message-variable-picker > summary:focus-visible { outline: 3px solid #918d3e44; outline-offset: 2px; }
.message-variable-options { position: absolute; bottom: calc(100% + 5px); left: 0; z-index: 100; display: grid; width: min(300px,calc(100vw - 44px)); max-height: min(280px,46vh); gap: 6px; overflow: auto; padding: 7px; border: 1px solid #dce6e1; border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(41, 41, 9,.16); }
.message-variable-group { display: grid; gap: 2px; }
.message-variable-group > span { padding: 2px 7px; color: #938c84; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.message-variable-group > button { display: flex; min-width: 0; min-height: 31px; align-items: center; justify-content: space-between; gap: 9px; padding: 4px 7px; border: 0; border-radius: 6px; color: #5f5b3f; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.message-variable-group > button:hover, .message-variable-group > button:focus-visible { outline: 0; color: #53511a; background: #f7f6f0; }
.message-variable-group > button > span { overflow: hidden; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.message-variable-group > button > code { flex: 0 1 auto; overflow: hidden; color: #90867c; font-family: ui-monospace,Consolas,monospace; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.broadcast-personalization-tools .message-variable-options, .automation-message-tools .message-variable-options { width: min(360px,calc(100vw - 44px)); max-height: min(260px,42vh); box-shadow: 0 5px 15px rgba(41, 41, 9,.1); }
.broadcast-message-field { display: grid; min-width: 0; gap: 6px; }
.broadcast-content-fields > .broadcast-message-field > label { color: #6d6353; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; }
.sms-message-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.broadcast-email-builder .broadcast-email-variable-picker .message-variable-options { right: 0; left: auto; width: min(340px,calc(100vw - 44px)); max-height: min(240px,40vh); box-shadow: 0 5px 15px rgba(41, 41, 9,.1); }
.broadcast-whatsapp-live-preview { display: grid; align-content: start; gap: 10px; min-height: 230px; padding: 15px; border: 1px solid #e0e8e2; border-radius: 11px; background: linear-gradient(135deg,#f7f7f0,#fafaf7 75%); }
.broadcast-whatsapp-bubble { width: min(100%,360px); min-height: 63px; justify-self: end; padding: 12px 14px; border: 1px solid #e6e7d7; border-radius: 12px 12px 3px 12px; color: #565737; background: #f4f4e6; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 3px 9px rgba(49, 49, 16, .05); }
.whatsapp-message-text p { margin: 0; }
.whatsapp-message-text p + p { margin-top: .7em; }
.whatsapp-message-text ul, .whatsapp-message-text ol { margin: .25em 0; padding-left: 1.4em; }
.whatsapp-message-text li + li { margin-top: .15em; }
.whatsapp-message-text blockquote { margin: .35em 0; padding: .2em 0 .2em .75em; border-left: 3px solid #8eaaa0; color: #536b64; }
.whatsapp-message-text code { padding: .08em .25em; border-radius: 4px; background: rgba(60, 60, 26, .08); font-family: ui-monospace, Consolas, monospace; font-size: .92em; white-space: pre-wrap; }
.whatsapp-message-text a { color: #4b3006; text-decoration: underline; overflow-wrap: anywhere; }
.automation-whatsapp-preview { display: grid; gap: 5px; justify-items: end; padding: 10px 12px; border: 1px solid #e0e8e2; border-radius: 9px; background: #fafaf7; }
.automation-whatsapp-preview > span { justify-self: start; color: #83928d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.automation-whatsapp-preview-bubble { width: min(100%,360px); padding: 10px 12px; border: 1px solid #e6e7d7; border-radius: 12px 12px 3px 12px; color: #565737; background: #f4f4e6; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.broadcast-whatsapp-live-preview > small { color: #83928d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-review-card { margin: 0; padding: 0; border: 0; background: transparent; }
.broadcast-review-card[hidden] { display: none !important; }
.broadcast-review-layout { display: grid; grid-template-columns: minmax(0,1fr) 315px; gap: 20px; align-items: start; }
.broadcast-review-main { display: grid; gap: 13px; min-width: 0; }
.broadcast-review-head { gap: 11px; padding: 14px; border: 1px solid #eaeadb; border-radius: 11px; background: #fafaf4; }
.broadcast-review-head strong { color: #50512d; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-review-head p { margin: 4px 0 0; color: #788b83; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-review-check { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #54561d; background: #f0f0df; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-review-count { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 15px; border: 1px solid #e1e9e3; border-radius: 11px; background: #fff; }
.broadcast-review-count > strong { grid-row: span 2; color: #525311; font-size: calc(29px * var(--portal-text-scale)); line-height: 1; }
.broadcast-review-count > span { color: #665c4c; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 710; }
.broadcast-review-count > small { color: #87938e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-email-review-frame { display: block; width: 100%; height: min(62dvh,600px); min-height: 420px; border: 1px solid #e1e8e2; border-radius: 11px; background: #fff; }
.broadcast-review-options { display: grid; gap: 11px; padding: 16px; border: 1px solid #e0e9e2; border-radius: 12px; background: #fff; }
.broadcast-review-options > .eyebrow { margin: 0; color: #87948e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .11em; }
.broadcast-review-options .broadcast-schedule-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); gap: 9px; margin: 0; }
.broadcast-review-options .broadcast-schedule-row label { display: grid; gap: 6px; color: #786f62; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; }
.broadcast-review-options input { min-height: 40px; padding-inline: 9px; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-schedule-help { color: #8a9691; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-confirm-field { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid #e5ebe6; border-radius: 9px; color: #776d63; background: #fbfbf8; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; line-height: 1.5; cursor: pointer; }
.broadcast-confirm-field input { width: 16px; height: 16px; min-height: auto; flex: 0 0 auto; margin: 0; accent-color: #595a10; }
.broadcast-readiness-note { margin: 0; padding: 10px; border-radius: 8px; color: #836b40; background: #faf5e9; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-review-message { display: grid; gap: 9px; padding: 14px; border: 1px solid #e2ebe3; border-radius: 11px; background: #fff; }
.broadcast-review-message > span { color: #86958e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .1em; }
.broadcast-review-message p { margin: 0; color: #5f5343; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.broadcast-action-feedback { min-height: 16px; margin: 0; color: #9b5145; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.broadcast-review-actions { display: grid; gap: 7px; }
.broadcast-review-actions button { width: 100%; justify-content: center; }
.broadcast-composer-footer { min-height: 55px; padding: 10px 25px; background: #fff; }
.broadcast-composer-footer > span { display: inline-flex; align-items: center; gap: 7px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-composer-footer > span svg { width: 14px; height: 14px; color: #757741; }
.broadcast-composer-footer .campaign-action-secondary { min-height: 35px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

@media (max-width: 1120px) {
}
@media (max-width: 900px) {
  .broadcast-review-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 13px; }
  .broadcast-content-grid { grid-template-columns: minmax(0,1fr) minmax(230px,.8fr); gap: 13px; }
}
@media (max-width: 760px) {
  .broadcast-view-tabs { width: 100%; }
  .broadcast-view-tabs button { flex: 1; justify-content: center; }
  .broadcast-page-message { margin-top: -8px; }
  .broadcast-workspace-heading { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .broadcast-workspace-heading > span:first-child { display: none; }
  .broadcast-workspace-heading > .broadcast-view-tabs { grid-column: 1 / -1; grid-row: 1; width: fit-content; justify-self: center; }
  .broadcast-workspace-heading .broadcast-view-tabs button { flex: 0 0 auto; }
  .broadcast-workspace-heading > .broadcast-workspace-actions, .broadcast-workspace-heading > span:last-child { grid-column: 2; grid-row: 2; }
  .dispatch-section-heading, .dispatch-results-heading { align-items: flex-start; }
  .broadcast-history-panel .dispatch-results-heading { align-items: stretch; flex-direction: column; }
  .broadcast-history-tools { width: 100%; flex-wrap: wrap; }
  .broadcast-history-tools .campaign-list-search { width: 100%; }
  .broadcast-filter-tabs { width: 100%; }
  .broadcast-filter-tabs button { flex: 1; }
  .broadcast-composer-dialog { width: calc(100vw - 14px); height: calc(100dvh - 14px); max-height: calc(100dvh - 14px); border-radius: 14px; }
  .broadcast-composer-title { min-height: 72px; padding: 13px 15px; }
  .broadcast-composer-title h2 { font-size: calc(18px * var(--portal-text-scale)); }
  .broadcast-composer-title p:not(.eyebrow) { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .broadcast-composer-head-actions { gap: 5px; }
  .broadcast-composer-head-actions .campaign-panel-link { min-height: 32px; padding-inline: 8px; font-size: 0; }
  .broadcast-composer-head-actions .campaign-panel-link svg { width: 16px; height: 16px; }
  .broadcast-composer-progress { justify-content: space-around; gap: 4px; padding: 11px 8px; }
  .broadcast-composer-progress > i { width: 14px; }
  .broadcast-composer-progress button { gap: 5px; }
  .broadcast-composer-progress button span { width: 27px; height: 27px; }
  .broadcast-composer-progress button strong { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .broadcast-composer-scroll { padding: 12px; }
  .broadcast-composer-step { padding: 17px 15px; border-radius: 12px; }
  .broadcast-step-intro { gap: 10px; margin-bottom: 17px; }
  .broadcast-step-intro > span { width: 36px; height: 36px; border-radius: 11px; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .broadcast-step-intro h3 { font-size: calc(17px * var(--portal-text-scale)); }
  .broadcast-step-intro p:last-child { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .broadcast-settings-grid, .broadcast-email-audience-settings { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .broadcast-email-audience-settings > label:first-child { grid-column: auto; }
  .broadcast-settings-grid .broadcast-audience-grid { grid-column: 1 / -1; grid-template-columns: minmax(0,1fr); }
  .broadcast-settings-grid > .broadcast-contact-selector { grid-column: 1 / -1; }
  .broadcast-step-actions { align-items: stretch; flex-direction: column-reverse; margin-top: 18px; }
  .broadcast-step-actions > button { width: 100%; justify-content: center; }
  .broadcast-step-actions > span { text-align: center; }
  .broadcast-content-grid, .broadcast-review-layout { grid-template-columns: minmax(0,1fr); }
  .broadcast-email-live-preview iframe { height: 220px; }
  .broadcast-review-options { grid-row: 1; }
  .broadcast-email-review-frame { height: 48dvh; min-height: 340px; }
  .broadcast-review-actions { grid-template-columns: 1fr; }
  .broadcast-composer-footer { padding-inline: 13px; }
  .broadcast-composer-footer > span { max-width: 68%; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
}

/* Seus disparos: the head and every row share the same columns, so everything lines up by
   construction. The panel's own width picks the layout, because the sidebar changes it too. */
.broadcast-history-panel { container: broadcast-history / inline-size; }
.broadcast-history-list { --broadcast-columns: minmax(0,1.2fr) minmax(0,1fr) 104px 312px 124px; display: block; padding: 0; }
.broadcast-history-head, .broadcast-history-row { display: grid; grid-template-columns: var(--broadcast-columns); align-items: center; column-gap: 16px; padding-inline: 18px; }
.broadcast-history-head { min-height: 36px; border-bottom: 1px solid #e8eeea; color: #958e87; background: #fafaf7; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.broadcast-history-head > :last-child { text-align: right; }
.broadcast-history-row { min-height: 64px; padding-block: 9px; border-bottom: 1px solid #edf1ed; background: #fff; transition: background .14s ease; }
.broadcast-history-row:last-child { border-bottom: 0; border-radius: 0 0 14px 14px; }
.broadcast-history-row:hover { background: #fcfcf9; }
.broadcast-history-row strong, .broadcast-history-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-history-row small { color: #918a83; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-ident { display: flex; min-width: 0; align-items: center; gap: 10px; }
.broadcast-history-ident .broadcast-channel-icon { flex: 0 0 auto; }
.broadcast-history-ident > span:last-child, .broadcast-history-audience { display: grid; min-width: 0; gap: 3px; }
.broadcast-history-ident strong { color: #4d4e2f; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.broadcast-history-audience strong { color: #6c6353; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; }
.broadcast-history-status { display: grid; min-width: 0; justify-items: start; gap: 3px; }
/* Status sits nearer the audience; only the picture moves, so the columns keep their places. */
@container broadcast-history (min-width: 901px) {
  .broadcast-history-head > :nth-child(3), .broadcast-history-status { transform: translateX(-26px); }
  .broadcast-history-audience { padding-right: 22px; }
}
.broadcast-history-status .campaign-status { min-height: 23px; padding: 0 9px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-status small { max-width: 100%; }
.broadcast-history-stats { display: grid; min-width: 0; grid-template-columns: repeat(3,minmax(0,1fr)) minmax(0,1.3fr); gap: 8px; }
.broadcast-history-stats > span { display: grid; min-width: 0; gap: 3px; }
.broadcast-history-stats strong { color: #58593a; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; font-variant-numeric: tabular-nums; }
.broadcast-history-stats small { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-history-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.broadcast-history-actions button, .broadcast-row-menu > summary { display: inline-flex; min-height: 29px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid #e1e8e2; border-radius: 7px; color: #776f61; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.broadcast-history-actions button:hover, .broadcast-row-menu > summary:hover, .broadcast-row-menu[open] > summary { border-color: #d6d7b9; color: #555614; background: #fafaf4; }
.broadcast-row-menu { position: relative; }
.broadcast-row-menu > summary { width: 29px; padding: 0; list-style: none; letter-spacing: .04em; }
.broadcast-row-menu > summary::-webkit-details-marker { display: none; }
.broadcast-row-menu-list { position: absolute; top: calc(100% + 4px); right: 0; z-index: 6; display: grid; min-width: 164px; gap: 1px; padding: 4px; border: 1px solid #e1e8e2; border-radius: 9px; background: #fff; box-shadow: 0 8px 24px rgba(47, 47, 13, .1); }
.broadcast-row-menu-list button { width: 100%; justify-content: flex-start; border: 0; border-radius: 6px; white-space: nowrap; }
.broadcast-history-actions button.is-danger { color: #a76058; }
.broadcast-history-actions button.is-danger:hover { color: #a34038; background: #fff7f4; }

/* Narrow panel: no head, each dispatch on two lines. */
@container broadcast-history (max-width: 900px) {
  .broadcast-history-head { display: none; }
  .broadcast-history-row { grid-template-columns: minmax(0,1fr) auto auto; grid-template-areas: "ident status actions" "audience stats stats"; gap: 8px 12px; padding-inline: 15px; }
  .broadcast-history-ident { grid-area: ident; }
  .broadcast-history-audience { grid-area: audience; padding-left: 37px; }
  .broadcast-history-status { grid-area: status; justify-items: end; }
  .broadcast-history-stats { grid-area: stats; width: 312px; }
  .broadcast-history-actions { grid-area: actions; }
}

/* Phone. */
@container broadcast-history (max-width: 560px) {
  .broadcast-history-row { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "ident actions" "audience status" "stats stats"; padding: 11px 13px; }
  .broadcast-history-audience { padding-left: 0; }
  .broadcast-history-stats { width: 100%; }
}
/* Conversation workspace: reveal contact details only when requested from the thread header. */
.conversation-workspace { grid-template-columns: minmax(255px,.9fr) minmax(0,1.5fr); }
.conversation-workspace.has-conversation-details { grid-template-columns: minmax(255px,.9fr) minmax(390px,1.5fr) minmax(210px,.72fr); }
.conversation-new-button { display: inline-flex; min-height: 30px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid #636510; border-radius: 8px; color: #fff; background: #636510; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .14s ease,transform .14s ease; }
.conversation-new-button:hover { transform: translateY(-1px); background: #595b0d; }
.conversation-new-button:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }
.conversation-details-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: auto; border-left: 1px solid #e7eeeb; background: #fff; }
.conversation-details-panel[hidden] { display: none !important; }
.conversation-details-empty { display: grid; min-height: 100%; place-items: center; padding: 18px; color: #99958b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; text-align: center; }
.conversation-contact-profile { display: grid; justify-items: center; gap: 6px; padding: 16px 13px 14px; text-align: center; }
.conversation-contact-profile .conversation-avatar.is-large { width: 54px; height: 54px; border-radius: 17px; }
.conversation-contact-profile > strong { overflow: hidden; max-width: 100%; color: #4c4d2d; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.conversation-contact-profile > .conversation-contact-channel { color: #9a978a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-detail-section { display: grid; min-width: 0; gap: 7px; padding: 11px 13px; border-top: 1px solid #edf1ef; }
.conversation-detail-section .eyebrow { margin: 0; color: #99938a; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .1em; }
.conversation-contact-actions { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.conversation-contact-link { overflow-wrap: anywhere; color: #67683c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-decoration: none; }
.conversation-contact-link:hover { color: #62640f; text-decoration: underline; }
.conversation-copy-button, .conversation-detail-action { justify-self: start; min-height: 25px; padding: 0 8px; border: 1px solid #dfe8e3; border-radius: 7px; color: #746e58; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 640; cursor: pointer; }
.conversation-copy-button:hover, .conversation-detail-action:hover { border-color: #d6d7bd; color: #58591c; background: #fbfbf5; }
.conversation-detail-value { overflow-wrap: anywhere; color: #5d593f; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; line-height: 1.45; }
.conversation-detail-muted { color: #857c71; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.conversation-detail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.conversation-detail-tag { display: inline-flex; max-width: 100%; min-height: 22px; align-items: center; padding: 0 7px; overflow-wrap: anywhere; border: 1px solid #e8e8d7; border-radius: 99px; color: #5c5e2c; background: #f8f8f0; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.conversation-urgency-state { justify-self: center; margin-top: 1px; padding: 5px 9px; border: 1px solid #e3d6c4; border-radius: 99px; color: #81653c; background: #fffaf2; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 690; }
.conversation-urgency-state.is-active { border-color: #edc4b8; color: #a04834; background: #fff1ec; }
.conversation-details-panel button:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }
.conversation-dialog { width: min(520px,calc(100vw - 28px)); max-width: none; max-height: min(720px,calc(100vh - 24px)); overflow: auto; padding: 0; border: 1px solid #dce7e2; border-radius: 16px; color: #444426; background: #fff; box-shadow: 0 24px 80px rgba(30, 31, 5, .3); }
.conversation-dialog-wide { width: min(680px,calc(100vw - 28px)); }
.conversation-dialog::backdrop { background: rgba(26, 25, 5,.56); backdrop-filter: blur(3px); }
.conversation-dialog-form { display: grid; gap: 17px; padding: 19px; }
.conversation-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 13px; border-bottom: 1px solid #e8eeeb; }
.conversation-dialog-head .eyebrow { margin: 0 0 5px; color: #908576; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .13em; }
.conversation-dialog-head h2 { margin: 0; color: #41411f; font-size: calc(18px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.conversation-dialog-head p:not(.eyebrow) { max-width: 500px; margin: 5px 0 0; color: #928c81; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.conversation-dialog-head .contact-dialog-close { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #e1e9e5; border-radius: 8px; color: #827c6d; background: #fff; font-size: calc(18px * var(--portal-text-scale)); cursor: pointer; }
.conversation-dialog-field { display: grid; min-width: 0; gap: 6px; color: #6f6953; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.conversation-dialog-field small { color: #99938b; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; }
.conversation-dialog-field input, .conversation-dialog-field select, .conversation-dialog-field textarea { width: 100%; min-width: 0; min-height: 37px; padding: 9px 10px; border: 1px solid #dce6e1; border-radius: 8px; color: #4b4c2e; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-dialog-field textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.conversation-dialog-field input:focus, .conversation-dialog-field select:focus, .conversation-dialog-field textarea:focus { outline: 2px solid rgba(114, 117, 0, .18); border-color: #adae56; }
.conversation-dialog-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.new-conversation-routing { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; padding: 11px; border: 1px solid #edeee5; border-radius: 10px; background: #fbfbf8; }
.new-conversation-routing .conversation-dialog-field { gap: 5px; }
.new-conversation-routing > .conversation-dialog-field:last-child { grid-column: 1 / -1; max-width: 50%; }
.conversation-dialog-submit { min-height: 36px; padding: 0 13px; border: 1px solid #636510; border-radius: 8px; color: #fff; background: #636510; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.conversation-dialog-submit:hover:not(:disabled) { background: #595b0d; }
.conversation-dialog-submit:disabled { border-color: #dfe7e3; color: #a8a29a; background: #edf2ef; cursor: default; }
.conversation-dialog .contact-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 12px; border-top: 1px solid #edf1ef; }
.conversation-dialog-error { margin: 0; padding: 9px 10px; border: 1px solid #efd6d1; border-radius: 8px; color: #a04e43; background: #fff5f3; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.conversation-dialog-hint { color: #979189; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.handoff-settings-dialog { width: min(620px,calc(100vw - 28px)); max-height: min(820px,calc(100vh - 24px)); }
.handoff-settings-form { gap: 14px; }
.handoff-settings-loading { display: flex; min-height: 90px; flex-direction: column; align-items: center; justify-content: center; color: #7f7768; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.handoff-settings-loading .contact-loader { margin-bottom: 8px; }
.handoff-recipient-section, .handoff-channel-fields, .handoff-confirmation-fields { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 13px; border: 1px solid #e2ebe5; border-radius: 10px; background: #fcfcfa; }
.handoff-recipient-section[hidden] { display: none; }
.handoff-recipient-section legend, .handoff-channel-fields legend, .handoff-confirmation-fields legend { padding: 0 5px; color: #637a71; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .055em; }
.handoff-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #5c5240; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.handoff-section-heading span { color: #879792; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.handoff-staff-list { display: grid; max-height: 190px; gap: 4px; overflow: auto; padding: 2px; overscroll-behavior: contain; }
.handoff-staff-option { display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 8px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.handoff-staff-option:hover { border-color: #e0eae4; background: #fff; }
.handoff-staff-option input, .handoff-channel-toggle input { width: 16px; height: 16px; flex: 0 0 auto; margin: 1px 0 0; accent-color: #5a5b1d; }
.handoff-staff-option input:focus-visible, .handoff-channel-toggle input:focus-visible { outline: 3px solid rgba(90, 91, 29, .2); outline-offset: 2px; }
.handoff-staff-option > span, .handoff-channel-toggle > span { display: grid; min-width: 0; gap: 3px; }
.handoff-staff-option strong, .handoff-channel-toggle strong { color: #555639; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 710; }
.handoff-staff-option small, .handoff-channel-toggle small, .handoff-message-preview small { color: #80908b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.45; overflow-wrap: anywhere; }
.handoff-staff-empty { display: grid; gap: 5px; padding: 11px; border: 1px dashed #dbe5de; border-radius: 8px; color: #6b5f52; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.handoff-staff-empty span { color: #81908b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.handoff-staff-empty a { width: fit-content; color: #585a1a; font-weight: 700; text-decoration: none; }
.handoff-channel-toggle { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.handoff-settings-note { color: #81918b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.handoff-settings-note.is-warning { margin: -4px 0 0 25px; color: #987447; }
.handoff-instance-field { margin-top: 2px; }
.handoff-confirmation-fields > .conversation-dialog-field { max-width: 180px; }
.handoff-message-preview { padding: 11px 12px; border: 1px solid #e3eae5; border-radius: 9px; background: #f8faf8; }
.handoff-message-preview summary { color: #6b6053; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; }
.handoff-message-preview pre { margin: 10px 0; overflow: auto; color: #594e42; font-family: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 500; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.handoff-settings-feedback { margin: 0; padding: 9px 10px; border: 1px solid #e7e7d5; border-radius: 8px; color: #606130; background: #f8f8f2; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.handoff-settings-feedback.is-error { border-color: #efd6d1; color: #a04e43; background: #fff5f3; }
.conversation-tag-editor-list { display: flex; min-height: 46px; flex-wrap: wrap; align-items: center; gap: 7px; padding: 9px; border: 1px solid #e6ede9; border-radius: 9px; background: #f9fbf9; }
.conversation-tag-editor-chip { display: inline-flex; min-height: 25px; align-items: center; gap: 6px; padding: 0 5px 0 9px; border: 1px solid #e6e6d5; border-radius: 99px; color: #5c5e2c; background: #f7f8ee; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 630; }
.conversation-tag-editor-chip button { display: grid; width: 18px; height: 18px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #897e74; background: transparent; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.conversation-tag-editor-chip button:hover { color: #a64f43; background: #fff; }
.conversation-tag-input-row { display: flex; min-width: 0; align-items: center; gap: 8px; }
.conversation-tag-input-row input { flex: 1; }
.new-conversation-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid #e7eeea; border-radius: 10px; background: #f5f8f6; }
.new-conversation-tabs [role="tab"] { flex: 1; min-height: 34px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; color: #857e73; background: transparent; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.new-conversation-tabs [role="tab"].is-active { border-color: #e7e7d9; color: #58591a; background: #fff; box-shadow: 0 1px 3px rgba(51, 51, 18, .06); }
.new-conversation-contact-results { display: grid; max-height: 230px; gap: 3px; overflow: auto; padding: 4px; border: 1px solid #e8eeeb; border-radius: 9px; }
.new-conversation-contact-result { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 8px; border: 0; border-radius: 7px; color: #5e593f; background: #fff; text-align: left; cursor: pointer; }
.new-conversation-contact-result:hover, .new-conversation-contact-result:focus-visible { outline: 0; background: #f8f8f1; }
.new-conversation-contact-result > span:last-child { display: grid; min-width: 0; gap: 3px; }
.new-conversation-contact-result strong, .new-conversation-contact-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-conversation-contact-result strong { color: #515331; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.new-conversation-contact-result small { color: #979289; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.new-conversation-search-state { padding: 12px; border: 1px dashed #dbe6e0; border-radius: 9px; color: #918a81; background: #fcfcf9; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.new-conversation-search-state.is-error { border-color: #ecd6d1; color: #9b6258; background: #fff8f6; }
.new-conversation-selected-contact { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 9px; border: 1px solid #e8e9dc; border-radius: 9px; background: #fbfbf7; }
.new-conversation-selected-contact > img, .new-conversation-selected-contact > span:first-child { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 11px; color: #5c5e1d; background: #f5f5e9; object-fit: cover; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.new-conversation-selected-contact > div { display: grid; min-width: 0; flex: 1; gap: 3px; }
.new-conversation-selected-contact strong, .new-conversation-selected-contact small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.new-conversation-selected-contact strong { color: #585838; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.new-conversation-selected-contact small { color: #979189; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-composer-tools { display: flex; min-width: 0; min-height: 39px; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 8px; border-bottom: 1px solid #edf1ef; }
.conversation-tool-button, .conversation-quick-replies > summary { display: inline-flex; min-height: 27px; align-items: center; justify-content: center; gap: 5px; padding: 0 8px; border: 1px solid #dfe8e4; border-radius: 7px; color: #706a53; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; list-style: none; }
.conversation-tool-button svg { width: 12px; height: 12px; }
.conversation-tool-button:hover:not(:disabled), .conversation-quick-replies > summary:hover { border-color: #d6d7bd; color: #58591c; background: #fafbf6; }
.conversation-tool-button:disabled { color: #a8a29a; background: #f3f6f4; cursor: default; }
.conversation-note-toggle { display: inline-flex; min-height: 27px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #e1e9e5; border-radius: 7px; color: #837d70; background: #fff; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; cursor: pointer; }
.conversation-note-toggle:has(input:checked) { border-color: #e4c88b; color: #86632b; background: #fff8e9; }
.conversation-note-toggle input { width: 13px; height: 13px; margin: 0; accent-color: #ad7b23; }
.conversation-quick-replies { position: relative; }
.conversation-quick-replies > summary::-webkit-details-marker { display: none; }
.conversation-quick-replies > div[role="menu"] { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; display: grid; min-width: 190px; gap: 2px; padding: 5px; border: 1px solid #dce7e2; border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(41, 41, 9, .16); }
.conversation-quick-replies > div[role="menu"] button { padding: 8px 9px; border: 0; border-radius: 6px; color: #706b53; background: transparent; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: left; cursor: pointer; }
.conversation-quick-replies > div[role="menu"] button:hover, .conversation-quick-replies > div[role="menu"] button:focus-visible { outline: 0; color: #535518; background: #f8f8f0; }
.conversation-composer-hint { min-width: 130px; flex: 1; color: #9a9688; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: right; }
.conversation-composer-hint.is-private { color: #8a672c; }
.conversation-composer-wrap.is-private .conversation-composer { border-color: #e1c781; background: #fffdf8; }
.conversation-composer-wrap.is-private .conversation-composer-tools { border-bottom-color: #f0e5c7; background: #fffaf0; }
.conversation-pending-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; }
.conversation-pending-file { display: inline-flex; max-width: 100%; min-height: 25px; align-items: center; gap: 7px; padding: 0 6px 0 9px; border: 1px solid #e7e8dc; border-radius: 7px; color: #706b53; background: #fafaf6; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-pending-file > span { overflow: hidden; max-width: 220px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-pending-file button { width: 19px; height: 19px; padding: 0; border: 0; border-radius: 5px; color: #8c6b66; background: transparent; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.conversation-pending-file button:hover { color: #a74f43; background: #fff0ed; }
.conversation-readonly-note { margin: 9px 12px 0; padding: 9px 11px; border: 1px solid #dce7e2; border-radius: 8px; color: #7a7164; background: #fafaf7; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.conversation-resolved-hint { margin: 7px 2px 0; color: #8e7772; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-attachment-image { display: block; max-width: min(340px,100%); margin-top: 7px; overflow: hidden; border: 1px solid #e2e9e6; border-radius: 9px; background: #f2f5f3; }
.conversation-attachment-image img { display: block; max-width: 100%; max-height: 330px; object-fit: contain; }
.conversation-attachment-video { display: block; width: min(340px,100%); max-height: 300px; margin-top: 7px; border-radius: 9px; background: #2a2b13; }
.conversation-attachment-audio { display: block; width: min(330px,100%); margin-top: 7px; }
.conversation-attachment-file { display: inline-flex; max-width: 100%; align-items: center; gap: 9px; margin-top: 7px; padding: 8px 10px; border: 1px solid #dfe8e3; border-radius: 8px; color: #62633c; background: rgba(255,255,255,.82); text-decoration: none; }
.conversation-attachment-file > span:first-child { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 7px; color: #636510; background: #f4f5e7; }
.conversation-attachment-file > span:last-child { display: grid; min-width: 0; gap: 2px; }
.conversation-attachment-file strong, .conversation-attachment-file small { overflow: hidden; max-width: 220px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-attachment-file strong { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-attachment-file small { color: #969187; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-attachment-file.is-unavailable { color: #8c7772; }
.conversation-via-site { padding: 3px 6px; border: 1px solid var(--line, #dfe5e2); border-radius: 99px; color: inherit; opacity: .75; font-size: calc((7px * var(--conversation-text-scale, 1.5)) + 0px); }
.conversation-private-note-label { padding: 3px 6px; border: 1px solid #ead9ae; border-radius: 99px; color: #8b672b; background: #fff7e5; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.conversation-message-row.is-private-note .conversation-message-bubble { border-color: #ead9ae; background: #fff9eb; }
.conversation-context-menu { position: fixed; z-index: 1000; display: grid; min-width: 205px; gap: 2px; padding: 5px; border: 1px solid #dce6e1; border-radius: 10px; background: #fff; box-shadow: 0 14px 34px rgba(33, 34, 7, .2); }
.conversation-context-menu[hidden] { display: none; }
.conversation-context-menu [role="menuitem"] { min-height: 32px; padding: 0 9px; border: 0; border-radius: 6px; color: #6b664f; background: transparent; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; text-align: left; cursor: pointer; }
.conversation-context-menu [role="menuitem"]:hover, .conversation-context-menu [role="menuitem"]:focus-visible { outline: 0; color: #535518; background: #f8f8f0; }
.conversation-context-menu [role="menuitem"][data-context-action="resolve"] { color: #9a5f54; }
.conversation-context-menu [role="menuitem"][data-context-action="pause_bot"] { color: #a26931; }
.conversation-context-menu [role="menuitem"]:disabled { color: #a9a39c; background: #f4f6f4; cursor: default; }
.conversation-context-menu-heading { padding: 6px 9px 3px; color: #9aa6a2; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.conversation-context-menu-divider { height: 1px; margin: 3px 4px; background: #e8eeea; }
.conversation-composer { position: relative; border: 1px solid #dce6e2; border-radius: 10px; background: #fff; transition: border-color .14s ease,box-shadow .14s ease; }

@media (max-width: 1200px) {
  .conversation-workspace { grid-template-columns: minmax(245px,.78fr) minmax(0,1.5fr); grid-template-rows: minmax(0,1fr); height: auto; min-height: 0; overflow: visible; }
  .conversation-workspace.has-conversation-details { grid-template-rows: minmax(0,1fr) auto; }
  .conversation-inbox-panel { grid-column: 1; grid-row: 1; min-height: 0; }
  .conversation-thread { grid-column: 2; grid-row: 1; min-height: 0; border-right: 0; }
  .conversation-workspace.has-conversation-details .conversation-details-panel { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-content: start; border-top: 1px solid #e7eeeb; border-left: 0; }
  .conversation-contact-profile { grid-column: 1 / -1; }
}

@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .conversation-workspace { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto; }
  .conversation-workspace.has-conversation-details { grid-template-rows: auto auto auto; }
  .conversation-inbox-panel, .conversation-thread, .conversation-details-panel { grid-column: 1; grid-row: auto; }
  .conversation-inbox-panel { min-height: 300px; max-height: 370px; }
  .conversation-thread { min-height: 400px; border-radius: 0; }
  .conversation-details-panel { grid-template-columns: minmax(0,1fr); border-top: 1px solid #e7eeeb; border-left: 0; border-radius: 0 0 13px 13px; }
  .conversation-contact-profile { grid-column: 1; }
  .conversation-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 13px; }
  .conversation-dialog-form { gap: 13px; padding: 14px; }
  .conversation-dialog-fields { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .conversation-dialog .contact-form-actions { flex-wrap: wrap; }
  .conversation-dialog .contact-form-actions > button { flex: 1 1 auto; }
  .conversation-composer-tools { gap: 5px; padding: 6px; }
  .conversation-composer-hint { flex-basis: 100%; margin-left: 2px; text-align: left; }
}

@media (min-width: 1201px) {
  .conversations-page {
    display: flex;
    height: calc(100dvh - 182px);
    min-height: 0;
    flex-direction: column;
  }
  .conversation-workspace {
    height: auto;
    min-height: 0;
    flex: 1 1 0;
  }
}

@media (min-width: 761px) and (max-width: 1200px) {
  .conversations-page {
    display: flex;
    height: calc(100dvh - 182px);
    min-height: 0;
    flex-direction: column;
  }
  .conversation-workspace {
    grid-template-rows: minmax(0,1fr);
    flex: 1 1 0;
  }
  .conversation-workspace.has-conversation-details { grid-template-rows: minmax(0,1fr) auto; }
  .conversation-inbox-panel, .conversation-thread { min-height: 0; }
}

.conversation-thread-head .conversation-status-pill { flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce) {
  .conversation-thread-head, .conversation-thread-head::after { transition: none; }
}

.user-preferences-form { display: grid; gap: 14px; }
.user-preferences-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; align-items: stretch; }
.user-preferences-panel { display: grid; align-content: start; min-width: 0; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: 0 3px 12px rgba(54, 55, 11, .025); }
.user-preferences-panel-head { display: flex; align-items: center; gap: 10px; }
.user-preferences-panel-head .eyebrow { margin: 0 0 4px; color: #828351; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.user-preferences-panel-head h2 { margin: 0; color: #49492c; font-size: calc(18px * var(--portal-text-scale)); font-weight: 730; letter-spacing: -.025em; }
.user-preferences-mark { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border: 1px solid #edeed6; border-radius: 10px; color: #73750d; background: #f9f9ee; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; }
.user-preferences-mark.is-teal { border-color: #ececda; color: #606220; background: #f8f8f1; font-size: calc(20px * var(--portal-text-scale)); }
.user-preferences-description { margin: -3px 0 0; color: #8d8c7a; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.settings-scale-fieldset { display: grid; min-width: 0; gap: 8px; margin: 0; padding: 0; border: 0; }
.settings-scale-fieldset legend { margin-bottom: 4px; color: #615b41; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 710; }
.settings-scale-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.settings-scale-choice { position: relative; display: flex; min-width: 0; min-height: 56px; align-items: center; gap: 6px; padding: 7px; border: 1px solid #dce6e2; border-radius: 10px; background: #fcfcfa; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.settings-scale-choice:hover { border-color: #cccdac; background: #fbfbf7; }
.settings-scale-choice:has(input:checked) { border-color: #727431; background: #f8f8ed; box-shadow: inset 0 0 0 1px rgba(99, 101, 36, .14); }
.settings-scale-choice:has(input:focus-visible) { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 2px; }
.settings-scale-choice input { width: 15px; height: 15px; flex: 0 0 auto; margin: 0; accent-color: #5e6010; }
.settings-scale-choice > span { display: grid; min-width: 0; gap: 2px; }
.settings-scale-choice strong { color: #444525; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; line-height: 1.2; }
.settings-scale-choice small { overflow: hidden; color: #8a8377; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.settings-motion-toggle { position: relative; display: flex; min-width: 0; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid #e3eae6; border-radius: 11px; background: #fcfcfa; cursor: pointer; }
.settings-motion-toggle > span:first-child { display: grid; min-width: 0; flex: 1; gap: 4px; }
.settings-motion-toggle strong { color: #5a533c; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.settings-motion-toggle small { color: #898378; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.settings-motion-toggle input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
.settings-toggle-track { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border: 1px solid #cbd8d3; border-radius: 99px; background: #e9efec; transition: background .15s ease, border-color .15s ease; }
.settings-toggle-track::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(40, 41, 16, .18); content: ""; transition: transform .15s ease; }
.settings-motion-toggle input:checked + .settings-toggle-track { border-color: #5e6010; background: #5e6010; }
.settings-motion-toggle input:checked + .settings-toggle-track::after { transform: translateX(18px); }
.settings-motion-toggle input:focus-visible + .settings-toggle-track { outline: 3px solid rgba(114, 117, 0, .24); outline-offset: 3px; }
.settings-select-field { display: grid; min-width: 0; gap: 7px; color: #605a43; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.settings-select-field select { width: 100%; min-width: 0; min-height: 43px; padding: 0 12px; border: 1px solid #d7e3dd; border-radius: 9px; color: #4b4d2c; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.settings-select-field select:focus-visible { outline: 3px solid rgba(114, 117, 0, .2); outline-offset: 1px; border-color: #9fa158; }
.settings-select-field-wide { grid-column: 1/-1; }
.settings-select-field small { color: #8a8378; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.5; }
.settings-subheading { margin: 0; color: #5a5b3c; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 710; }
.settings-select-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.settings-dashboard-preferences { display: grid; gap: 8px; padding-bottom: 11px; border-bottom: 1px solid #e8eeea; }
.settings-dashboard-preferences > small { color: #8a8378; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.settings-timezone-preview { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e1ebe6; border-radius: 10px; background: #fbfbf8; }
.settings-timezone-mark { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #edeed6; border-radius: 9px; color: #73750d; background: #f9f9ee; }
.settings-timezone-mark svg { width: 15px; height: 15px; }
.settings-timezone-copy { display: grid; min-width: 0; flex: 1; gap: 2px; }
.settings-timezone-copy strong { color: #444525; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; font-variant-numeric: tabular-nums; }
.settings-timezone-copy small { overflow: hidden; color: #8a8377; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.settings-timezone-zone { max-width: 48%; overflow: hidden; padding: 5px 8px; border: 1px solid #eaeadb; border-radius: 99px; color: #787451; background: #fff; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.user-preferences-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 0; border-top: 1px solid #e2e9e5; }
.user-preferences-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.user-preferences-feedback { margin: 0; color: #796e60; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.user-preferences-feedback.is-error { color: #a0483a; }
.settings-reset-button { min-height: 38px; padding: 0 12px; border: 1px solid #d8e3de; border-radius: 9px; color: #6b634e; background: #fff; font: inherit; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.settings-reset-button:hover { border-color: #cfcfb2; color: #51521d; background: #f9faf5; }
.user-preferences-footer .contact-create-button { min-height: 38px; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.user-preferences-footer .contact-create-button:disabled { border-color: #e0e7e3; color: #a39c95; background: #edf1ee; cursor: default; }

/* The shell, admin tools, and the primary dashboard actions keep their own type scale. */
.sidebar, .topbar, .admin-page, .staff-admin-workspace,
.dashboard-actions .heading-action, .dashboard-actions .hero-primary { --portal-text-scale: var(--portal-font-zoom); }
.user-preferences-form button:focus-visible { outline: 3px solid rgba(114, 117, 0, .24); outline-offset: 2px; }

.profile-page { display: grid; gap: 14px; }
.profile-page .page-heading { align-items: center; }
.profile-preferences-link { flex: 0 0 auto; }
.profile-layout { display: grid; gap: 13px; }
.profile-card { display: grid; min-width: 0; align-content: start; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 3px 12px rgba(54, 55, 11, .03); }
.profile-card-heading { display: flex; align-items: center; gap: 10px; }
.profile-card-heading .eyebrow { margin: 0 0 3px; color: #897c68; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .09em; }
.profile-card-heading h2 { margin: 0; color: #49492c; font-size: calc(17px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.025em; }
.profile-identity-body { display: grid; grid-template-columns: 148px minmax(0,1fr); gap: 19px; align-items: start; }
.profile-photo-controls { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 4px 4px 0; text-align: center; }
.profile-avatar-preview { position: relative; display: grid; overflow: hidden; width: 84px; height: 84px; place-items: center; border: 1px solid #e2e3c9; border-radius: 25px; color: #565708; background: linear-gradient(145deg,#f4f4e6,#f5f6e7); font-size: calc((28px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 800; box-shadow: 0 6px 17px rgba(76, 77, 18, .08); }
.profile-photo-button, .profile-photo-remove { min-height: 31px; padding: 0 9px; border: 1px solid #e5e6d9; border-radius: 8px; color: #5c5d29; background: #fbfbf8; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.profile-photo-button:hover { border-color: #c9c9a6; background: #f8f8f0; }
.profile-photo-remove { min-height: auto; padding: 3px 5px; border-color: transparent; color: #967066; background: transparent; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.profile-photo-remove:hover { color: #9d4d40; }
.profile-photo-controls > small { max-width: 150px; color: #81908b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.profile-identity-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.profile-identity-fields label, .profile-field { display: grid; min-width: 0; gap: 6px; color: #6b6550; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.profile-identity-fields label:first-child { grid-column: 1/-1; }
.profile-identity-fields input, .profile-field input { width: 100%; min-width: 0; min-height: 41px; padding: 8px 10px; border: 1px solid #d8e4dd; border-radius: 9px; color: #4a4b2b; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 540; }
.profile-identity-fields input:focus-visible, .profile-field input:focus-visible, .profile-timezone-card select:focus-visible { border-color: #a2a35c; outline: 3px solid rgba(114, 117, 0, .18); outline-offset: 1px; }
.profile-google-slot { grid-column: 1/-1; }
.profile-google-slot:empty { display: none; }
.profile-google { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: #6b6550; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.profile-google small { flex-basis: 100%; color: #8b8177; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 540; }
.profile-signin-keys { justify-self: start; text-decoration: none; }
.profile-identity-fields input[readonly] { color: #847b72; background: #f7f9f6; }
.profile-identity-fields small, .profile-field small { color: #8f867d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 480; line-height: 1.45; }
.profile-card-footer { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid #e8efea; }
.profile-feedback { min-width: 0; margin: 0; color: #796e60; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.profile-feedback.is-error { color: #a0483a; }
.profile-card-footer .contact-create-button, .profile-card > .contact-create-button { min-height: 38px; flex: 0 0 auto; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.profile-secondary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; align-items: stretch; }
.profile-card-description { margin: -5px 0 0; color: #8b8177; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.profile-password-control { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.profile-password-control button { min-width: 58px; padding: 0 8px; border: 1px solid #d8e4dd; border-radius: 9px; color: #766c55; background: #fbfbf8; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.profile-password-control button:hover { border-color: #cbcda8; color: #51531b; }
.profile-password-control button:focus-visible, .profile-card button:focus-visible { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 2px; }
.profile-timezone-card { grid-template-rows: auto auto auto 1fr auto; }
.profile-timezone-card .settings-select-field { margin-top: 1px; }
.profile-timezone-card .settings-timezone-preview { margin-top: -4px; }
.profile-timezone-card > .contact-create-button { justify-self: start; }
.profile-card > .contact-create-button:disabled, .profile-card-footer .contact-create-button:disabled { border-color: #e0e7e3; color: #a39c95; background: #edf1ee; cursor: default; }
.profile-card input:disabled, .profile-card button:disabled, .profile-card select:disabled { opacity: .65; cursor: wait; }
.profile-page button:focus-visible { outline: 3px solid rgba(114, 117, 0, .24); outline-offset: 2px; }

@media (max-width: 980px) {
  .profile-secondary-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 620px) {
  .profile-card { gap: 12px; padding: 14px; }
  .profile-identity-body { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .profile-photo-controls { grid-template-columns: 68px 1fr; justify-items: start; align-items: center; gap: 4px 10px; padding: 0; text-align: left; }
  .profile-avatar-preview { grid-column: 1; grid-row: 1 / span 3; width: 64px; height: 64px; border-radius: 19px; font-size: calc((23px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .profile-photo-controls > small { grid-column: 2; max-width: none; }
  .profile-identity-fields { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .profile-identity-fields label:first-child { grid-column: auto; }
  .profile-card-footer { align-items: stretch; flex-direction: column; }
  .profile-card-footer .contact-create-button, .profile-card > .contact-create-button { width: 100%; justify-content: center; }
  .profile-timezone-card .settings-timezone-zone { max-width: 56%; }
}

@media (max-width: 620px) {
  .user-preferences-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 540px) {
  .user-preferences-panel { gap: 10px; padding: 14px; }
  .settings-scale-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-select-grid { grid-template-columns: minmax(0,1fr); }
  .user-preferences-footer { align-items: stretch; flex-direction: column; }
  .user-preferences-footer > div { display: grid; grid-template-columns: minmax(0,1fr); }
  .user-preferences-footer > div button { width: 100%; justify-content: center; }
}

@media (max-width: 980px) {
  .dashboard-report-toolbar { grid-template-columns: minmax(0,1fr); justify-items: center; }
  .dashboard-report-tabs { grid-column: 1; grid-row: 1; width: 100%; }
  .dashboard-report-refresh { grid-column: 1; grid-row: 2; justify-self: center; }
}

@media (max-width: 760px) {
  .intelligence-panel-head { grid-template-columns: minmax(0,1fr); align-items: start; }
  .intelligence-panel-head > div:first-child { grid-column: 1; grid-row: 1; }
  .intelligence-total-count { grid-column: 1; grid-row: 2; justify-self: center; }
  .intelligence-panel-actions { grid-column: 1; grid-row: 3; justify-content: center; }
}

.staff-admin-message.is-good { border-color: #e7e8d8; color: #5c5d29; background: #f8f8f2; }
.staff-admin-message.is-warning { border-color: #efdcb9; color: #795b28; background: #fff9ea; }
@media (max-width: 420px) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (max-height: 720px) {
}
@media (max-width: 540px) {
  .staff-orphan-group > header { flex-direction: column; gap: 8px; }
}

/* Admin workspace: focused tabs and the shared mail profiles. */
.admin-workspace { display: grid; gap: 14px; min-width: 0; }
.admin-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 6px; border: 1px solid #dce7e1; border-radius: 15px; background: #f4f5f0; }
.admin-tab { display: grid; align-content: center; gap: 4px; min-width: 0; min-height: 58px; padding: 8px 12px; border: 1px solid transparent; border-radius: 10px; color: #7a6d62; background: transparent; text-align: left; cursor: pointer; transition: background .16s ease, color .16s ease, box-shadow .16s ease, border-color .16s ease; }
.admin-tab strong { color: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; line-height: 1.2; }
.admin-tab small { color: #82928d; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.25; }
.admin-tab:hover { color: #42431e; background: rgba(255,255,255,.72); }
.admin-tab.is-active { border-color: #d9e5de; color: #3c3c13; background: #fff; box-shadow: 0 3px 12px rgba(55, 56, 26, .08); }
.admin-tab.is-active small { color: #6d827a; }
.admin-tab:focus-visible { outline: 3px solid rgba(114, 117, 0, .25); outline-offset: 2px; }
.admin-tab-panel { min-width: 0; }
.admin-settings-panel.admin-mail-panel { gap: 18px; }
.admin-mail-panel .admin-settings-heading { align-items: center; }
.admin-mail-state, .admin-mail-state.is-ready, .admin-mail-state.is-off, .admin-mail-state.is-neutral { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 5px 10px; border: 1px solid #e8e9dc; border-radius: 999px; color: #53541d; background: #f6f7ed; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; white-space: nowrap; }
.admin-mail-state.is-off { border-color: #e4e8e3; color: #727f7a; background: #f4f5f1; }
.admin-mail-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.admin-mail-card { min-width: 0; padding: 18px; border: 1px solid #e0e9e3; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(44, 45, 22, .025); }
.admin-mail-card:first-child, .admin-mail-card:nth-child(2) { grid-column: 1 / -1; }
.admin-mail-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.admin-mail-card > header .eyebrow { margin: 0 0 5px; color: #789087; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .14em; }
.admin-mail-card > header h3 { margin: 0; color: #464625; font-size: calc((16px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: -.02em; }
.admin-mail-card > header p:not(.eyebrow) { margin: 5px 0 0; color: #857d73; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.admin-mail-server-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.admin-mail-sender-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-mail-fallback-sender { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 13px; padding-top: 13px; border-top: 1px solid #e6ece7; }
.admin-mail-fallback-sender-note { grid-column: 1 / -1; margin: 0; color: #857d73; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.admin-mail-server-grid label { display: grid; align-content: start; gap: 6px; min-width: 0; color: #6b6052; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; }
.admin-mail-server-grid input, .admin-mail-server-grid select, .admin-mail-test-row input { width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid #d9e3dd; border-radius: 9px; color: #404026; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.admin-mail-server-grid input:focus, .admin-mail-server-grid select:focus, .admin-mail-test-row input:focus { border-color: #909250; outline: 3px solid rgba(94, 95, 29, .13); }
.admin-mail-server-grid small { color: #82918c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.35; }
.admin-mail-password { grid-column: span 2; }
.admin-mail-clear-password { display: flex !important; align-items: center; align-self: end; min-height: 41px; gap: 8px !important; color: #8a6256 !important; }
.admin-mail-clear-password input, .admin-mail-enable input { width: 17px; height: 17px; min-height: 0; accent-color: #57581d; }
.admin-mail-fallback { margin-top: 16px; border-top: 1px solid #e6ece7; }
.admin-mail-fallback summary { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; padding: 14px 0 2px; color: #555533; cursor: pointer; list-style: none; }
.admin-mail-fallback summary::-webkit-details-marker { display: none; }
.admin-mail-fallback summary::after { grid-column: 2; grid-row: 1 / span 2; justify-self: end; content: '+'; color: #64652c; font-size: 21px; font-weight: 500; }
.admin-mail-fallback[open] summary::after { content: '−'; }
.admin-mail-fallback summary span { font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.admin-mail-fallback summary small { color: #82918c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; }
.admin-mail-fallback > div { padding: 13px 0 2px; }
.admin-mail-enable { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-mail-enable > label { display: flex; align-items: flex-start; gap: 10px; min-width: 0; cursor: pointer; }
.admin-mail-enable input { flex: 0 0 auto; margin: 3px 0 0; }
.admin-mail-enable label span { display: grid; gap: 4px; }
.admin-mail-enable label strong { color: #505134; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.admin-mail-enable label small { color: #82918c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.admin-mail-enable .admin-mail-state { flex: 0 0 auto; }
.admin-mail-consumers { display: grid; gap: 9px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid #e6ece7; list-style: none; }
.admin-mail-consumers li { display: flex; align-items: flex-start; gap: 9px; color: #7c7167; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.admin-mail-service-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: #c1ccc6; }
.admin-mail-service-dot.is-ready { background: #6e702d; box-shadow: 0 0 0 3px #f3f4e7; }
.admin-mail-service-dot.is-neutral { background: #a3b1aa; }
.admin-mail-test-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; }
.admin-mail-test-row > label { color: #6b6052; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; }
.admin-mail-test-row .contact-create-button { min-height: 41px; padding: 9px 15px; white-space: nowrap; }
.admin-mail-feedback { min-height: 19px; margin: 10px 0 0; color: #a45c4f; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.admin-mail-feedback.is-good { color: #5c5d29; }
.admin-mail-feedback.is-error { color: #a34036; }
.admin-channel-note { margin: 14px 0 0; color: #778781; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.admin-settings-panel .admin-setting-card { background: #fff; }
.admin-settings-panel .admin-setting-card > header > span { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

@media (max-width: 940px) {
  .admin-tabs { grid-template-columns: repeat(3, minmax(145px, 1fr)); overflow-x: auto; }
  .admin-mail-server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .admin-tabs { display: flex; overflow-x: auto; }
  .admin-tab { flex: 0 0 148px; min-height: 54px; }
  .admin-mail-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-mail-card:first-child, .admin-mail-card:nth-child(2) { grid-column: auto; }
  .admin-mail-card { padding: 14px; }
  .admin-mail-server-grid, .admin-mail-sender-grid, .admin-mail-fallback-sender { grid-template-columns: minmax(0, 1fr); }
  .admin-mail-fallback-sender-note { grid-column: auto; }
  .admin-mail-password { grid-column: auto; }
  .admin-mail-clear-password { min-height: 27px; }
  .admin-mail-test-row { grid-template-columns: minmax(0, 1fr); }
  .admin-mail-test-row .contact-create-button { width: 100%; }
  .admin-mail-panel .admin-settings-heading { align-items: flex-start; flex-direction: column; }
  .admin-settings-panel .admin-settings-grid { grid-template-columns: minmax(0,1fr); }
}

/* Conversation finishing pass: unclipped quick replies, clear upload state, notes and color coded labels. */
.conversation-composer-wrap { position: relative; z-index: 5; }
.conversation-composer { position: relative; z-index: 5; overflow: visible; }
.conversation-pause-menu { position: relative; }
.conversation-pause-menu > summary { list-style: none; cursor: pointer; }
.conversation-pause-menu > summary::-webkit-details-marker { display: none; }
.conversation-pause-menu[data-disabled] > summary { pointer-events: none; opacity: 0.6; }
.conversation-pause-menu > div[role="menu"] { position: absolute; z-index: 40; top: calc(100% + 5px); right: 0; display: grid; min-width: 160px; gap: 2px; padding: 5px; border: 1px solid #dce7e2; border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(43, 43, 16, 0.14); }
.conversation-pause-menu > div[role="menu"] > button { padding: 7px 10px; border: 0; border-radius: 6px; color: #37361e; background: transparent; text-align: left; cursor: pointer; }
.conversation-pause-menu > div[role="menu"] > button:hover:not(:disabled) { background: #f3f7f5; }
.conversation-quick-replies > div[role="menu"] { top: auto; bottom: calc(100% + 6px); z-index: 40; min-width: 210px; max-height: min(320px,50vh); overflow: auto; }
.conversation-attachment-status { flex: 0 0 auto; color: #8d6b2c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-contact-name-row { display: flex; width: 100%; min-width: 0; align-items: center; justify-content: center; gap: 7px; }
.conversation-contact-name-row > strong { min-width: 0; overflow: hidden; color: #4c4d2d; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.conversation-notes-button { display: inline-flex; min-height: 25px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #e7e8db; border-radius: 7px; color: #736753; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.conversation-notes-button:hover { border-color: #cecfab; color: #54561a; background: #fafaf4; }
.conversation-notes-new-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #df8b39; box-shadow: 0 0 0 2px #fff4e5; }
.conversation-label-chip { border-color: color-mix(in srgb,var(--conversation-tag-color,#64652c) 24%,white) !important; color: color-mix(in srgb,var(--conversation-tag-color,#64652c) 82%,#37381d); background: color-mix(in srgb,var(--conversation-tag-color,#64652c) 9%,white); }
.conversation-detail-tag, .conversation-tag-editor-chip { border-color: color-mix(in srgb,var(--conversation-tag-color,#64652c) 24%,white); color: color-mix(in srgb,var(--conversation-tag-color,#64652c) 82%,#37381d); background: color-mix(in srgb,var(--conversation-tag-color,#64652c) 9%,white); }
.conversation-dialog:has(#conversationCustomTagForm) { width: min(410px,calc(100vw - 28px)); }
.conversation-dialog:has(#conversationCustomTagForm) .conversation-dialog-form { gap: 12px; padding: 16px; }
.conversation-dialog-field input[type="color"] { width: 54px; min-height: 38px; padding: 4px; cursor: pointer; }

/* Handoff routing: compact, scannable setup with an anchored action bar. */
.handoff-settings-dialog { width: min(820px,calc(100vw - 28px)); height: min(900px,calc(100dvh - 28px)); max-height: calc(100dvh - 28px); overflow: hidden; padding: 0; border: 1px solid #e5e6d9; border-radius: 20px; background: #fafaf7; box-shadow: 0 32px 100px rgba(31, 31, 5, .34); }
.handoff-settings-form { display: grid; width: 100%; height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 0; padding: 0; }
.handoff-dialog-header { position: relative; display: flex; min-width: 0; align-items: center; gap: 15px; padding: 19px 24px 18px; border-bottom: 1px solid #e5ede8; background: linear-gradient(115deg,#fff 0%,#fafaf6 66%,#f7f7ec 100%); }
.handoff-dialog-mark { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border: 1px solid #e5e6d2; border-radius: 15px; color: #595b12; background: linear-gradient(145deg,#f9f9ee,#f3f3e5); box-shadow: inset 0 1px #fff; }
.handoff-dialog-mark svg { width: 22px; height: 22px; }
.handoff-dialog-title { min-width: 0; flex: 1; }
.handoff-dialog-title .eyebrow { margin: 0 0 4px; color: #7c7e52; font-size: 9px; font-weight: 780; letter-spacing: .13em; }
.handoff-dialog-title h2 { margin: 0; color: #3a3a1c; font-size: 21px; font-weight: 760; letter-spacing: -.04em; line-height: 1.15; }
.handoff-dialog-title > p:last-child { margin: 5px 0 0; color: #788e87; font-size: 12px; line-height: 1.45; }
.handoff-dialog-header .contact-dialog-close { width: 34px; height: 34px; border-radius: 10px; color: #69837b; background: rgba(255,255,255,.85); }
.handoff-dialog-header .contact-dialog-close:hover { border-color: #ddddca; color: #52532c; background: #fff; }
.handoff-dialog-scroll { grid-row: 3; display: grid; min-height: 0; align-content: start; gap: 13px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: auto; padding: 16px 22px 18px; }
.handoff-step-card { min-width: 0; padding: 15px; border: 1px solid #e1ebe5; border-radius: 15px; background: #fff; box-shadow: 0 3px 12px rgba(54, 55, 17, .035); }
.handoff-step-heading { display: flex; min-width: 0; align-items: center; gap: 11px; margin-bottom: 13px; }
.handoff-step-number { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid #e9e9d6; border-radius: 11px; color: #5a5b26; background: #f8f8f1; font-size: 12px; font-weight: 800; }
.handoff-step-heading > div { min-width: 0; flex: 1; }
.handoff-step-heading .eyebrow { margin: 0 0 2px; color: #7e9990; font-size: 8px; font-weight: 780; letter-spacing: .12em; }
.handoff-step-heading h3 { margin: 0; color: #434428; font-size: 14px; font-weight: 740; letter-spacing: -.02em; }
.handoff-mode-summary { max-width: 42%; overflow: hidden; padding: 6px 9px; border: 1px solid #eaebdf; border-radius: 99px; color: #56786c; background: #fafaf6; font-size: 10px; font-weight: 660; text-overflow: ellipsis; white-space: nowrap; }
.handoff-mode-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.handoff-mode-card { position: relative; display: flex; min-width: 0; min-height: 95px; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #e2ebe6; border-radius: 12px; background: #fdfdfc; cursor: pointer; transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.handoff-mode-card:hover { border-color: #d7d8bb; background: #fcfcf9; }
.handoff-mode-card.is-selected { border-color: #acad68; background: linear-gradient(145deg,#fbfbf5,#f8f8ed); box-shadow: 0 0 0 2px rgba(108, 109, 47, .09); }
.handoff-mode-card input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
.handoff-mode-card input:focus-visible + .handoff-mode-radio { outline: 3px solid rgba(95, 97, 26, .24); outline-offset: 3px; }
.handoff-mode-radio { position: relative; display: block; width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; border: 1.5px solid #bdcec4; border-radius: 50%; background: #fff; }
.handoff-mode-card.is-selected .handoff-mode-radio { border-color: #5c5d1c; }
.handoff-mode-card.is-selected .handoff-mode-radio::after { position: absolute; inset: 4px; border-radius: 50%; background: #5c5d1c; content: ''; }
.handoff-mode-copy { display: grid; min-width: 0; gap: 4px; }
.handoff-mode-kicker { color: #8aa198; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.handoff-mode-copy strong { color: #4e4e2e; font-size: 11px; font-weight: 750; line-height: 1.25; }
.handoff-mode-copy small { color: #7e9189; font-size: 10px; line-height: 1.4; }
.handoff-recipient-section { display: grid; gap: 9px; min-width: 0; margin-top: 13px; padding-top: 12px; border-top: 1px solid #edf2ee; }
.handoff-recipient-section[hidden] { display: none; }
.handoff-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.handoff-section-heading > div:first-child { display: grid; min-width: 0; gap: 3px; }
.handoff-section-heading strong { color: #595a3b; font-size: 11px; font-weight: 730; }
.handoff-section-heading small { color: #83958d; font-size: 10px; line-height: 1.4; }
.handoff-recipient-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.handoff-recipient-actions > span { color: #758c82; font-size: 10px; font-weight: 680; }
.handoff-recipient-actions button { padding: 4px 3px; border: 0; color: #5b5c1c; background: transparent; font: inherit; font-size: 10px; font-weight: 720; cursor: pointer; }
.handoff-recipient-actions button:hover { color: #484910; text-decoration: underline; }
.handoff-staff-search { display: flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #e3ebe6; border-radius: 9px; color: #82948d; background: #fdfdfb; }
.handoff-staff-search:focus-within { border-color: #c9ca9f; background: #fff; box-shadow: 0 0 0 3px rgba(94, 96, 35, .08); }
.handoff-staff-search svg { width: 14px; height: 14px; }
.handoff-staff-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: #545437; background: transparent; font: inherit; font-size: 11px; }
.handoff-staff-search input::placeholder { color: #9aa9a2; }
.handoff-staff-list { display: grid; max-height: 192px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; overflow: auto; padding: 1px; overscroll-behavior-y: auto; }
.handoff-staff-option { position: relative; display: flex; min-width: 0; min-height: 52px; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #e6ede8; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s ease,background .15s ease; }
.handoff-staff-option:hover { border-color: #dcdcc3; background: #fdfdfb; }
.handoff-staff-option.is-selected { border-color: #c4c694; background: #f9f9f2; }
.handoff-staff-option[hidden] { display: none; }
.handoff-staff-option input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); }
.handoff-staff-option input:focus-visible + .handoff-staff-avatar { outline: 3px solid rgba(95, 97, 26, .22); outline-offset: 2px; }
.handoff-staff-avatar { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border: 1px solid #eaebdd; border-radius: 10px; color: #5b5d27; background: linear-gradient(145deg,#f8f8f2,#f3f3e7); font-size: 10px; font-weight: 780; }
.handoff-staff-copy { display: grid; min-width: 0; flex: 1; gap: 4px; }
.handoff-staff-copy strong { overflow: hidden; color: #4e4f33; font-size: 10px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.handoff-staff-copy small { display: flex; flex-wrap: wrap; gap: 4px; }
.handoff-channel-chip { display: inline-flex; min-height: 16px; align-items: center; padding: 0 5px; border: 1px solid #e4ece7; border-radius: 99px; color: #74877f; background: #f8faf8; font-size: 8px; font-weight: 650; }
.handoff-channel-chip.is-whatsapp { border-color: #e8e9d5; color: #5f6130; background: #f8f8f0; }
.handoff-channel-chip.is-email { border-color: #ecedda; color: #727345; background: #f9faf1; }
.handoff-channel-chip.is-missing { color: #9b7554; background: #fff8ef; }
.handoff-staff-check { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border: 1px solid #dce7e0; border-radius: 6px; color: transparent; background: #fff; font-size: 11px; font-weight: 800; }
.handoff-staff-option.is-selected .handoff-staff-check { border-color: #979956; color: #fff; background: #818243; }
.handoff-staff-empty { padding: 15px; border-radius: 11px; font-size: 11px; }
.handoff-staff-empty-guidance { margin-top: 10px; }
.handoff-staff-empty strong { color: #555636; }
.handoff-staff-empty span { font-size: 10px; }
.handoff-staff-empty a { font-size: 10px; }
.handoff-channel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 12px; }
.handoff-channel-option { display: grid; align-content: start; gap: 5px; min-width: 0; }
.handoff-channel-card { display: flex; min-height: 64px; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e2ebe6; border-radius: 12px; background: #fdfdfc; cursor: pointer; transition: border-color .16s ease,background .16s ease; }
.handoff-channel-card.is-enabled { border-color: #d5d5b2; background: #f9faf5; }
.handoff-channel-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #e3ece6; border-radius: 11px; color: #718b7f; background: #fff; }
.handoff-channel-icon svg { width: 17px; height: 17px; }
.handoff-channel-icon.is-whatsapp { color: #5d5f1d; }
.handoff-channel-icon.is-email { color: #75753b; }
.handoff-channel-copy { display: grid; min-width: 0; flex: 1; gap: 4px; }
.handoff-channel-copy strong { color: #505032; font-size: 11px; font-weight: 730; }
.handoff-channel-copy small { color: #83938b; font-size: 9px; line-height: 1.4; }
.handoff-switch { position: relative; display: inline-flex; width: 34px; height: 20px; flex: 0 0 auto; align-items: center; }
.handoff-switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.handoff-switch > span { position: relative; display: block; width: 34px; height: 20px; border: 1px solid #d4e0d9; border-radius: 99px; background: #e9efeb; transition: background .15s ease,border-color .15s ease; }
.handoff-switch > span::after { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(43, 43, 17, .2); content: ''; transition: transform .15s ease; }
.handoff-switch input:checked + span { border-color: #65672a; background: #80813f; }
.handoff-switch input:checked + span::after { transform: translateX(14px); }
.handoff-switch input:focus-visible + span { outline: 3px solid rgba(95, 97, 26, .22); outline-offset: 2px; }
.handoff-switch input:disabled { cursor: not-allowed; }
.handoff-integration-state { display: flex; align-items: center; gap: 6px; margin: 0 2px; color: #788d83; font-size: 9px; line-height: 1.4; }
.handoff-integration-state > span { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #a9b9af; }
.handoff-integration-state.is-ready > span { background: #797b34; box-shadow: 0 0 0 3px #f7f7ec; }
.handoff-integration-state.is-warning { color: #9b7446; }
.handoff-integration-state.is-warning > span { background: #d89a48; }
.handoff-instance-field { grid-column: 1 / -1; max-width: 340px; margin-top: 2px; }
.handoff-instance-field > span { color: #71877d; font-size: 10px; font-weight: 700; }
.handoff-instance-field select, .handoff-confirmation-timer select { min-height: 35px; padding: 7px 10px; border-radius: 9px; font-size: 11px; }
.handoff-confirmation-card.is-locked { background: linear-gradient(120deg,#fff,#fafbf9); }
.handoff-optional-label { padding: 5px 8px; border: 1px solid #e6ece8; border-radius: 99px; color: #8b9a92; background: #fbfcfb; font-size: 9px; font-weight: 670; }
.handoff-confirmation-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 11px; border: 1px solid #e5ede8; border-radius: 11px; background: #fdfdfb; cursor: pointer; }
.handoff-confirmation-toggle > span:last-child { display: grid; gap: 4px; }
.handoff-confirmation-toggle strong { color: #515235; font-size: 11px; font-weight: 720; }
.handoff-confirmation-toggle small { color: #81928a; font-size: 10px; line-height: 1.45; }
.handoff-confirmation-toggle .handoff-switch { margin-top: 1px; }
.handoff-confirmation-timer { display: flex; align-items: end; gap: 14px; padding: 10px 2px 0; }
.handoff-confirmation-timer .conversation-dialog-field { width: min(200px,42%); gap: 5px; color: #71877d; font-size: 10px; }
.handoff-confirmation-timer .conversation-dialog-field > span { font-size: 10px; }
.handoff-confirmation-timer > .handoff-settings-note { flex: 1; padding-bottom: 8px; }
.handoff-settings-note { color: #81918b; font-size: 9px; line-height: 1.45; }
.handoff-settings-note.is-warning { margin: 0; color: #987447; }
.handoff-message-preview { padding: 0; overflow: hidden; border: 1px solid #dfe9e3; border-radius: 13px; background: #fff; }
.handoff-message-preview summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; list-style: none; cursor: pointer; }
.handoff-message-preview summary::-webkit-details-marker { display: none; }
.handoff-message-preview summary > span:first-child { display: grid; gap: 3px; }
.handoff-message-preview summary strong { color: #405f53; font-size: 11px; font-weight: 720; }
.handoff-message-preview summary small { color: #8a9a92; font-size: 9px; }
.handoff-preview-chevron { color: #66877a; font-size: 17px; transition: transform .15s ease; }
.handoff-message-preview[open] .handoff-preview-chevron { transform: rotate(180deg); }
.handoff-message-preview pre { margin: 0; padding: 12px 15px; border-top: 1px solid #edf2ee; color: #3e5c50; background: #f9fbf9; font-family: inherit; font-size: 10px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.handoff-snapshot-note { margin: -2px 2px 0; }
.handoff-settings-loading { display: grid; min-height: 54px; grid-template-columns: 18px auto; align-content: center; justify-content: center; gap: 3px 9px; color: #577468; font-size: 11px; }
.handoff-settings-loading .contact-loader { grid-row: span 2; width: 16px; height: 16px; margin: 0; }
.handoff-settings-loading small { color: #8a9b92; font-size: 9px; }
.handoff-unavailable { display: flex; align-items: flex-start; gap: 11px; margin: 12px 22px 0; padding: 12px; border: 1px solid #f0d5cb; border-radius: 11px; color: #8c5243; background: #fff8f5; }
.handoff-unavailable-mark { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border: 1px solid #eed3c9; border-radius: 8px; color: #a95b48; background: #fff; font-size: 12px; font-weight: 800; }
.handoff-unavailable > div { min-width: 0; }
.handoff-unavailable strong { font-size: 11px; }
.handoff-unavailable p { margin: 3px 0 7px; color: #966c60; font-size: 10px; line-height: 1.4; }
.handoff-unavailable .table-action { min-height: 28px; padding: 0 9px; font-size: 9px; }
.handoff-settings-feedback { margin: 0; padding: 9px 11px; border-radius: 9px; font-size: 10px; }
.handoff-settings-feedback.is-error { border-color: #efd6d1; color: #a04e43; background: #fff5f3; }
.handoff-dialog-footer { grid-row: 4; display: flex; min-height: 67px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 22px; border-top: 1px solid #e2ebe5; background: rgba(255,255,255,.96); }
.handoff-save-hint { max-width: 52%; color: #9a7954; font-size: 9px; line-height: 1.4; }
.handoff-save-hint:empty { display: none; }
.handoff-dialog-footer > div { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-left: auto; }
.handoff-dialog-footer .table-action { min-height: 37px; padding: 0 13px; border-radius: 9px; font-size: 10px; }
.handoff-dialog-footer .conversation-dialog-submit { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 16px; border-radius: 9px; font-size: 10px; box-shadow: 0 2px 6px rgba(77, 79, 16, .15); }
.handoff-dialog-footer .conversation-dialog-submit .contact-loader { width: 13px; height: 13px; margin: 0; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.handoff-settings-dialog::backdrop { backdrop-filter: none; }
.handoff-settings-form.is-state-only { grid-template-rows: auto minmax(0,1fr) auto; }
.handoff-settings-form.is-state-only .handoff-dialog-footer { grid-row: 3; }
.handoff-dialog-state { grid-row: 2; grid-column: 1; align-self: stretch; }
.handoff-settings-loading { min-height: 100%; box-sizing: border-box; }
.handoff-unavailable.handoff-dialog-state { align-items: center; margin: 16px 22px; }
.handoff-auto-assign-toggle.is-disabled { border-color: #e5ebe7; color: #89958f; background: #f6f8f6; cursor: not-allowed; }
.handoff-auto-assign-toggle.is-disabled strong,
.handoff-auto-assign-toggle.is-disabled small { color: #929d97; }
.handoff-auto-assign-toggle.is-disabled .handoff-switch input:checked + span { border-color: #b6c1ba; background: #bbc5be; }

@media (max-width: 700px) {
  .handoff-settings-dialog { width: calc(100vw - 18px); height: calc(100dvh - 18px); max-height: calc(100dvh - 18px); border-radius: 15px; }
  .handoff-dialog-header { gap: 11px; padding: 15px 15px 14px; }
  .handoff-dialog-mark { width: 39px; height: 39px; border-radius: 12px; }
  .handoff-dialog-title h2 { font-size: 18px; }
  .handoff-dialog-title > p:last-child { font-size: 10px; }
  .handoff-dialog-scroll { gap: 10px; padding: 11px 12px 14px; }
  .handoff-step-card { padding: 12px; border-radius: 12px; }
  .handoff-mode-grid { gap: 6px; }
  .handoff-mode-card { min-height: 86px; gap: 7px; padding: 9px 7px; }
  .handoff-mode-copy strong { font-size: 10px; }
  .handoff-mode-copy small { font-size: 9px; }
  .handoff-mode-summary { max-width: 44%; font-size: 9px; }
  .handoff-staff-list { max-height: 172px; }
  .handoff-dialog-footer { min-height: 59px; padding: 9px 12px; }
  .handoff-save-hint { max-width: 48%; }
}
@media (max-width: 480px) {
  .handoff-mode-grid { grid-template-columns: 1fr; }
  .handoff-mode-card { min-height: 61px; align-items: center; padding: 9px 11px; }
  .handoff-mode-copy { grid-template-columns: auto 1fr; align-items: baseline; column-gap: 8px; }
  .handoff-mode-kicker { grid-column: 1; }
  .handoff-mode-copy strong { grid-column: 2; grid-row: 1; }
  .handoff-mode-copy small { grid-column: 2; }
  .handoff-step-heading { gap: 8px; }
  .handoff-step-number { width: 29px; height: 29px; }
  .handoff-mode-summary { max-width: 48%; }
  .handoff-staff-list, .handoff-channel-grid { grid-template-columns: 1fr; }
  .handoff-section-heading { align-items: flex-start; }
  .handoff-recipient-actions { flex-wrap: wrap; justify-content: flex-end; }
  .handoff-instance-field { max-width: none; }
  .handoff-confirmation-timer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .handoff-confirmation-timer .conversation-dialog-field { width: min(100%,230px); }
  .handoff-confirmation-timer > .handoff-settings-note { padding: 0; }
  .handoff-dialog-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
  .handoff-save-hint { max-width: none; min-height: 0; }
  .handoff-save-hint:empty { display: none; }
  .handoff-dialog-footer > div { width: 100%; justify-content: flex-end; }
}
.conversation-tag-share { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid #e3ebe6; border-radius: 9px; background: #fbfbf8; cursor: pointer; }
.conversation-tag-share input { width: 15px; height: 15px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #5a5b19; }
.conversation-tag-share span { display: grid; gap: 3px; }
.conversation-tag-share strong { color: #635846; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.conversation-tag-share small { color: #928b83; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.conversation-tag-input-row select { flex: 1; }
.conversation-notes-dialog { width: min(500px,calc(100vw - 28px)); }
.conversation-notes-dialog > .conversation-dialog-form { gap: 12px; }
.conversation-notes-list { display: grid; max-height: min(56vh,520px); gap: 8px; overflow: auto; padding: 1px 2px 2px; }
.conversation-note-card { display: grid; gap: 7px; padding: 10px 11px; border: 1px solid #ebdfc5; border-radius: 10px; background: #fffcf5; }
.conversation-note-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.conversation-note-card-meta strong { color: #70592f; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.conversation-note-card-meta time { color: #a18d68; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.conversation-note-delete { min-height: 25px; flex: 0 0 auto; padding: 0 8px; border: 1px solid #efd9d2; border-radius: 7px; color: #9b5548; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.conversation-note-delete:hover:not(:disabled) { border-color: #e6bcb1; color: #853c32; background: #fff6f3; }
.conversation-note-delete:disabled { opacity: .58; cursor: wait; }
.conversation-note-delete-error { margin: 0; padding: 8px 10px; border: 1px solid #f0d0ca; border-radius: 8px; color: #9a4d42; background: #fff7f5; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.conversation-note-card > p { margin: 0; color: #514a3e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.conversation-notes-empty { display: grid; min-height: 100px; place-content: center; justify-items: center; gap: 6px; padding: 20px; border: 1px dashed #e5e9e4; border-radius: 10px; color: #918a83; text-align: center; }
.conversation-notes-empty strong { color: #6d6358; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-notes-empty span { max-width: 290px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .conversation-composer-wrap, .conversation-composer { z-index: 7; }
  .conversation-composer-tools { position: relative; }
  .conversation-composer-hint { min-width: 100%; text-align: left; }
}

/* Compact conversation controls and note shortcuts. */
.conversation-row-shell { display: grid; min-width: 0; border-bottom: 1px solid #f0f3f1; background: #fff; }
.conversation-row-shell:hover { background: #fbfbf8; }
.conversation-row-shell.is-active { background: #f6f7ed; box-shadow: inset 3px 0 #686b11; }
.conversation-row-shell .conversation-row { align-items: flex-start; padding: 11px 13px 6px; border: 0; background: transparent; }
.conversation-row-shell .conversation-row:hover, .conversation-row-shell.is-active .conversation-row { background: transparent; box-shadow: none; }
.conversation-row-labels { min-height: 26px; padding: 0 13px 8px 59px; }
.conversation-row-notes { display: inline-flex; min-height: 20px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 7px; border: 1px solid #e7e8dc; border-radius: 99px; color: #52756c; background: #fafaf7; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 670; cursor: pointer; }
.conversation-row-notes:hover { border-color: #cbcba4; color: #535418; background: #f7f8ee; }
.conversation-row-notes .conversation-notes-new-dot { width: 6px; height: 6px; flex-basis: 6px; }
.conversation-urgency-toggle:not(.is-active) { gap: 0; border-color: #dce6e2; color: #706b53; background: #fff; }
.conversation-urgency-toggle:not(.is-active):hover:not(:disabled) { border-color: #d1d2b4; color: #51531d; background: #fbfbf4; }
.conversation-tag-picker { position: relative; display: inline-flex; min-width: 0; }
.conversation-tag-picker .conversation-tag-picker-caret { margin-left: 7px; color: #99928a; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1; }
.conversation-tag-picker.is-details { display: flex; width: 100%; }
.conversation-tag-picker.is-details > button { width: 100%; justify-content: space-between; }
.conversation-tag-menu { position: absolute; z-index: 80; top: calc(100% + 5px); left: 0; display: grid; width: min(232px,calc(100vw - 28px)); max-height: min(340px,52vh); gap: 2px; overflow: auto; padding: 5px; border: 1px solid #dce7e2; border-radius: 11px; color: #575837; background: #fff; box-shadow: 0 14px 34px rgba(37, 38, 11, .18),0 2px 7px rgba(37, 38, 11, .06); overscroll-behavior: contain; }
.conversation-tag-menu[hidden] { display: none; }
.conversation-tag-picker.is-details .conversation-tag-menu { top: auto; bottom: calc(100% + 5px); }
.conversation-tag-menu-option, .conversation-tag-create-option { display: grid; min-height: 32px; grid-template-columns: 13px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 0 8px; border: 0; border-radius: 7px; color: #6b6152; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: left; cursor: pointer; }
.conversation-tag-menu-option:hover, .conversation-tag-menu-option:focus-visible { outline: 0; color: color-mix(in srgb,var(--conversation-tag-color,#64652c) 82%,#383922); background: color-mix(in srgb,var(--conversation-tag-color,#64652c) 8%,white); }
.conversation-tag-menu-option.is-selected { color: color-mix(in srgb,var(--conversation-tag-color,#64652c) 82%,#383922); background: color-mix(in srgb,var(--conversation-tag-color,#64652c) 10%,white); font-weight: 680; }
.conversation-tag-menu-option > i { width: 9px; height: 9px; border: 1px solid color-mix(in srgb,var(--conversation-tag-color,#64652c) 50%,white); border-radius: 50%; background: var(--conversation-tag-color,#64652c); box-shadow: 0 0 0 2px color-mix(in srgb,var(--conversation-tag-color,#64652c) 12%,white); }
.conversation-tag-menu-check { min-width: 12px; color: var(--conversation-tag-color,#64652c); font-weight: 800; text-align: center; }
.conversation-tag-menu-divider { height: 1px; margin: 3px 4px; background: #edf1ee; }
.conversation-tag-create-option { color: #52756c; }
.conversation-tag-create-option:hover:not(:disabled), .conversation-tag-create-option:focus-visible { outline: 0; color: #535418; background: #f8f8f0; }
.conversation-tag-create-option > i { display: grid; width: 14px; height: 14px; place-items: center; border: 1px solid #e7e7d5; border-radius: 5px; color: #63642b; background: #f8f8f0; font-size: 12px; font-style: normal; }
.conversation-tag-create-option > small { color: #98a6a0; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-tag-create-option:disabled, .conversation-tag-menu-option:disabled { opacity: .55; cursor: default; }
.conversation-tag-menu-empty { padding: 9px; color: #879692; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.conversation-thread-actions { position: relative; z-index: 8; overflow: visible; }
.conversation-composer:focus-within { border-color: #dce6e2; box-shadow: none; }
.conversation-composer textarea:focus-visible { outline: 0; }
.conversation-workspace button:focus-visible { outline-color: #6a6b19; }
.conversation-load-older { display: block; min-height: 29px; margin: 0 auto 14px; padding: 0 10px; border: 1px solid #dce7e2; border-radius: 99px; color: #7b6e5d; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.conversation-load-older:hover:not(:disabled) { border-color: #d2d2b5; color: #54561c; background: #fafbf6; }
.conversation-load-older:disabled { color: #a29a92; cursor: default; }
.conversation-notes-load-older { justify-self: center; min-height: 28px; padding: 0 10px; border: 1px solid #dce7e2; border-radius: 99px; color: #7b6e5d; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.conversation-notes-load-older:hover:not(:disabled) { border-color: #d2d2b5; color: #54561c; background: #fafbf6; }
.conversation-notes-load-older:disabled { color: #a29a92; cursor: default; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .conversation-row-shell .conversation-row { padding: 10px 11px 5px; }
  .conversation-row-labels { padding: 0 11px 8px 57px; }
  .conversation-tag-menu { max-height: 42vh; }
}

/* Data-rich operations dashboard and channel source marks. */
.conversation-inbox-heading > div:first-child { gap: 0; }
.conversation-source-platforms { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 0 9px; }
.conversation-source-platform { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 11px; font: inherit; }
.conversation-source-platform[data-conversation-settings-open] { cursor: pointer; transition: border-color .14s ease,background .14s ease,box-shadow .14s ease,transform .14s ease; }
.conversation-source-platform[data-conversation-settings-open]:hover { border-color: #dadb9a; background: #fafae7; box-shadow: 0 3px 9px rgba(100, 100, 13, .12); transform: translateY(-1px); }
.conversation-source-platform[data-conversation-settings-open]:focus-visible { outline: 3px solid rgba(114, 117, 0, .24); outline-offset: 3px; }
.conversation-source-platform svg { display: block; width: 22px; height: 22px; fill: currentColor; stroke: none; }
.conversation-source-platform.is-whatsapp { border-color: #eaebd2; color: #5f6110; background: #f9f9ee; }
.conversation-source-platform.is-instagram { border-color: #f0dbe5; color: #b34276; background: #fff4f8; }
.conversation-source-platform.is-facebook { border-color: #ebf4d8; color: #5f7822; background: #fafff1; }

.dashboard-report { border-color: #dce7e1; background: #fcfcfa; box-shadow: 0 12px 38px rgba(52, 53, 25, .045); }
.dashboard-report-toolbar { display: flex; min-height: 58px; justify-content: space-between; gap: 12px; padding: 8px 15px; }
.dashboard-report-tabs { flex: 1; justify-content: flex-start; overflow-x: auto; }
.dashboard-report-tab { min-height: 40px; gap: 8px; padding: 0 12px; color: #7a7364; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.dashboard-report-tab > span.dashboard-tab-icon { display: grid; width: 17px; height: 17px; place-items: center; color: #9b928a; }
.dashboard-report-tab > span.dashboard-tab-icon svg { width: 15px; height: 15px; }
.dashboard-report-tab.is-active { border-color: #e6e7d3; color: #4e5012; background: #f7f7ec; box-shadow: inset 0 0 0 1px rgba(255,255,255,.85); }
.dashboard-report-tab.is-active > span.dashboard-tab-icon { color: #60621c; }
.dashboard-report-refresh { flex: 0 0 auto; min-height: 38px; border-radius: 9px; }
.dashboard-report-content { min-height: 280px; padding: 20px; }
.dashboard-report-content .metrics-grid { gap: 12px; }
.dashboard-report-content .metric-card { min-height: 116px; padding: 14px 15px 12px; border-color: #e5ebe6; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(59, 60, 32, .025); }
.dashboard-report-content .metric-top { gap: 8px; }
.dashboard-report-content .metric-icon { width: 25px; height: 25px; border-color: #edeee5; border-radius: 8px; color: #6d6e38; background: #f6f7f2; }
.dashboard-report-content .metric-label { color: #63766f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; letter-spacing: -.01em; }
.dashboard-report-content .metric-value { margin-top: 11px; font-size: calc(clamp(25px, 2.1vw, 31px) * var(--portal-text-scale)); }
.dashboard-report-content .metric-detail { margin-top: 6px; color: #84918b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-content .ops-panel { padding: 19px; border-color: #e1e9e3; border-radius: 13px; box-shadow: 0 2px 9px rgba(59, 60, 32, .025); }
.dashboard-report-content .ops-panel-heading h2 { font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-content .ops-panel-heading .eyebrow { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-content .dashboard-section-heading { align-items: center; margin-bottom: 17px; }
.dashboard-report-content .dashboard-section-heading h2 { font-size: calc(21px * var(--portal-text-scale)); }
.dashboard-report-content .dashboard-section-heading p:not(.eyebrow) { font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-content .dashboard-report-grid { gap: 13px; margin-top: 13px; }
.dashboard-report-content .dashboard-report-empty,
.dashboard-report-content .dashboard-report-loading,
.dashboard-report-content .dashboard-chart-empty { border-radius: 11px; }
.dashboard-report-content .dashboard-report-empty strong,
.dashboard-report-content .dashboard-report-loading strong,
.dashboard-report-content .dashboard-chart-empty strong { font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-content .dashboard-report-empty p,
.dashboard-report-content .dashboard-report-loading p,
.dashboard-report-content .dashboard-chart-empty p { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-report-content .dashboard-report-footnote { color: #71827d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-source { margin: 11px 0 10px; }

.dashboard-queue-status { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 14px; border: 1px solid #eaeadb; border-radius: 11px; background: #fafaf6; }
.dashboard-queue-status.is-attention { border-color: #eddfc0; background: #fffaf0; }
.dashboard-queue-status-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #57581d; background: #f1f1e3; font-size: 15px; font-weight: 800; }
.dashboard-queue-status.is-attention .dashboard-queue-status-icon { color: #9a7132; background: #faefd7; }
.dashboard-queue-status > div { min-width: 0; }
.dashboard-queue-status strong, .dashboard-channel-state strong { display: block; color: #595a39; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.dashboard-queue-status p, .dashboard-channel-state p { margin: 4px 0 0; color: #788b84; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dashboard-queue-personal { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px 13px; border: 1px solid #e7ede7; border-radius: 9px; color: #70817b; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-queue-personal strong { color: #50512b; font-size: calc(18px * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.dashboard-channel-state { display: flex; align-items: flex-start; gap: 11px; margin-top: 22px; padding: 15px 0; }
.dashboard-channel-state > .status-light { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; }
.dashboard-channel-state > div { min-width: 0; }
.dashboard-channel-state .status-light.is-offline { background: #aeb9b1; }
.dashboard-queue-personal + .ops-panel-footer, .channel-panel .ops-panel-footer { margin-top: 2px; }
.dashboard-overview-metrics .metric-card { background: #fff; }
.dashboard-overview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dashboard-report-content .dashboard-overview-card { min-height: 192px; padding: 16px; border-color: #e3ebe7; border-radius: 14px; box-shadow: 0 2px 9px rgba(56, 57, 27, .035); }
.dashboard-overview-heading { display: flex; min-height: 22px; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.dashboard-overview-heading h2 { margin: 0; color: #3e3d21; font-size: calc(14px * var(--portal-text-scale)); font-weight: 640; letter-spacing: -.025em; }
.dashboard-overview-source { color: #908981; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 560; white-space: nowrap; }
.dashboard-queue-summary { display: flex; min-height: 86px; align-items: center; gap: 11px; padding: 13px; border: 1px solid #e2ebe5; border-radius: 11px; background: #fafaf7; }
.dashboard-queue-summary.is-good { border-color: #eaeadb; background: #fafaf4; }
.dashboard-queue-summary.is-attention { border-color: #eee1c7; background: #fffaf1; }
.dashboard-queue-summary.is-muted { border-color: #e4e9e7; background: #f7f9f8; }
.dashboard-queue-summary-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #5b5d21; background: #f1f1e3; font-size: 14px; font-weight: 700; }
.dashboard-queue-summary.is-attention .dashboard-queue-summary-icon { color: #9a7132; background: #f9efd9; }
.dashboard-queue-summary.is-muted .dashboard-queue-summary-icon { color: #817a71; background: #e9efec; }
.dashboard-queue-summary > span:last-child { display: grid; min-width: 0; gap: 4px; }
.dashboard-queue-summary strong { color: #4d4e33; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; line-height: 1.35; }
.dashboard-queue-summary small { color: #778681; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 420; line-height: 1.45; }
.dashboard-overview-link { display: inline-flex; min-height: 29px; align-items: center; gap: 6px; margin-top: 8px; padding: 0; border: 0; color: #6a6d06; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; cursor: pointer; }
.dashboard-overview-link:hover { color: #585a05; }
.dashboard-overview-link svg { width: 13px; height: 13px; }
.dashboard-channel-list, .dashboard-signal-list { display: grid; }
.dashboard-channel-row { display: grid; min-width: 0; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 0; border-top: 1px solid #edf1ee; }
.dashboard-channel-row:first-child, .dashboard-signal-row:first-child { border-top: 0; }
.dashboard-channel-icon, .dashboard-signal-icon { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border: 1px solid #e1ebe7; border-radius: 9px; color: #6c6e0e; background: #f8f8f1; }
.dashboard-channel-icon svg, .dashboard-signal-icon svg { width: 15px; height: 15px; }
.dashboard-channel-icon.is-email { color: #6a6b19; background: #fcfcee; }
.dashboard-channel-icon.is-whatsapp { color: #5e601a; background: #f7f8ee; }
.dashboard-channel-icon.is-sms { color: #7473a3; background: #f5f4fa; }
.dashboard-channel-copy, .dashboard-signal-copy { display: grid; min-width: 0; gap: 3px; }
.dashboard-channel-copy strong, .dashboard-signal-copy strong { overflow: hidden; color: #4e4e33; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-channel-copy small, .dashboard-signal-copy small { overflow: hidden; color: #918a84; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 420; line-height: 1.4; text-overflow: ellipsis; }
.dashboard-channel-chip { display: inline-flex; min-height: 24px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 7px; border: 1px solid #e1e8e4; border-radius: 99px; color: #77847f; background: #f7f9f7; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; white-space: nowrap; }
.dashboard-channel-chip i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.dashboard-channel-chip.is-good { border-color: #e9e9d6; color: #5b5c26; background: #f8f8f1; }
.dashboard-channel-chip.is-attention { border-color: #eee1c7; color: #936c31; background: #fff9ed; }
.dashboard-channel-chip.is-muted { border-color: #e5eae7; color: #77847f; background: #f6f8f6; }
.dashboard-channel-chip.is-unavailable { border-color: #efdeda; color: #9b5d51; background: #fff5f2; }
.dashboard-channel-chip.is-checking { border-color: #eaeadb; color: #7f804d; background: #fafaf2; }
.dashboard-signal-row { display: grid; width: 100%; min-width: 0; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 9px 0; border: 0; border-top: 1px solid #edf1ee; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.dashboard-signal-row:hover .dashboard-signal-copy strong { color: #6a6d06; }
.dashboard-signal-icon { width: 27px; height: 27px; border-radius: 8px; color: #62642d; background: #f8f8f0; }
.dashboard-signal-icon.is-gold { color: #9b7942; background: #fbf7ef; }
.dashboard-signal-icon.is-purple { color: #6c70a0; background: #f5f4fa; }
.dashboard-signal-value { max-width: 100px; color: #5c5c3b; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; font-variant-numeric: tabular-nums; text-align: right; }
.dashboard-shortcut-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.dashboard-shortcut { display: grid; min-width: 0; min-height: 62px; grid-template-columns: 30px minmax(0,1fr) 14px; align-items: center; gap: 8px; padding: 9px; border: 1px solid #e8eeea; border-radius: 11px; color: inherit; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .14s ease,background .14s ease; }
.dashboard-shortcut:hover { border-color: #dfe0c6; background: #fcfcf8; }
.dashboard-shortcut:focus-visible, .dashboard-signal-row:focus-visible, .dashboard-overview-link:focus-visible { outline: 3px solid rgba(106, 109, 9, .2); outline-offset: 2px; }
.dashboard-shortcut-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #ebecde; border-radius: 9px; color: #5a5c1d; background: #f8f8f0; }
.dashboard-shortcut-icon svg { width: 15px; height: 15px; }
.dashboard-shortcut-copy { display: grid; min-width: 0; gap: 3px; }
.dashboard-shortcut-copy strong { overflow: hidden; color: #4e4e33; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-shortcut-copy small { overflow: hidden; color: #918a84; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 420; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-shortcut-arrow { display: grid; place-items: center; color: #94a39e; }
.dashboard-shortcut-arrow svg { width: 12px; height: 12px; }
.dashboard-domain-row { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid #edf1ed; }
.dashboard-domain-row:first-of-type { margin-top: 9px; }
.dashboard-domain-copy { min-width: 0; flex: 1; }
.dashboard-domain-copy strong { display: block; color: #565736; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-domain-copy p { margin: 4px 0 0; color: #8c837b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dashboard-domain-value { display: grid; flex: 0 0 auto; justify-items: end; color: #52532c; font-size: calc(17px * var(--portal-text-scale)); font-weight: 750; font-variant-numeric: tabular-nums; }
.dashboard-domain-value small { color: #85938e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; }
.quick-row .quick-number { color: #6f7039; }
.quick-row .quick-number svg { width: 14px; height: 14px; }

.dashboard-attendance-split { margin-top: 20px; }
.dashboard-attendance-split-labels, .dashboard-service-health > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #697e78; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-attendance-split-labels strong { margin-left: 5px; color: #55562f; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-attendance-bar { display: flex; width: 100%; height: 10px; overflow: hidden; margin-top: 11px; border-radius: 99px; background: #f4e9d0; }
.dashboard-attendance-bar svg, .dashboard-outcome-track svg { display: block; width: 100%; height: 100%; }
.dashboard-attendance-bar svg rect.is-assigned { fill: #898b40; }
.dashboard-attendance-bar svg rect.is-unassigned { fill: #e0b75f; }
.dashboard-attendance-split > small { display: block; margin-top: 9px; color: #84918c; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.attendance-channel-panel .ops-panel-footer { justify-content: flex-start; }
.attendance-channel-panel .dashboard-channel-state { margin-top: 19px; }

.dashboard-broadcast-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.dashboard-broadcast-metrics .campaign-metric { min-height: 108px; padding: 14px 15px; border-color: #e1e9e3; border-radius: 12px; }
.dashboard-broadcast-metrics .campaign-metric > span { color: #71827d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: .07em; }
.dashboard-broadcast-metrics .campaign-metric > strong { margin-top: 7px; color: #40411f; font-size: calc(25px * var(--portal-text-scale)); }
.dashboard-broadcast-metrics .campaign-metric > small { color: #788b85; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.dashboard-broadcast-list { padding: 12px 16px !important; }
.dashboard-broadcast-activity { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.dashboard-broadcast-activity li { display: grid; grid-template-columns: 73px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 58px; border-bottom: 1px solid #edf1ed; }
.dashboard-broadcast-activity li:last-child { border-bottom: 0; }
.dashboard-broadcast-channel { display: inline-flex; min-height: 24px; align-items: center; justify-content: center; padding: 0 7px; border: 1px solid #e8e9dc; border-radius: 7px; color: #5c5d27; background: #f8f8f2; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.dashboard-broadcast-channel.is-e-mail { border-color: #e9e3d4; color: #8a7146; background: #fcf8ee; }
.dashboard-broadcast-copy { display: grid; min-width: 0; gap: 4px; }
.dashboard-broadcast-copy strong { overflow: hidden; color: #595938; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-broadcast-copy small, .dashboard-broadcast-count small { color: #83918d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-broadcast-count { display: grid; justify-items: end; gap: 3px; }
.dashboard-broadcast-count strong { color: #565631; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }

.dashboard-outcomes-panel { min-height: 250px; }
.dashboard-outcome-list { display: grid; gap: 13px; margin-top: 19px; }
.dashboard-outcome-row > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #6c807a; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-outcome-row strong { color: #585835; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.dashboard-outcome-track { height: 8px; overflow: hidden; margin-top: 6px; border-radius: 99px; background: #eef2ee; }
.dashboard-outcome-track rect.is-success { fill: #84863c; }
.dashboard-outcome-track rect.is-failed { fill: #d47a64; }
.dashboard-outcome-track rect.is-cancelled { fill: #b0a8ca; }
.dashboard-outcome-track rect.is-running { fill: #dbb45a; }
.dashboard-knowledge-notice { display: flex; align-items: flex-start; gap: 11px; margin: 12px 0; padding: 13px 15px; border: 1px solid #eaeadb; border-radius: 11px; color: #52532b; background: #fafaf4; }
.dashboard-knowledge-notice.is-attention { border-color: #eadfc3; color: #82662f; background: #fffaf0; }
.dashboard-knowledge-notice.is-partial { border-color: #e7eadb; color: #7e805d; background: #f9faf5; }
.dashboard-knowledge-notice > span { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: rgba(255,255,255,.76); font-weight: 800; }
.dashboard-knowledge-notice strong { display: block; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-knowledge-notice p { margin: 4px 0 0; color: #788980; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.dashboard-system-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
.dashboard-system-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 78px; border-bottom: 1px solid #edf1ed; }
.dashboard-system-row .status-light { width: 8px; height: 8px; }
.dashboard-system-copy { min-width: 0; }
.dashboard-system-copy > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dashboard-system-copy strong { color: #585838; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-system-copy p { margin: 4px 0 0; color: #81908b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.dashboard-system-row .work-icon { width: 29px; height: 29px; }
.dashboard-system-row .system-state { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-system-row .system-state.is-checking { color: #8c9690; }
.dashboard-system-row .system-state.is-not-integrated { color: #839087; }
.dashboard-service-health { margin: 0 0 15px; padding: 2px 0 15px; border-bottom: 1px solid #edf1ed; }
.dashboard-service-health > div:first-child strong { color: #55562f; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-service-health .dashboard-attendance-bar { height: 9px; background: #f1e8d6; }

@media (max-width: 980px) {
  .dashboard-report-toolbar { align-items: center; }
  .dashboard-report-tabs { width: auto; padding-inline: 0; }
  .dashboard-report-refresh { grid-column: auto; grid-row: auto; justify-self: auto; }
  .dashboard-broadcast-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-system-list { gap: 0 14px; }
}
@media (max-width: 760px) {
  .conversation-source-platform { width: 32px; height: 32px; }
  .dashboard-report-toolbar { align-items: stretch; flex-direction: column; padding: 9px 10px; }
  .dashboard-report-tabs { width: 100%; flex-wrap: nowrap; gap: 3px; overflow-x: auto; padding: 0 0 4px; }
  .dashboard-report-tab { min-height: 37px; padding-inline: 10px; white-space: nowrap; }
  .dashboard-report-refresh { align-self: flex-end; }
  .dashboard-report-content { padding: 13px; }
  .dashboard-report-content .ops-panel { padding: 15px; }
  .dashboard-report-content .dashboard-section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .dashboard-report-content .dashboard-section-heading h2 { font-size: calc(19px * var(--portal-text-scale)); }
  .dashboard-overview-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-overview-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .dashboard-report-content .dashboard-overview-card { min-height: 0; padding: 14px; }
  .dashboard-overview-metrics .metric-card { min-height: 106px; padding: 12px; }
  .dashboard-domain-row { align-items: flex-start; gap: 8px; }
  .dashboard-domain-row .integration-mark { width: 27px; height: 27px; }
  .dashboard-domain-value { font-size: calc(15px * var(--portal-text-scale)); }
  .dashboard-broadcast-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-broadcast-metrics .campaign-metric { min-height: 92px; padding: 11px; }
  .dashboard-broadcast-metrics .campaign-metric > strong { font-size: calc(22px * var(--portal-text-scale)); }
  .dashboard-broadcast-activity li { grid-template-columns: 62px minmax(0,1fr) auto; gap: 8px; }
  .dashboard-broadcast-channel { padding-inline: 5px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-system-list { grid-template-columns: minmax(0,1fr); }
  .dashboard-system-row { min-height: 72px; }
  .dashboard-attendance-split-labels { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-queue-personal { padding: 9px 11px; }
  .dashboard-knowledge-notice { padding: 11px; }
  .dashboard-report-content .metric-card { min-height: 106px; padding: 11px 12px; }
  .dashboard-report-content .metric-label { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-report-content .metric-value { margin-top: 9px; font-size: calc(24px * var(--portal-text-scale)); }
  .dashboard-report-content .metric-detail { margin-top: 5px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
}

@media (max-width: 760px) {
  .campaign-audience-toolbar { align-items: stretch; flex-wrap: wrap; padding: 10px 13px; }
  .campaign-audience-toolbar .campaign-list-search { width: auto; max-width: none; flex: 1 1 100%; }
  .campaign-audience-summary { margin-left: auto; align-self: center; }
  .campaign-subscriber-head { display: none; }
  .campaign-subscriber-row { grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; padding: 12px 13px; }
  .campaign-subscriber-row > .campaign-subscriber-person { grid-column: 1; grid-row: 1 / span 2; }
  .campaign-subscriber-row > .campaign-subscriber-status:nth-of-type(1) { grid-column: 2; grid-row: 1; justify-self: end; }
  .campaign-subscriber-row > .campaign-subscriber-status:nth-of-type(2) { grid-column: 2; grid-row: 2; justify-self: end; }
  .campaign-subscriber-row > .audience-member-remove { grid-column: 2; grid-row: 3; justify-self: end; }
  .audience-eligible-list label { align-items: flex-start; flex-wrap: wrap; }
  .audience-eligible-list label > span { flex: 1; }
  .audience-eligible-list label > small:last-child { flex-basis: calc(100% - 23px); margin-left: 23px; white-space: normal; }
}

/* Inicio report tabs share the same metric, panel, and data-quality language. */
.dashboard-report-content .dashboard-broadcast-metrics { margin-bottom: 2px; }
.dashboard-audience-section { margin-top: 14px; }
.dashboard-audience-panel { min-height: 190px; }
.dashboard-audience-coverage { margin-top: 17px; }
.dashboard-audience-coverage > div:first-child { display: flex; justify-content: space-between; gap: 12px; color: #697e78; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-audience-coverage > div:first-child strong { color: #55562f; font-size: calc((17px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.dashboard-coverage-track { height: 10px; overflow: hidden; margin-top: 12px; border-radius: 99px; background: #edf1ed; }
.dashboard-coverage-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#6c6e2a,#bbbd55); }
.dashboard-audience-coverage small { display: block; margin-top: 9px; color: #84918c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-audience-list { display: grid; margin: 8px 0 0; padding: 0; list-style: none; }
.dashboard-audience-list li { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; min-height: 47px; padding: 7px 0; border-bottom: 1px solid #edf1ed; }
.dashboard-audience-list li:last-child { border-bottom: 0; }
.dashboard-audience-list li > span { display: grid; min-width: 0; gap: 3px; }
.dashboard-audience-list li > span strong { overflow: hidden; color: #5d5e3c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-audience-list li small { color: #89958f; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 500; }
.dashboard-audience-list li > strong { display: grid; flex: 0 0 auto; justify-items: end; color: #52532b; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.dashboard-audience-overview { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 13px 0; border-top: 1px solid #edf1ed; }
.dashboard-audience-overview .dashboard-domain-copy { flex: 1; }
.dashboard-email-analytics { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e8eeea; }
.dashboard-email-rate-metrics { margin: 10px 0 13px; }
.dashboard-automation-recent { min-height: 250px; }
.dashboard-automation-activity { display: grid; margin: 10px 0 0; padding: 0; list-style: none; }
.dashboard-automation-activity li { display: grid; grid-template-columns: 29px minmax(0,1fr) auto auto; align-items: center; gap: 10px; min-height: 58px; padding: 6px 0; border-bottom: 1px solid #edf1ed; }
.dashboard-automation-activity li:last-child { border-bottom: 0; }
.dashboard-automation-run-icon { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #e4e4f1; border-radius: 8px; color: #6f72a7; background: #f5f4fa; }
.dashboard-automation-run-icon.has-issues { border-color: #eee5d3; color: #9e7940; background: #fbf7ed; }
.dashboard-automation-run-icon svg { width: 14px; height: 14px; }
.dashboard-automation-run-copy { display: grid; min-width: 0; gap: 4px; }
.dashboard-automation-run-copy strong { overflow: hidden; color: #595938; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-automation-run-copy small, .dashboard-automation-run-outcome small { color: #83918d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-automation-run-outcome { display: grid; justify-items: end; gap: 3px; }
.dashboard-automation-run-outcome strong { color: #565631; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.dashboard-run-trend { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); align-items: end; gap: 9px; height: 145px; margin-top: 15px; padding: 8px 2px 0; border-bottom: 1px solid #edf1ed; }
.dashboard-run-trend > span { display: flex; height: 100%; min-width: 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.dashboard-run-trend i { display: block; width: min(28px,70%); min-height: 4px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg,#b4b654,#6d6e2c); }
.dashboard-run-trend small { overflow: hidden; max-width: 100%; color: #84918d; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-category-columns, .dashboard-freshness-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 10px; }
.dashboard-category-group, .dashboard-data-quality { min-width: 0; }
.dashboard-category-group h3, .dashboard-data-quality h3 { margin: 0 0 9px; color: #6e6053; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.dashboard-category-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dashboard-category-list li { display: grid; gap: 5px; }
.dashboard-category-list li > span { display: flex; justify-content: space-between; gap: 8px; }
.dashboard-category-list li > span strong { overflow: hidden; color: #655647; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.dashboard-category-list li > span small { flex: 0 0 auto; color: #81908b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.dashboard-category-list li > i { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: #edf2ee; }
.dashboard-category-list li > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#898b40,#bcbe76); }
.dashboard-data-quality { padding: 11px 12px; border: 1px solid #e6ede8; border-radius: 10px; background: #fcfcfa; }
.dashboard-data-quality .dashboard-status-list { margin-top: 0; }
.dashboard-data-quality .dashboard-status-list li { min-height: 32px; }
.dashboard-data-quality .dashboard-status-list li span { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.dashboard-data-quality .dashboard-status-list li strong { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: right; }
.dashboard-system-list { gap: 0 20px; }
.dashboard-system-row { min-height: 76px; }
.dashboard-system-copy > div { flex-wrap: wrap; }

@media (max-width: 980px) {
  .dashboard-category-columns, .dashboard-freshness-columns { gap: 10px; }
  .dashboard-automation-activity li { grid-template-columns: 27px minmax(0,1fr) auto auto; gap: 7px; }
}
@media (max-width: 760px) {
  .dashboard-email-analytics { margin-top: 13px; padding-top: 13px; }
  .dashboard-audience-section { margin-top: 12px; }
  .dashboard-audience-overview { align-items: flex-start; gap: 8px; }
  .dashboard-audience-overview .integration-mark { width: 27px; height: 27px; }
  .dashboard-audience-list li { align-items: flex-start; }
  .dashboard-category-columns, .dashboard-freshness-columns { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .dashboard-automation-activity li { grid-template-columns: 27px minmax(0,1fr) auto; gap: 7px; }
  .dashboard-automation-run-outcome:last-child { grid-column: 3; }
  .dashboard-automation-activity li { min-height: 66px; }
  .dashboard-run-trend { gap: 5px; height: 120px; }
  .dashboard-run-trend small { font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .dashboard-system-row { min-height: 72px; }
}

/* Keep the three-step track centered while placing the model library at its left. */
.broadcast-composer-title { min-height: 82px; flex: 0 0 82px; align-items: center; justify-content: flex-end; padding: 18px 25px; border: 0; }
.broadcast-composer-progress-row { position: relative; display: flex; flex: 0 0 67px; align-items: center; justify-content: center; box-sizing: border-box; min-height: 67px; padding: 14px 20px; border-bottom: 1px solid #e6ece7; background: #fff; }
.broadcast-composer-progress-row .broadcast-composer-progress { width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.broadcast-template-action { position: absolute; z-index: 1; top: 50%; left: 25px; display: inline-flex; min-height: 37px; align-items: center; gap: 7px; padding: 0 12px; transform: translateY(-50%); white-space: nowrap; }
.broadcast-template-action svg { width: 15px; height: 15px; }
.broadcast-step-intro { align-items: flex-start; }
.broadcast-settings-grid.broadcast-email-settings, .broadcast-settings-grid.broadcast-whatsapp-settings { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 18px; }
.broadcast-contact-selector[hidden], .broadcast-contact-results[hidden], .broadcast-selected-contacts[hidden], .broadcast-email-settings > [data-broadcast-email-audience-control][hidden] { display: none !important; }

@media (max-width: 760px) {
  .broadcast-composer-title { min-height: 72px; flex-basis: 72px; padding: 13px 15px; }
  .broadcast-composer-progress-row { flex-basis: auto; min-height: 58px; padding: 11px 8px; }
  .broadcast-composer-progress-row .broadcast-composer-progress { justify-content: center; gap: 4px; }
  .broadcast-composer-progress-row .broadcast-composer-progress > i { width: 14px; }
  .broadcast-composer-progress-row .broadcast-composer-progress button { gap: 5px; }
  .broadcast-composer-progress-row .broadcast-composer-progress button span { width: 27px; height: 27px; }
  .broadcast-composer-progress-row .broadcast-composer-progress button strong { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
  .broadcast-composer-progress-row .broadcast-composer-progress button:not([aria-current="step"]) strong { display: none; }
  .broadcast-template-action { left: 15px; min-height: 34px; padding-inline: 9px; }
  .broadcast-settings-grid.broadcast-email-settings, .broadcast-settings-grid.broadcast-whatsapp-settings { grid-template-columns: minmax(0,1fr); gap: 11px; }
}

@media (max-width: 560px) {
  .broadcast-template-action { min-height: 32px; padding-inline: 8px; }
  .broadcast-template-action svg { width: 14px; height: 14px; }
}

/* Disparos: keep model access, view tabs, and refresh in distinct positions. */
.broadcast-workspace-heading > .broadcast-workspace-leading { grid-column: 1; grid-row: 1; justify-self: start; }
.broadcast-workspace-heading > .broadcast-view-tabs { grid-column: 2; grid-row: 1; }
.broadcast-workspace-heading > .broadcast-workspace-actions { grid-column: 3; grid-row: 1; justify-self: end; }
.section-toolbar-action { display: inline-flex; min-height: 37px; align-items: center; gap: 7px; padding: 0 12px; border-radius: 7px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; white-space: nowrap; cursor: pointer; }
.intelligence-refresh:disabled { color: #bfbbb4; background: #fafbfa; cursor: default; }

/* Intelligence records are deliberately limited to a title row and a detail row. */
.intelligence-record-list { overflow: hidden; border-top: 1px solid #e9efeb; background: #fff; }
.intelligence-record { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 13px; row-gap: 4px; min-height: 66px; padding: 8px 13px 8px 16px; }
.intelligence-record::before { width: 2px; }
.intelligence-record-main { display: grid; grid-column: 1; grid-row: 1; min-width: 0; gap: 4px; }
.intelligence-record-heading { display: flex; min-width: 0; align-items: center; gap: 9px; }
.intelligence-record-heading h3 { min-width: 0; flex: 1 1 auto; margin: 0; overflow: hidden; color: #444524; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-labels { display: flex; min-width: 0; flex: 0 0 auto; align-items: center; gap: 5px; }
.intelligence-record-labels .intelligence-type-badge { min-height: 19px; gap: 4px; padding-inline: 7px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-labels .intelligence-type-badge > span { font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-labels .intelligence-status { min-height: 19px; padding-inline: 7px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-subline { display: flex; min-width: 0; align-items: center; gap: 12px; }
.intelligence-record-copy, .intelligence-record-empty { display: block; min-width: 0; overflow: hidden; color: #868471; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-empty { color: #a5a09a; font-style: italic; }
.intelligence-record-full { min-width: 0; flex: 1 1 auto; margin: 0; color: #6f6c52; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-full summary { display: flex; min-width: 0; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.intelligence-record-full summary::-webkit-details-marker { display: none; }
.intelligence-record-full summary:focus-visible { border-radius: 4px; outline: 2px solid #9e9f58; outline-offset: 2px; }
.intelligence-record-read { flex: 0 0 auto; color: #595a1d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.intelligence-record-full > p { max-height: 220px; margin: 9px 0 3px; overflow: auto; color: #6f6c52; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.intelligence-record-meta { display: flex; max-width: 42%; flex: 0 1 auto; gap: 7px; margin: 0; overflow: hidden; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.intelligence-record-meta > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.intelligence-record-meta > span + span::before { content: '· '; }
.intelligence-record-actions { display: flex; grid-column: 2; grid-row: 1; width: auto; align-items: center; align-self: center; justify-content: flex-end; flex-wrap: nowrap; gap: 4px; }
.intelligence-row-action { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid #e1e9e4; border-radius: 8px; color: #767258; background: #fff; text-decoration: none; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.intelligence-row-action:hover { border-color: #d3d3b3; color: #565810; background: #fafaf3; }
.intelligence-row-action:focus-visible { outline: 2px solid #86883d; outline-offset: 2px; }
.intelligence-row-action svg { width: 14px; height: 14px; }
.intelligence-row-action.intelligence-delete { color: #9b615c; }
.intelligence-row-action.intelligence-delete:hover { border-color: #e3bbb5; color: #a33e35; background: #fff5f3; }
.audience-list-dialog form[aria-busy="true"] { cursor: progress; }
.audience-management-feedback { margin: 0; padding: 10px 14px; }

@media (max-width: 760px) {
  .broadcast-workspace-heading { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .broadcast-workspace-heading > .broadcast-workspace-leading { grid-column: 1; grid-row: 2; justify-self: start; }
  .broadcast-workspace-heading > .broadcast-view-tabs { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .broadcast-workspace-heading > .broadcast-workspace-actions { grid-column: 2; grid-row: 2; justify-self: end; }
  .intelligence-record { display: grid; align-items: center; flex-direction: initial; }
  .intelligence-record-main { grid-column: 1; grid-row: 1; }
  .intelligence-record-heading { gap: 6px; }
  .intelligence-record-heading h3 { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-record-labels { gap: 3px; }
  .intelligence-record-labels .intelligence-type-badge { padding-inline: 5px; }
  .intelligence-record-subline { display: block; }
  .intelligence-record-meta { display: none; }
  .intelligence-record-actions { grid-column: 2; grid-row: 1; width: auto; }
  .intelligence-record-actions .table-action { flex: 0 0 auto; justify-content: center; }
}

@media (max-width: 440px) {
  .broadcast-workspace-heading { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  .broadcast-workspace-heading .broadcast-workspace-leading .campaign-panel-link,
  .broadcast-workspace-heading .broadcast-workspace-actions .campaign-panel-link { min-height: 33px; padding-inline: 8px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-record { column-gap: 7px; padding-inline: 11px 8px; }
  .intelligence-record-labels .intelligence-status { padding-inline: 5px; }
  .intelligence-record-actions { gap: 3px; }
  .intelligence-row-action { width: 27px; height: 27px; }
}

@media (max-width: 420px) {
  .contact-import-map-groups { grid-template-columns: minmax(0,1fr); }
  .contact-import-head-actions { gap: 6px; }
  .contact-import-head-actions .contact-import-text-button { padding-inline: 7px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .contact-import-summary > div { align-items: flex-start; flex-direction: column; }
  .contact-import-preview-table th, .contact-import-preview-table td { padding: 7px 6px; }
  .contact-import-preview-table th:nth-child(3), .contact-import-preview-table td:nth-child(3) { display: none; }
}

/* Públicos: compact list management and a clear CRM contact selection flow. */
.campaign-audience-panel { border-color: #dce7e0; background: #fff; }
.broadcast-view-panel .campaign-audience-panel > .campaign-panel-heading { min-height: 76px; padding: 15px 19px 13px; }
.broadcast-view-panel .campaign-audience-panel > .campaign-panel-heading h2 { color: #3d3e1f; font-size: calc(18px * var(--portal-text-scale)); letter-spacing: -.035em; }
.campaign-audience-panel > .campaign-panel-heading > div > p:last-child { margin-top: 4px; color: #788a83; font-size: calc(10px * var(--portal-text-scale)); }
.campaign-audience-toolbar { min-height: 56px; gap: 12px; padding: 9px 18px; border-bottom: 1px solid #e9efea; background: #fcfcf9; }
.campaign-audience-toolbar .campaign-list-search { width: min(360px,54%); min-height: 36px; }
.campaign-audience-toolbar .campaign-list-search input { min-height: 34px; }
.campaign-audience-state-filter { color: #70827a; font-size: calc(10px * var(--portal-text-scale)); }
.campaign-audience-state-filter select { min-height: 35px; border-color: #dce6df; border-radius: 8px; color: #565736; font-size: calc(10px * var(--portal-text-scale)); }
.campaign-audience-summary { color: #87958d; font-size: calc(10px * var(--portal-text-scale)); }
.campaign-audience-summary strong { color: #5a5c2a; font-weight: 760; }
.campaign-audience-summary i { display: inline-block; width: 3px; height: 3px; margin: 0 7px 2px; border-radius: 50%; background: #a8b5ac; }
.campaign-audience-list { padding: 3px 14px; }
.campaign-audience-item { display: grid; grid-template-columns: minmax(0,1fr) auto; min-width: 0; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px solid #edf1ed; }
.campaign-audience-item:last-child { border-bottom: 0; }
.campaign-audience-item.is-selected { background: linear-gradient(90deg,#f7f8f3,#fff 58%); }
.campaign-audience-item.is-archived { opacity: .78; }
.campaign-audience-main { display: grid; grid-template-columns: 36px minmax(0,1fr) auto 13px; min-width: 0; align-items: center; gap: 11px; padding: 3px 5px; border: 0; border-radius: 9px; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.campaign-audience-main:hover { background: #fafaf6; }
.campaign-audience-main:focus-visible, .campaign-audience-actions button:focus-visible, .audience-contact-option:focus-within { outline: 2px solid #a1a35d; outline-offset: 2px; }
.campaign-audience-mark { width: 34px; height: 34px; border-color: #eaebdd; border-radius: 10px; color: #5b5c29; background: #f7f7f1; }
.campaign-audience-mark svg { width: 16px; height: 16px; }
.campaign-audience-name { gap: 3px; }
.campaign-audience-name strong { color: #444525; font-size: calc(12px * var(--portal-text-scale)); font-weight: 730; letter-spacing: -.01em; }
.campaign-audience-name small { overflow: hidden; color: #7d8d86; font-size: calc(10px * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.campaign-audience-meta { display: flex; min-width: 0; align-items: center; gap: 8px; margin-top: 2px; color: #9aa69f; font-size: calc(9px * var(--portal-text-scale)); }
.campaign-audience-status { display: inline-flex; min-height: 19px; align-items: center; padding: 0 7px; border: 1px solid #e9e9d6; border-radius: 99px; color: #5d5e2c; background: #f8f8f1; font-size: calc(9px * var(--portal-text-scale)); font-style: normal; font-weight: 700; }
.campaign-audience-status.is-archived { border-color: #e6e8e3; color: #7d8982; background: #f5f6f3; }
.campaign-audience-count { gap: 2px; color: #527168; }
.campaign-audience-count strong { font-size: calc(17px * var(--portal-text-scale)); font-weight: 740; }
.campaign-audience-count small { color: #8b9b93; font-size: calc(9px * var(--portal-text-scale)); font-weight: 560; }
.campaign-audience-chevron { color: #9aaba2; }
.campaign-audience-chevron svg { width: 13px; height: 13px; }
.campaign-audience-actions { display: flex; align-items: center; gap: 6px; }
.campaign-audience-actions button { min-height: 31px; padding: 0 10px; border: 1px solid #dce7df; border-radius: 8px; color: #4e7264; background: #fff; font: inherit; font-size: calc(10px * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.campaign-audience-actions button:hover { border-color: #d3d4b9; color: #4f5119; background: #fbfbf7; }
.campaign-audience-actions button.is-archive { border-color: #e7e7df; color: #78847c; }
.campaign-audience-actions button.is-reactivate { border-color: #e9e9d6; color: #5b5c29; background: #fafaf4; }
.campaign-footnote { padding: 1px 18px 12px; color: #87968e; font-size: calc(9px * var(--portal-text-scale)); }
.campaign-audience-empty { display: flex; min-height: 126px; align-items: center; gap: 14px; padding: 20px 22px; }
.campaign-audience-empty-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid #ebecde; border-radius: 13px; color: #595a27; background: #f8f8f1; }
.campaign-audience-empty-mark svg { width: 19px; height: 19px; }
.campaign-audience-empty > div { min-width: 0; flex: 1; }
.campaign-audience-empty > div strong { color: #444526; font-size: calc(13px * var(--portal-text-scale)); font-weight: 740; }
.campaign-audience-empty > div p { max-width: 620px; margin: 4px 0 0; color: #7a8b83; font-size: calc(10px * var(--portal-text-scale)); line-height: 1.45; }
.campaign-audience-empty > .contact-create-button { min-height: 38px; flex: 0 0 auto; }
.campaign-audience-filter-empty { min-height: 108px; }
.campaign-audience-state { min-height: 190px; }
.campaign-subscriber-panel { margin-top: 14px; border-color: #dce7e0; border-radius: 13px; }
.campaign-subscriber-panel .campaign-panel-heading { padding: 17px 20px 14px; }
.campaign-subscriber-panel .campaign-panel-heading h2 { color: #434424; font-size: calc(16px * var(--portal-text-scale)); }
.campaign-subscriber-panel .campaign-panel-heading > div > p:last-child { max-width: 750px; color: #788a82; font-size: calc(10px * var(--portal-text-scale)); }
.campaign-subscriber-toolbar { min-height: 50px; padding: 8px 17px; background: #fdfdfa; }
.campaign-subscriber-total { margin-left: auto; color: #57766a; font-size: calc(10px * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.campaign-subscriber-head { min-height: 35px; background: #fcfcf9; }
.campaign-subscriber-row { min-height: 58px; }
.campaign-subscriber-person strong { color: #4c4c2f; font-size: calc(11px * var(--portal-text-scale)); }
.campaign-subscriber-person small, .campaign-subscriber-status { color: #7d8d85; font-size: calc(9px * var(--portal-text-scale)); }
.audience-member-remove { min-height: 29px; padding: 0 9px; border-radius: 7px; font-size: calc(9px * var(--portal-text-scale)); }
.audience-add-contacts { display: grid; gap: 10px; padding: 15px 17px 16px; border-top: 1px solid #e8eee9; background: #fcfcf9; }
.audience-add-heading { align-items: center; padding: 0; color: #648075; font-size: calc(10px * var(--portal-text-scale)); }
.audience-add-heading > div { gap: 3px; }
.audience-add-heading .eyebrow { margin: 0; color: #82968a; font-size: calc(8px * var(--portal-text-scale)); font-weight: 760; letter-spacing: .08em; }
.audience-add-heading h3 { color: #4b4c2e; font-size: calc(13px * var(--portal-text-scale)); font-weight: 730; }
.audience-add-heading p:not(.eyebrow) { color: #7e8d85; font-size: calc(10px * var(--portal-text-scale)); }
.audience-add-selected-count { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #e8e9dc; border-radius: 99px; color: #6c6d43; background: #f9f9f3; font-size: calc(9px * var(--portal-text-scale)); font-weight: 700; }
.audience-contact-search-row { display: flex; min-width: 0; align-items: center; gap: 8px; }
.audience-contact-search-row .campaign-list-search { max-width: 440px; min-height: 37px; flex: 1; }
.audience-contact-search-row .campaign-panel-link { min-height: 35px; }
.audience-selected-contact-wrap { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.audience-selected-contact-list { display: flex; min-width: 0; flex-wrap: wrap; gap: 6px; }
.audience-selected-contact { display: inline-flex; max-width: 190px; min-height: 25px; align-items: center; gap: 5px; padding: 0 5px 0 9px; border: 1px solid #e6e7d3; border-radius: 99px; color: #65653a; background: #f8f8f1; }
.audience-selected-contact strong { overflow: hidden; font-size: calc(9px * var(--portal-text-scale)); font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.audience-selected-contact button { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #62836b; background: transparent; font: inherit; font-size: 15px; cursor: pointer; }
.audience-selected-contact button:hover { color: #973f36; background: #fbecea; }
.audience-selected-contact-more { align-self: center; color: #648070; font-size: calc(9px * var(--portal-text-scale)); font-weight: 700; }
.audience-selection-clear { min-height: 27px; flex: 0 0 auto; padding: 0 8px; border: 1px solid #e2e9e3; border-radius: 7px; color: #73877c; background: #fff; font: inherit; font-size: calc(9px * var(--portal-text-scale)); cursor: pointer; }
.audience-eligible-list { display: grid; max-height: 286px; overflow: auto; padding: 0 2px; border-top: 1px solid #e9efea; border-bottom: 1px solid #e9efea; scrollbar-gutter: stable; }
.audience-contact-option { display: grid; grid-template-columns: 16px 31px minmax(0,1fr) auto; min-width: 0; min-height: 54px; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid #edf1ed; border-radius: 7px; cursor: pointer; }
.audience-contact-option:last-child { border-bottom: 0; }
.audience-contact-option:hover { background: #f9f9f5; }
.audience-contact-option.is-selected { background: #f8f8f0; }
.audience-contact-option.is-current-member { cursor: default; }
.audience-contact-option.is-limit { opacity: .5; cursor: not-allowed; }
.audience-contact-option input { width: 16px; height: 16px; margin: 0; accent-color: #5c5d1c; }
.audience-contact-avatar { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #e0eae1; border-radius: 9px; color: #626335; background: #f7f7f1; font-size: calc(11px * var(--portal-text-scale)); font-weight: 760; }
.audience-contact-copy { display: grid; min-width: 0; gap: 3px; }
.audience-contact-copy strong { overflow: hidden; color: #535333; font-size: calc(11px * var(--portal-text-scale)); font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.audience-contact-copy small { overflow: hidden; color: #829188; font-size: calc(9px * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.audience-contact-badges { display: flex; min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.audience-contact-badges i { padding: 4px 6px; border: 1px solid #e4eae4; border-radius: 99px; color: #718279; background: #fff; font-size: calc(8px * var(--portal-text-scale)); font-style: normal; font-weight: 640; white-space: nowrap; }
.audience-contact-badges i.is-eligible, .audience-contact-badges i.is-member { border-color: #e7e8d4; color: #5f6130; background: #f8f8f1; }
.audience-contact-badges i.is-muted { border-color: #eedfdb; color: #9a655a; background: #fff8f5; }
.audience-contact-state { display: grid; min-height: 90px; align-content: center; gap: 4px; padding: 14px 10px; color: #536e60; }
.audience-contact-state strong { color: #555636; font-size: calc(11px * var(--portal-text-scale)); }
.audience-contact-state > span { color: #7d8d83; font-size: calc(9px * var(--portal-text-scale)); }
.audience-contact-state.is-loading { display: flex; align-items: center; gap: 10px; }
.audience-contact-pagination { display: flex; min-height: 37px; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 7px; color: #87958c; font-size: calc(9px * var(--portal-text-scale)); }
.audience-contact-pagination > div { display: flex; gap: 5px; }
.audience-contact-pagination button { min-height: 27px; padding: 0 9px; border: 1px solid #dfe8e0; border-radius: 7px; color: #50705f; background: #fff; font: inherit; font-size: calc(9px * var(--portal-text-scale)); cursor: pointer; }
.audience-contact-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.audience-contact-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.audience-contact-footer > span { color: #829187; font-size: calc(9px * var(--portal-text-scale)); }
.audience-contact-footer .contact-create-button { min-height: 35px; }
.audience-contact-footer .contact-create-button:disabled { opacity: .5; cursor: not-allowed; }
.audience-management-feedback { border-color: #e7e8d8; border-radius: 9px; color: #5d5e2c; background: #f8f8f2; }
.audience-list-dialog[open] { width: min(580px,calc(100vw - 28px)); height: auto; min-height: 0; max-height: calc(100dvh - 28px); overflow: hidden; border-color: #dce7e0; border-radius: 17px; }
.audience-list-dialog-wide[open] { width: min(760px,calc(100vw - 28px)); height: min(760px,calc(100dvh - 28px)); }
.audience-list-dialog > form { min-height: 0; flex: 1 1 auto; }
.audience-editor-shell { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.audience-dialog-head { padding: 20px 23px 15px; }
.audience-dialog-head h2 { color: #414222; font-size: calc(22px * var(--portal-text-scale)); letter-spacing: -.04em; }
.audience-dialog-head p:not(.eyebrow) { max-width: 610px; color: #7a8c81; font-size: calc(11px * var(--portal-text-scale)); }
.audience-flow-progress { display: flex; min-height: 53px; align-items: center; gap: 11px; padding: 0 23px; border-bottom: 1px solid #edf1ed; color: #9aa69e; background: #fdfdfa; }
.audience-flow-progress > span { display: inline-flex; align-items: center; gap: 7px; font-size: calc(10px * var(--portal-text-scale)); font-weight: 670; }
.audience-flow-progress i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #dfe8e1; border-radius: 50%; color: #829187; background: #fff; font-size: calc(9px * var(--portal-text-scale)); font-style: normal; }
.audience-flow-progress .is-current { color: #4e501e; }
.audience-flow-progress .is-current i, .audience-flow-progress .is-done i { border-color: #ddddc1; color: #4e501e; background: #f7f7ec; }
.audience-flow-progress > b { width: 44px; height: 1px; background: #dfe8e1; }
.audience-list-fields { gap: 14px; padding: 20px 23px; }
.audience-list-fields label { display: grid; gap: 7px; color: #47665a; font-size: calc(11px * var(--portal-text-scale)); font-weight: 700; }
.audience-list-fields label > span { color: #98a39b; font-weight: 500; }
.audience-list-fields input, .audience-list-fields textarea, .audience-list-fields select { min-height: 43px; border-color: #d9e5dc; border-radius: 9px; color: #444426; background: #fff; font-size: calc(12px * var(--portal-text-scale)); }
.audience-list-fields input:focus, .audience-list-fields textarea:focus, .audience-list-fields select:focus, .audience-contact-search-row input:focus { border-color: #9d9f5e; outline: 3px solid rgba(127, 128, 68, .13); }
.audience-list-fields textarea { min-height: 64px; resize: vertical; }
.audience-list-fields [name="status"] { max-width: 230px; }
.audience-editor-actions { display: flex; min-height: 65px; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; padding: 11px 23px max(13px,env(safe-area-inset-bottom)); border-top: 1px solid #e9efea; background: #fff; box-shadow: none; }
.audience-editor-actions .contact-cancel-button, .audience-editor-actions .contact-save-button { min-height: 38px; }
.audience-editor-notice { flex: 0 0 auto; margin: 0 23px 10px; padding: 9px 11px; border: 1px solid #e8e8d6; border-radius: 8px; color: #5f5f2f; background: #f8f8f1; font-size: calc(10px * var(--portal-text-scale)); line-height: 1.4; }
.audience-editor-notice.is-error { border-color: #efd9d5; color: #99594f; background: #fff5f2; }
.audience-editor-notice[hidden] { display: none; }
.audience-flow-contact-step { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
.audience-flow-step-heading { display: flex; min-height: 60px; flex: 0 0 auto; align-items: center; gap: 10px; padding: 12px 23px 8px; }
.audience-flow-list-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #ebebe0; border-radius: 10px; color: #5d5e2c; background: #f7f7f0; }
.audience-flow-list-icon svg { width: 16px; height: 16px; }
.audience-flow-step-heading h3 { margin: 0; color: #525232; font-size: calc(12px * var(--portal-text-scale)); font-weight: 740; }
.audience-flow-step-heading p { margin: 3px 0 0; color: #829188; font-size: calc(9px * var(--portal-text-scale)); }
.audience-add-contacts-in-dialog { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 7px; padding: 7px 23px 11px; overflow: hidden; border: 0; background: #fff; }
.audience-add-contacts-in-dialog .audience-add-heading { display: none; }
.audience-add-contacts-in-dialog .audience-contact-search-row { flex: 0 0 auto; }
.audience-add-contacts-in-dialog .audience-eligible-list { min-height: 70px; max-height: none; flex: 1 1 auto; grid-auto-rows: min-content; align-content: start; }
.audience-add-contacts-in-dialog .audience-contact-state { min-height: 110px; }
.audience-add-contacts-in-dialog .audience-contact-footer { flex: 0 0 auto; }
.audience-add-contacts-in-dialog .audience-contact-footer > span { font-size: calc(9px * var(--portal-text-scale)); }
.audience-add-contacts-in-dialog .audience-contact-option { min-height: 49px; }
.audience-add-contacts-in-dialog[aria-busy="true"] { opacity: .74; }
.audience-list-dialog form[aria-busy="true"] .contact-save-button { cursor: progress; }
.campaign-audience-panel .campaign-list-search, .campaign-audience-panel .campaign-list-search input,
.campaign-subscriber-panel .campaign-list-search, .campaign-subscriber-panel .campaign-list-search input,
.audience-contact-search-row .campaign-list-search, .audience-contact-search-row .campaign-list-search input { font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.campaign-audience-state-filter, .campaign-audience-state-filter select, .campaign-audience-summary { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.campaign-audience-name strong { font-size: max(13px,calc(13px * var(--portal-text-scale))); }
.campaign-audience-name small { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.campaign-audience-meta { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.campaign-audience-status { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.campaign-audience-count strong { font-size: max(17px,calc(17px * var(--portal-text-scale))); }
.campaign-audience-count small, .campaign-audience-actions button { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.campaign-footnote { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.campaign-audience-empty > div strong { font-size: max(14px,calc(14px * var(--portal-text-scale))); }
.campaign-audience-empty > div p, .campaign-subscriber-panel .campaign-panel-heading > div > p:last-child { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.campaign-subscriber-panel .campaign-panel-heading h2 { font-size: max(16px,calc(16px * var(--portal-text-scale))); }
.campaign-subscriber-total, .campaign-subscriber-person strong { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.campaign-subscriber-person small, .campaign-subscriber-status { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-add-heading h3 { font-size: max(13px,calc(13px * var(--portal-text-scale))); }
.audience-add-heading p:not(.eyebrow), .audience-add-selected-count { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-contact-copy strong { font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.audience-contact-copy small { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-contact-option { grid-template-columns: 16px 31px minmax(0,1fr) minmax(230px,auto); }
.audience-contact-badges { display: flex; min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.audience-contact-badges i, .audience-contact-state > span, .audience-contact-pagination,
.audience-contact-pagination button, .audience-contact-footer > span, .audience-selection-clear,
.audience-selected-contact strong, .audience-selected-contact-more { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-contact-state strong { font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.audience-contact-avatar { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.audience-contact-footer .contact-create-button, .audience-editor-actions .contact-cancel-button, .audience-editor-actions .contact-save-button { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.audience-editor-notice, .audience-flow-step-heading p, .audience-flow-progress > span { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.audience-flow-progress i { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-flow-step-heading h3 { font-size: max(13px,calc(13px * var(--portal-text-scale))); }
.audience-dialog-head p:not(.eyebrow) { font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.audience-list-fields label { font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.audience-list-fields input, .audience-list-fields textarea, .audience-list-fields select { font-size: max(13px,calc(13px * var(--portal-text-scale))); }
@media (max-width: 760px) {
  .audience-contact-option { grid-template-columns: 16px 29px minmax(0,1fr); }
  .audience-contact-badges { grid-column: 3; justify-content: flex-start; }
}

@media (max-width: 760px) {
  .broadcast-view-panel .campaign-audience-panel > .campaign-panel-heading { align-items: flex-start; flex-direction: row; padding: 14px; }
  .campaign-audience-toolbar { align-items: center; flex-wrap: wrap; padding: 9px 13px; }
  .campaign-audience-toolbar .campaign-list-search { width: 100%; max-width: none; flex: 1 1 100%; }
  .campaign-audience-summary { margin-left: auto; }
  .campaign-audience-list { padding-inline: 9px; }
  .campaign-audience-item { grid-template-columns: minmax(0,1fr); gap: 5px; }
  .campaign-audience-main { grid-template-columns: 32px minmax(0,1fr) auto; gap: 8px; }
  .campaign-audience-chevron { display: none; }
  .campaign-audience-mark { width: 31px; height: 31px; }
  .campaign-audience-actions { padding-left: 39px; }
  .campaign-audience-actions button { min-height: 29px; }
  .campaign-audience-empty { flex-wrap: wrap; padding: 17px; }
  .campaign-audience-empty > div { flex-basis: calc(100% - 60px); }
  .campaign-audience-empty > .contact-create-button { margin-left: 56px; }
  .campaign-subscriber-head { display: none; }
  .audience-add-contacts { padding-inline: 13px; }
  .audience-contact-option { grid-template-columns: 16px 29px minmax(0,1fr); gap: 8px; }
  .audience-contact-badges { grid-column: 3; justify-content: flex-start; }
  .audience-list-dialog[open] { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .audience-list-dialog-wide[open] { height: calc(100dvh - 20px); }
  .audience-dialog-head, .audience-list-fields { padding-inline: 17px; }
  .audience-flow-progress { padding-inline: 17px; }
  .audience-flow-step-heading { padding-inline: 17px; }
  .audience-add-contacts-in-dialog { padding-inline: 17px; }
  .audience-editor-actions { padding-inline: 17px; }
  .audience-editor-notice { margin-inline: 17px; }
}

@media (max-width: 480px) {
  .broadcast-view-panel .campaign-audience-panel > .campaign-panel-heading { gap: 8px; }
  .broadcast-view-panel .campaign-audience-panel > .campaign-panel-heading > div:last-child { flex: 0 0 auto; }
  .broadcast-view-panel .campaign-audience-panel > .campaign-panel-heading .contact-create-button { min-height: 34px; padding-inline: 9px; font-size: calc(9px * var(--portal-text-scale)); }
  .campaign-audience-name small { max-width: 58vw; }
  .campaign-audience-count strong { font-size: calc(15px * var(--portal-text-scale)); }
  .campaign-audience-actions { padding-left: 0; }
  .campaign-audience-empty > .contact-create-button { margin-left: 0; }
  .campaign-audience-empty-mark { width: 36px; height: 36px; }
  .audience-contact-search-row { align-items: stretch; }
  .audience-contact-search-row .campaign-list-search { max-width: none; }
  .audience-selected-contact-wrap { align-items: flex-start; flex-direction: column; }
  .audience-selected-contact-list { width: 100%; }
  .audience-flow-progress > b { width: 24px; }
  .audience-editor-actions { justify-content: space-between; gap: 6px; }
  .audience-editor-actions .contact-cancel-button, .audience-editor-actions .contact-save-button { padding-inline: 10px; }
  .audience-contact-search-row { align-items: center; }
  .audience-contact-search-row .campaign-list-search { height: 40px; min-height: 40px; }
  .audience-contact-option .audience-contact-avatar { width: 30px; min-width: 30px; max-width: 30px; }
  .audience-contact-footer { align-items: center; flex-direction: row; }
  .audience-contact-footer .contact-create-button { min-width: 150px; white-space: nowrap; }
}
.audience-add-contacts-in-dialog .audience-contact-search-row { height: 40px; min-height: 40px; max-height: 40px; align-items: center; }

.contact-tag-fields { gap: 15px; margin: 16px 0 0; padding: 17px; border: 1px solid #dce7e2; border-radius: 12px; background: linear-gradient(145deg,#f7faf9,#fff 70%); }
.contact-organization-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.contact-organization-heading .eyebrow { margin: 0 0 4px; color: #63877a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .12em; }
.contact-organization-heading h3 { margin: 0; color: #464525; font-size: calc(14px * var(--portal-text-scale)); letter-spacing: -.02em; }
.contact-organization-heading p:not(.eyebrow) { margin: 4px 0 0; color: #8d867d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.contact-reviewed-at { max-width: 180px; color: #899792; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: right; }
.contact-tag-group, .contact-note-field { display: grid; gap: 8px; }
.contact-tag-section-heading { display: flex; align-items: baseline; gap: 8px; }
.contact-tag-section-heading strong, .contact-note-field strong { color: #5c5540; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.contact-tag-section-heading span, .contact-note-field > span small { color: #92a09b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 480; }
.contact-tag-choices { min-height: 28px; align-items: center; gap: 7px; }
.contact-tag-empty { margin: 0; color: #8a9993; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-tag-choice { min-height: 28px; gap: 7px; padding: 3px 9px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-tag-choice input { width: 13px; height: 13px; margin: 0; accent-color: var(--tag-color,#71573f); }
.contact-tag-choice:focus-within { outline: 2px solid color-mix(in srgb,var(--tag-color,#71573f) 28%,transparent); outline-offset: 2px; }
.contact-tag-remove { display: grid; width: 22px; height: 24px; place-items: center; border-radius: 6px; }
.contact-tag-remove:hover { background: #fff1ee; }
.contact-tag-new { align-items: center; gap: 8px; }
.contact-tag-new input { min-height: 37px; padding: 0 10px; border: 1px solid #dce6e2; border-radius: 8px; color: #444526; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-tag-new input:focus { border-color: #bebf83; box-shadow: 0 0 0 3px rgba(105, 107, 23,.09); outline: 0; }
.contact-tag-new button { min-height: 37px; white-space: nowrap; }
.contact-note-field { color: #5e5f3f; }
.contact-note-field > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; }
.contact-note-field textarea { min-height: 78px; padding: 10px 11px; border: 1px solid #dce6e2; border-radius: 8px; color: #444526; background: #fff; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.contact-note-field textarea:focus { border-color: #bebf83; box-shadow: 0 0 0 3px rgba(105, 107, 23,.09); outline: 0; }
.contact-row-actions { display: flex; align-items: center; gap: 5px; }
.contact-row-actions .table-action { min-height: 29px; padding-inline: 8px; white-space: nowrap; }
.contact-track-action { color: #595322; background: #fbfbf7; }

.contact-tracking-dialog[open] { width: min(980px,calc(100vw - 24px)); max-height: min(900px,calc(100dvh - max(24px,env(safe-area-inset-top) + env(safe-area-inset-bottom)))); overflow: hidden; }
.contact-tracking-dialog[open] > .contact-tracking-shell { display: flex; min-height: 0; max-height: inherit; flex-direction: column; }
.contact-tracking-shell .contact-dialog-head { flex: 0 0 auto; padding: 20px 24px 14px; }
.contact-tracking-shell .contact-dialog-head h2 { font-size: calc(19px * var(--portal-text-scale)); }
.contact-tracking-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 16px 24px 22px; }
.contact-tracking-tags { display: flex; min-height: 22px; flex-wrap: wrap; justify-content: center; gap: 5px; }
.contact-tracking-shell > .contact-form-actions { flex: 0 0 auto; margin: 0; padding: 11px 24px max(13px,env(safe-area-inset-bottom)); border-top: 1px solid #e8eeea; background: #fff; }
.contact-tracking-shell > .contact-form-actions .contact-save-button { min-height: 36px; padding-inline: 14px; }
/* Rastreamento: tiles, tabs, panels (public/app/contact-journey.js). */
.cj-icon { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cj-kpis { display: grid; grid-template-columns: repeat(auto-fit,minmax(118px,1fr)); gap: 10px; margin-bottom: 16px; }
.cj-tile { display: grid; justify-items: center; align-content: center; gap: 4px; min-width: 0; padding: 14px 10px 12px; border: 1px solid #edf0e2; border-radius: 14px; background: linear-gradient(180deg,#fff,#fbfcf8); text-align: center; }
.cj-tile .cj-icon { width: 18px; height: 18px; color: var(--brand-blue); }
.cj-tile strong { color: #313113; font-size: calc(22px * var(--portal-text-scale)); font-weight: 760; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cj-tile span { color: #78785f; font-size: calc(12px * var(--portal-text-scale)); font-weight: 600; }
.cj-tile.is-good strong { color: #217a55; }
.cj-tile.is-warn strong { color: #9a5d17; }
.cj-tabs { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; overflow-x: auto; border-radius: 12px; background: #f6f7f1; scrollbar-width: none; }
.cj-tabs [role="tab"] { display: inline-flex; flex: 1 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; color: #6d6d52; background: transparent; font: inherit; font-size: calc(13px * var(--portal-text-scale)); font-weight: 650; cursor: pointer; white-space: nowrap; }
.cj-tabs [role="tab"]:hover { color: #313113; }
.cj-tabs [role="tab"][aria-selected="true"] { color: #313113; background: #fff; box-shadow: 0 1px 3px rgba(42, 43, 17,.12); }
.cj-tabs [role="tab"][aria-selected="true"] .cj-icon { color: var(--brand-blue); }
.cj-tabs [role="tab"]:focus-visible, .cj-channel:focus-visible, .cj-chips button:focus-visible, .cj-more:focus-visible, .cj-link:focus-visible, .cj-panel:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.cj-panel { display: grid; gap: 12px; }
.cj-panel[hidden] { display: none; }
.cj-panel > div[data-cj-slot] { display: grid; gap: 12px; }
.cj-panel > div[data-cj-slot]:empty { display: none; }
.cj-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(96px,1fr)); gap: 1px; overflow: hidden; border: 1px solid #edf0e2; border-radius: 12px; background: #edf0e2; }
.cj-stat { display: grid; justify-items: center; gap: 2px; padding: 11px 6px; background: #fff; text-align: center; }
.cj-stat strong { color: #313113; font-size: calc(18px * var(--portal-text-scale)); font-weight: 750; font-variant-numeric: tabular-nums; }
.cj-stat span { color: #78785f; font-size: calc(11.5px * var(--portal-text-scale)); font-weight: 600; }
.cj-stat.is-good strong { color: #217a55; }
.cj-stat.is-warn strong { color: #9a5d17; }
.cj-stat.is-bad strong { color: #b23b3b; }
.cj-bar { display: flex; height: 8px; overflow: hidden; border-radius: 99px; background: #f3f4ed; }
.cj-bar i { display: block; height: 100%; }
.cj-bar .is-read { background: #1f8a5c; }
.cj-bar .is-good { background: #67c29a; }
.cj-bar .is-bad { background: #d25a5a; }
.cj-bar .is-muted { background: #cccdb9; }
.cj-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cj-chips button { min-height: 30px; padding: 0 12px; border: 1px solid #e8e9da; border-radius: 99px; color: #69694d; background: #fff; font: inherit; font-size: calc(12px * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.cj-chips button[aria-pressed="true"] { border-color: var(--brand-blue-button, var(--brand-blue)); color: #fff; background: var(--brand-blue-button, var(--brand-blue)); }
.cj-channels { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 10px; }
.cj-channel { display: grid; justify-items: center; gap: 5px; padding: 14px 10px; border: 1px solid #edf0e2; border-radius: 14px; color: inherit; background: #fff; font: inherit; text-align: center; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cj-channel:hover { border-color: #dcdec0; box-shadow: 0 4px 14px rgba(42, 43, 17,.07); }
.cj-channel-name { color: #6d6d52; font-size: calc(12px * var(--portal-text-scale)); font-weight: 700; }
.cj-channel > strong { color: #313113; font-size: calc(24px * var(--portal-text-scale)); font-weight: 760; line-height: 1; font-variant-numeric: tabular-nums; }
.cj-channel-stats { display: flex; justify-content: center; gap: 12px; color: #807f68; font-size: calc(11.5px * var(--portal-text-scale)); }
.cj-channel-stats b { margin-right: 3px; color: #4d4c2c; font-variant-numeric: tabular-nums; }
.cj-row-icon { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #60603a; background: #f5f6ee; }
.cj-row-icon.is-email { color: #6d4bd1; background: #f1edfd; }
.cj-row-icon.is-whatsapp { color: #178a4f; background: #e7f6ee; }
.cj-row-icon.is-sms { color: #9d5c10; background: #fdf3e5; }
.cj-row-icon.is-automations { color: #b3367c; background: #fcebf4; }
.cj-row-icon.is-conversations { color: #777508; background: #fbfbe4; }
.cj-row-icon.is-joined { color: #6f704f; background: #f4f4ee; }
.cj-subhead { margin: 4px 0 0; color: #78785f; font-size: calc(11.5px * var(--portal-text-scale)); font-weight: 750; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.cj-list { display: grid; margin: 0; padding: 0; overflow: hidden; border: 1px solid #edf0e2; border-radius: 12px; list-style: none; }
.cj-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border-top: 1px solid #f4f5ee; background: #fff; }
.cj-row:first-child { border-top: 0; }
.cj-row-copy { display: grid; min-width: 0; flex: 1 1 auto; gap: 1px; }
.cj-row-copy strong { overflow: hidden; color: #39381d; font-size: calc(13px * var(--portal-text-scale)); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.cj-row-copy small { overflow: hidden; color: #807f68; font-size: calc(11.5px * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.cj-row-extra { display: inline-flex; align-items: center; gap: 4px; }
.cj-row time { flex: 0 0 auto; min-width: 92px; color: #807f68; font-size: calc(11.5px * var(--portal-text-scale)); font-variant-numeric: tabular-nums; text-align: right; }
.cj-pill { flex: 0 0 auto; padding: 3px 9px; border-radius: 99px; color: #69694d; background: #f4f5ee; font-size: calc(11px * var(--portal-text-scale)); font-weight: 700; white-space: nowrap; }
.cj-pill.is-good { color: #1d6e4b; background: #e3f5ec; }
.cj-pill.is-warn { color: #84500f; background: #fdf1df; }
.cj-pill.is-bad { color: #a23535; background: #fbe8e8; }
.cj-step { display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: #6d6d52; background: #f4f5ee; }
.cj-step .cj-icon { width: 13px; height: 13px; }
.cj-step.is-sent, .cj-step.is-read, .cj-step.is-delivered { color: #1d6e4b; background: #e3f5ec; }
.cj-step.is-failed { color: #a23535; background: #fbe8e8; }
.cj-step.is-pending, .cj-step.is-uncertain { color: #84500f; background: #fdf1df; }
.cj-badge { min-width: 20px; padding: 2px 6px; border-radius: 99px; color: var(--brand-blue-ink); background: var(--brand-blue); font-size: calc(11px * var(--portal-text-scale)); font-weight: 750; text-align: center; }
.cj-link { min-height: 28px; padding: 0 10px; border: 1px solid #e8e9da; border-radius: 8px; color: #43421e; background: #fff; font: inherit; font-size: calc(12px * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.cj-link:hover { border-color: var(--brand-blue); }
.cj-more { justify-self: center; min-height: 32px; padding: 0 16px; border: 1px solid #e8e9da; border-radius: 99px; color: #43421e; background: #fff; font: inherit; font-size: calc(12.5px * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.cj-empty { display: grid; justify-items: center; gap: 8px; padding: 26px 16px; border: 1px dashed #e7e8d8; border-radius: 12px; color: #807f68; text-align: center; }
.cj-empty .cj-icon { width: 24px; height: 24px; color: #bebfa9; }
.cj-empty p { max-width: 42ch; margin: 0; font-size: calc(13px * var(--portal-text-scale)); }
.cj-spinner { width: 20px; height: 20px; border: 2px solid #e8e9da; border-top-color: var(--brand-blue); border-radius: 50%; animation: cj-spin .8s linear infinite; }
@keyframes cj-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cj-spinner { animation: none; } .cj-channel { transition: none; } }
.cj-card { margin: 0; padding: 14px; border: 1px solid #edf0e2; border-radius: 12px; background: #fff; }
.cj-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 10px; }
.cj-facts > div { display: grid; justify-items: center; gap: 3px; padding: 12px 8px; border-radius: 12px; background: #f9faf6; text-align: center; }
.cj-facts span { color: #78785f; font-size: calc(11.5px * var(--portal-text-scale)); font-weight: 600; }
.cj-facts strong { color: #39381d; font-size: calc(14px * var(--portal-text-scale)); }
.cj-consents { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.cj-consent { display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border: 1px solid #edf0e2; border-radius: 12px; text-align: center; }
.cj-consent .cj-icon { width: 18px; height: 18px; }
.cj-consent strong { color: #39381d; font-size: calc(13px * var(--portal-text-scale)); }
.cj-consent span { font-size: calc(11.5px * var(--portal-text-scale)); font-weight: 700; }
.cj-consent.is-good { border-color: #cdebdc; background: #f2faf6; color: #1d6e4b; }
.cj-consent.is-off { color: #7a6a52; }
.cj-note, .cj-muted { margin: 0; color: #6d6d52; font-size: calc(13px * var(--portal-text-scale)); line-height: 1.5; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.cj-muted { color: #807f68; }

@media (max-width: 700px) {
  .contact-tracking-dialog[open] { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  .contact-tracking-shell .contact-dialog-head { padding: 15px 16px 12px; }
  .contact-tracking-scroll { padding: 12px 14px 16px; }
  .contact-tracking-shell > .contact-form-actions { padding-inline: 14px; }
  .cj-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cj-tabs [role="tab"] span { display: none; }
  .cj-row { flex-wrap: wrap; }
  .cj-row time { min-width: 0; }
  .cj-consents { grid-template-columns: minmax(0,1fr); }
  .contact-organization-heading { flex-direction: column; gap: 7px; }
  .contact-reviewed-at { max-width: none; text-align: left; }
  .contact-tag-new { align-items: stretch; flex-direction: column; }
  .contact-tag-new button { width: 100%; }
}

/* Contatos: search and actions on one line, the filters inside the panel, above what they filter. */
.contact-toolbar { flex-wrap: wrap; }
.contact-toolbar .contact-search { width: auto; min-width: 220px; max-width: 560px; flex: 1 1 280px; }
.contact-toolbar .contact-toolbar-actions { flex: 0 0 auto; margin-left: auto; }
.contact-list-heading { padding-bottom: 10px; border-bottom: 0; }
.contact-filter-bar { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 0 20px 12px; border-bottom: 1px solid #edf1ef; }
.contact-filter-bar .contact-search-mode { min-width: 0; flex: 0 1 auto; }
.contact-filter-bar select { width: 100%; min-height: 32px; max-width: 200px; padding: 0 8px; border: 1px solid #e3eae7; border-radius: 8px; color: #6f6d52; background-color: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.contact-filter-bar select:hover { border-color: #d8d2c9; }
.contact-filter-bar .contact-count { flex: 0 0 auto; margin-left: auto; font-weight: 560; }

/* The row actions stay in reach however wide the columns get; the rest scrolls under them. */
@media (min-width: 761px) {
  .contact-table th, .contact-table td { padding-inline: 10px; }
  .contact-table th:last-child, .contact-table td:last-child { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -1px 0 0 #edf1ef; }
  .contact-table th:last-child { background: #fcfcfa; }
}

/* On a phone every contact stays one row and the table is dragged sideways; the name stays put. */
@media (max-width: 760px) {
  .contact-toolbar { flex-direction: row; align-items: stretch; }
  .contact-toolbar .contact-search { max-width: none; flex-basis: 100%; }
  .contact-toolbar .contact-toolbar-actions { width: 100%; margin-left: 0; }
  .contact-filter-bar { padding: 0 13px 11px; overflow-x: auto; scrollbar-width: none; }
  .contact-filter-bar::-webkit-scrollbar { display: none; }
  .contact-filter-bar .contact-search-mode, .contact-filter-bar .contact-count { flex: 0 0 auto; }
  .contact-table-wrap { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .contact-table { min-width: 880px; }
  .contact-table th, .contact-table td { padding-inline: 10px; white-space: nowrap; }
  .contact-table td { height: 52px; padding-block: 6px; }
  .contact-table th:first-child, .contact-table td:first-child { position: sticky; left: 0; z-index: 1; width: 44vw; min-width: 44vw; max-width: 44vw; padding-left: 13px; background: #fff; box-shadow: 1px 0 0 #edf1ef; }
  .contact-table th:first-child { background: #fcfcfa; }
  .contact-identity { gap: 8px; }
  .contact-identity > span:last-child { min-width: 0; }
  .contact-identity strong { max-width: calc(44vw - 62px); }
  .contact-identity small, .contact-identity .contact-tag-row { display: none; }
  .contact-value { max-width: 190px; }
}
/* Intelligence panel: a balanced three-point header and inset, expandable rows. */
.intelligence-panel-head { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; padding: 14px 20px 12px; }
.intelligence-panel-leading { grid-column: 1; grid-row: 1; min-width: 0; justify-self: start; }
.intelligence-panel-actions { grid-column: 3; grid-row: 1; min-width: 0; justify-self: end; justify-content: flex-end; }
.intelligence-panel-actions .contact-create-button { width: auto; min-height: 35px; white-space: nowrap; }
.intelligence-total-count { grid-column: 2; grid-row: 1; justify-self: center; white-space: nowrap; }
.intelligence-panel > #intelligenceList { min-height: 0; }
.intelligence-panel > #intelligenceList > .contact-state { margin: 12px 18px 18px; padding: 18px; }
.intelligence-list-summary { display: none; }
.intelligence-record-list { display: grid; gap: 8px; margin: 0 18px 18px; padding: 11px; overflow: visible; border: 1px solid #e5ece7; border-radius: 12px; background: #f6f9f6; }
.intelligence-record { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 1px solid #e1e9e4; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(53, 54, 23, .035); }
.intelligence-record::before { display: none; }
.intelligence-record-row { display: grid; grid-template-columns: minmax(0,1fr) auto; min-width: 0; align-items: center; }
.intelligence-record-toggle { display: grid; grid-template-columns: minmax(130px,.9fr) auto minmax(0,1.45fr) 9px; min-width: 0; min-height: 50px; align-items: center; gap: 10px; padding: 8px 12px 8px 15px; border: 0; color: #555633; background: transparent; text-align: left; cursor: pointer; }
.intelligence-record-toggle:hover { background: #fdfdfb; }
.intelligence-record-toggle:focus-visible { position: relative; z-index: 1; outline: 2px solid #6a6b19; outline-offset: -3px; }
.intelligence-record-title { min-width: 0; overflow: hidden; color: #444524; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-labels { display: flex; min-width: 0; align-items: center; gap: 5px; white-space: nowrap; }
.intelligence-record-labels .intelligence-type-badge, .intelligence-record-labels .intelligence-status { min-height: 20px; padding-inline: 7px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-meta { display: block; min-width: 0; max-width: none; overflow: hidden; color: #868471; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-caret { width: 8px; height: 8px; justify-self: center; border-right: 1.5px solid #847f66; border-bottom: 1.5px solid #847f66; transform: rotate(45deg) translate(-1px,-1px); transition: transform .16s ease; }
.intelligence-record.is-expanded .intelligence-record-caret { transform: rotate(225deg) translate(-1px,-1px); }
.intelligence-record-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 10px 0 8px; }
.intelligence-row-action { width: 29px; height: 29px; }
.intelligence-record-content { padding: 12px 15px 14px; border-top: 1px solid #e9efeb; background: #fdfdfb; }
.intelligence-record-content > p { max-height: 320px; margin: 0; overflow: auto; color: #6f6c52; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.intelligence-record-content > .intelligence-record-empty { color: #99958a; font-style: italic; }
.intelligence-form-grid { align-items: start; }
.intelligence-form-grid > label { align-content: start; }
.intelligence-form-grid > label > small { min-height: 1.45em; color: #918d81; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 500; line-height: 1.45; }
.contact-delete-button { display: inline-flex; min-height: 37px; align-items: center; justify-content: center; gap: 6px; margin-right: auto; padding-inline: 12px; white-space: nowrap; }
.contact-delete-button svg { width: 14px; height: 14px; }
.staff-capability-choice.is-destructive { border-color: #efded9; color: #8b5149; background: #fffaf8; }
.staff-capability-choice.is-destructive:has(input:checked) { border-color: #e7beb6; color: #98493e; background: #fff2ef; }
.intelligence-workspace button:focus-visible, .intelligence-workspace a:focus-visible, .intelligence-dialog button:focus-visible, .intelligence-dialog input:focus-visible, .intelligence-dialog select:focus-visible, .intelligence-dialog textarea:focus-visible { outline: 2px solid #6a6b19; outline-offset: 2px; }

@media (max-width: 760px) {
  .intelligence-panel-head { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; padding-inline: 14px; }
  .intelligence-panel-head .contact-create-button { width: auto; }
  .intelligence-record-list { margin: 0 14px 14px; padding: 8px; }
  .intelligence-record-toggle { grid-template-columns: minmax(0,1fr) auto 9px; gap: 7px; padding-inline: 10px; }
  .intelligence-record-title { grid-column: 1; }
  .intelligence-record-labels { grid-column: 2; }
  .intelligence-record-meta { grid-column: 1 / -1; grid-row: 2; }
  .intelligence-record-caret { grid-column: 3; grid-row: 1; }
  .intelligence-record-actions { padding-inline: 5px 7px; }
}
@media (max-width: 440px) {
  .intelligence-panel-head { gap: 5px; padding-inline: 10px; }
  .intelligence-panel-actions .contact-create-button, .intelligence-panel-leading .heading-action { min-height: 32px; gap: 4px; padding-inline: 7px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-total-count { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-record-labels .intelligence-type-badge { padding-inline: 5px; }
  .intelligence-record-labels .intelligence-type-badge > span { display: none; }
  .intelligence-record-actions { gap: 3px; padding-inline: 3px 5px; }
  .intelligence-row-action { width: 27px; height: 27px; }
  .intelligence-record-content { padding: 11px 12px 13px; }
  .contact-dialog .contact-form-actions .contact-delete-button { flex: 1 1 100%; margin: 0; }
}

.intelligence-schema-notice { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; margin: 0 20px 11px; padding: 9px 12px; border: 1px solid #e8e1c9; border-radius: 9px; color: #79683d; background: #fcfaf2; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-schema-notice button { flex: 0 0 auto; }
.intelligence-record-attachments { display: grid; gap: 6px; margin: 11px 0 0; padding: 0; list-style: none; }
.intelligence-record-attachments li { display: flex; min-width: 0; align-items: center; gap: 9px; }
.intelligence-record-attachments li > a { display: inline-flex; min-width: 0; align-items: center; gap: 7px; color: #595a1d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 670; text-decoration: none; }
.intelligence-record-attachments li > a:hover { text-decoration: underline; }
.intelligence-record-attachments li > a svg { width: 13px; height: 13px; flex: 0 0 auto; }
.intelligence-record-attachments li > a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-attachments li > small { flex: 0 0 auto; color: #81908b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-attachment-editor { display: grid; gap: 10px; min-width: 0; padding: 13px; border: 1px solid #e4ebe6; border-radius: 10px; background: #fcfcf9; }
.intelligence-attachment-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.intelligence-attachment-heading > div { display: grid; min-width: 0; gap: 3px; }
.intelligence-attachment-heading strong { color: #525334; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-attachment-heading small, .intelligence-attachment-picker > small, .intelligence-attachment-help { color: #81908b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.intelligence-attachment-heading > span { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; color: #52746a; background: #f5f5ed; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.intelligence-attachment-edit-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.intelligence-attachment-edit-list li { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border: 1px solid #e9eeea; border-radius: 8px; background: #fff; }
.intelligence-attachment-edit-list li > a { display: inline-flex; min-width: 0; align-items: center; gap: 8px; color: #625445; text-decoration: none; }
.intelligence-attachment-edit-list li > a svg { width: 14px; height: 14px; flex: 0 0 auto; color: #64662b; }
.intelligence-attachment-edit-list li > a > span { display: grid; min-width: 0; gap: 2px; }
.intelligence-attachment-edit-list li > a strong { overflow: hidden; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.intelligence-attachment-edit-list li > a small { color: #81908b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-attachment-edit-list li > label { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: #8d6057; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); cursor: pointer; }
.intelligence-attachment-edit-list input { width: 14px; height: 14px; margin: 0; accent-color: #a84d42; }
.intelligence-attachment-empty { margin: 0; color: #899790; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-attachment-picker { display: grid; gap: 6px; padding: 10px; border: 1px dashed #bbd0c4; border-radius: 8px; color: #5f603a; background: #f8f9f4; cursor: pointer; }
.intelligence-attachment-picker > span { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.intelligence-attachment-picker input { width: 100%; min-height: 32px; color: #667c75; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-attachment-help { margin: 0; }

/* Intelligence: a clear collection title and compact, scannable record rows. */
.intelligence-panel-titlebar { display: grid; justify-items: center; gap: 5px; padding: 20px 20px 13px; border-bottom: 1px solid #eff3ef; text-align: center; }
.intelligence-panel-kicker { display: inline-flex; align-items: center; gap: 7px; color: #788f88; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .13em; }
.intelligence-panel-kicker::before { width: 6px; height: 6px; border-radius: 50%; background: #6f702d; box-shadow: 0 0 0 3px #f3f4e7; content: ''; }
.intelligence-panel-titlebar h2 { margin: 0; color: #3a3b1c; font-size: calc(23px * var(--portal-text-scale)); font-weight: 760; letter-spacing: -.045em; }
.intelligence-panel-titlebar p { margin: 0; color: #918a81; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.intelligence-panel-head { padding-block: 13px 12px; }
.intelligence-record-list { gap: 7px; padding: 10px; border-color: #e4ece6; background: linear-gradient(145deg,#fafaf7 0%,#f7f7f3 100%); }
.intelligence-record { position: relative; border-color: #e3ebe5; border-radius: 12px; box-shadow: 0 1px 2px rgba(51, 52, 21, .025); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.intelligence-record::before { position: absolute; z-index: 1; top: 12px; bottom: 12px; left: 0; display: block; width: 3px; border-radius: 0 3px 3px 0; background: var(--intelligence-record-accent,#727433); content: ''; }
.intelligence-record.is-knowledge { --intelligence-record-accent: #6e702d; }
.intelligence-record.is-internal { --intelligence-record-accent: #8870b0; }
.intelligence-record:hover { z-index: 1; border-color: #ddddca; box-shadow: 0 6px 18px rgba(51, 52, 21, .065); transform: translateY(-1px); }
.intelligence-record-row { grid-template-columns: minmax(0,1fr) auto; }
.intelligence-record-toggle { grid-template-columns: 28px minmax(155px,1.35fr) minmax(92px,.72fr) minmax(92px,.74fr) minmax(86px,.66fr) auto minmax(70px,.46fr) 9px; min-height: 56px; gap: 9px; padding: 7px 10px 7px 14px; }
.intelligence-record-toggle:hover { background: linear-gradient(90deg,rgba(250, 251, 246, .55),#fdfdfb); }
.intelligence-record-mark { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #ededd6; border-radius: 9px; color: #5e6022; background: #f7f8ee; }
.intelligence-record-mark svg { width: 14px; height: 14px; }
.intelligence-record.is-internal .intelligence-record-mark { border-color: #e4dcef; color: #8068a6; background: #f6f2fb; }
.intelligence-record-title { color: #414121; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: -.012em; }
.intelligence-record-category { display: block; min-width: 0; overflow: hidden; padding: 5px 9px; border: 1px solid #e5ece6; border-radius: 7px; color: #5c746d; background: #fafaf7; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-source { display: inline-flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; color: #897e75; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-source > svg { width: 11px; height: 11px; flex: 0 0 auto; color: #7b9d8c; }
.intelligence-record-source > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-tag { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; gap: 4px; overflow: hidden; padding: 5px 8px; border: 1px solid #e5ebe4; border-radius: 7px; color: #718278; background: #f7f8f3; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-record-tag > span { color: #6f7032; font-weight: 800; }
.intelligence-record-tag > small { flex: 0 0 auto; color: #84948b; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.intelligence-record-tag.is-empty { color: #9aa6a0; font-weight: 500; }
.intelligence-record-labels { flex-wrap: nowrap; gap: 4px; }
.intelligence-record-labels .intelligence-type-badge, .intelligence-record-labels .intelligence-status { min-height: 22px; padding-inline: 7px; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-record-date { display: inline-flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; color: #83918d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.intelligence-record-date svg { width: 12px; height: 12px; flex: 0 0 auto; color: #8ca39a; }
.intelligence-record-date > span { overflow: hidden; text-overflow: ellipsis; }
.intelligence-record-caret { width: 7px; height: 7px; border-color: #728c83; }
.intelligence-record-content { padding: 14px 16px 16px; border-top-color: #e8efea; background: #fdfdfb; }
.intelligence-record-details { display: grid; grid-template-columns: minmax(90px,.65fr) minmax(140px,1.4fr) minmax(130px,.9fr) minmax(180px,1.2fr); gap: 8px; margin-bottom: 12px; }
.intelligence-record-details > div { display: grid; min-width: 0; align-content: start; gap: 4px; padding: 9px 10px; border: 1px solid #e8eee9; border-radius: 8px; background: #fff; }
.intelligence-record-details small { color: #8b9a92; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.intelligence-record-details strong { color: #4c6760; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 590; line-height: 1.4; overflow-wrap: anywhere; }
.intelligence-delete-dialog::backdrop { background: rgba(32, 33, 18, .43); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.intelligence-delete-dialog[open] { display: flex; width: min(410px,calc(100vw - 28px)); height: auto; min-height: 0; max-height: calc(100dvh - 28px); flex-direction: column; align-self: center; overflow: hidden; padding: 0; border: 1px solid #e2e9e3; border-radius: 16px; box-shadow: 0 24px 70px rgba(33, 34, 14, .24); }
.intelligence-delete-dialog[open] .intelligence-delete-form { min-height: 0; flex: 0 1 auto; overflow: visible; }
.intelligence-delete-form .contact-dialog-head { align-items: center; gap: 11px; padding: 16px 18px 13px; border-bottom: 1px solid #eef1ed; background: #fff; }
.intelligence-delete-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #f0d9d4; border-radius: 10px; color: #a65047; background: #fff3f0; }
.intelligence-delete-mark svg { width: 16px; height: 16px; }
.intelligence-delete-form .contact-dialog-head > div { min-width: 0; flex: 1 1 auto; }
.intelligence-delete-form .contact-dialog-head .eyebrow { margin: 0 0 3px; color: #a07169; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-delete-form .contact-dialog-head h2 { margin: 0; color: #4a4a2e; font-size: calc(17px * var(--portal-text-scale)); }
.intelligence-delete-content { display: grid; gap: 9px; padding: 13px 18px 15px; }
.intelligence-delete-record { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #e5ebe5; border-radius: 10px; background: linear-gradient(135deg,#fafaf7,#f7f7f3); }
.intelligence-delete-record-mark { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #eaeadb; border-radius: 8px; color: #6f7038; background: #f7f7ef; }
.intelligence-delete-record-mark svg { width: 14px; height: 14px; }
.intelligence-delete-record > span:last-child { display: grid; min-width: 0; gap: 3px; }
.intelligence-delete-record small:first-child { color: #8a9990; font-size: calc((6px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .09em; }
.intelligence-delete-record strong { overflow: hidden; color: #4d4e32; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.intelligence-delete-record small { color: #87948e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-delete-content label { margin-top: 2px; color: #526962; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.intelligence-delete-content input { width: 100%; min-height: 41px; padding: 0 11px; border: 1px solid #dce5dc; border-radius: 9px; color: #505032; background: #fff; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); transition: border-color .15s ease, box-shadow .15s ease; }
.intelligence-delete-content input::placeholder { color: #a2ada5; }
.intelligence-delete-content input:focus { border-color: #c58578; box-shadow: 0 0 0 3px rgba(173,103,89,.1); outline: 0; }
.intelligence-delete-hint { margin: -3px 0 0; color: #829089; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.intelligence-delete-form .contact-form-actions { justify-content: flex-end; gap: 8px; padding: 11px 18px 14px; border-top: 1px solid #eef1ed; background: #fff; }
.intelligence-delete-form .contact-form-actions .table-action, .intelligence-delete-form .contact-form-actions .campaign-action-danger { min-height: 37px; }
.intelligence-delete-form .campaign-action-danger:disabled { opacity: .48; cursor: not-allowed; filter: saturate(.45); }
.intelligence-delete-form[aria-busy="true"] .campaign-action-danger { cursor: progress; }

@media (max-width: 1100px) {
  .intelligence-record-toggle { grid-template-columns: 27px minmax(155px,1.25fr) minmax(85px,.7fr) minmax(80px,.65fr) auto minmax(62px,.42fr) 8px; }
  .intelligence-record-source { display: none; }
}
@media (max-width: 760px) {
  .intelligence-panel-titlebar { padding: 17px 14px 11px; }
  .intelligence-panel-titlebar h2 { font-size: calc(20px * var(--portal-text-scale)); }
  .intelligence-panel-titlebar p { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .intelligence-record-toggle { grid-template-columns: 25px minmax(0,1fr) auto 8px; min-height: 49px; gap: 7px; padding-inline: 10px; }
  .intelligence-record-category, .intelligence-record-source, .intelligence-record-tag, .intelligence-record-date { display: none; }
  .intelligence-record-labels .intelligence-type-badge { display: none; }
  .intelligence-record-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .intelligence-delete-form .contact-dialog-head { padding: 15px 16px 12px; }
  .intelligence-delete-content { padding: 12px 16px 14px; }
  .intelligence-delete-form .contact-form-actions { padding: 10px 16px max(12px,env(safe-area-inset-bottom)); }
}
@media (max-width: 440px) {
  .intelligence-record-list { margin: 0 10px 12px; padding: 6px; }
  .intelligence-record-toggle { grid-template-columns: 23px minmax(0,1fr) auto 7px; gap: 6px; padding-inline: 8px; }
  .intelligence-record-mark { width: 24px; height: 24px; }
  .intelligence-record-labels .intelligence-status { min-height: 19px; padding-inline: 5px; }
  .intelligence-record-actions { gap: 2px; padding-inline: 2px 4px; }
  .intelligence-row-action { width: 25px; height: 25px; }
  .intelligence-record-details { grid-template-columns: minmax(0,1fr); }
  .intelligence-delete-dialog[open] { width: calc(100vw - 20px); }
  .intelligence-delete-form .contact-form-actions { flex-wrap: nowrap; }
}
@media (max-width: 760px) {
  .intelligence-schema-notice { align-items: flex-start; margin-inline: 14px; }
  .intelligence-attachment-edit-list li { align-items: flex-start; }
}
@media (max-width: 440px) {
  .intelligence-schema-notice { margin-inline: 10px; }
  .intelligence-attachment-editor { padding: 10px; }
  .intelligence-attachment-edit-list li { flex-wrap: wrap; }
}
.handoff-repeat-card { display: grid; gap: 12px; }
.handoff-repeat-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.handoff-repeat-fields .conversation-dialog-field { max-width: none; }
.handoff-repeat-fields input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #e7e8dc; border-radius: 9px; color: #505135; background: #fff; font: inherit; font-size: 11px; }
.handoff-repeat-fields input:focus { border-color: #b0b27b; outline: 3px solid rgba(94, 96, 35, .1); }
.handoff-repeat-fields input:disabled { color: #87968f; background: #f4f7f4; cursor: not-allowed; }
.handoff-repeat-input { display: flex; align-items: center; gap: 8px; }
.handoff-repeat-input small { color: #72877d; font-size: 10px; }
.handoff-reset-card { display: grid; gap: 13px; }
.handoff-reset-setting { display: grid; gap: 9px; padding: 12px; border: 1px solid #e7eee9; border-radius: 12px; background: #fdfdfb; }
.handoff-reset-fields { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(220px,1.3fr); gap: 12px; padding-left: 36px; }
.handoff-reset-fields .conversation-dialog-field { max-width: none; }
.handoff-reset-fields input, .handoff-reset-fields select, .handoff-responsible-period input { min-height: 38px; padding: 0 10px; border: 1px solid #e7e8dc; border-radius: 9px; color: #505135; background: #fff; font: inherit; font-size: 11px; }
.handoff-reset-fields input:disabled, .handoff-reset-fields select:disabled, .handoff-responsible-period input:disabled { color: #87968f; background: #f4f7f4; cursor: not-allowed; }
.handoff-responsible-period { max-width: 220px; margin-left: 36px; }
.handoff-reset-confirmation-toggle { margin-top: 2px; }
@media (max-width: 560px) { .handoff-repeat-fields { grid-template-columns: 1fr; } .handoff-reset-fields { grid-template-columns: 1fr; padding-left: 0; } .handoff-responsible-period { margin-left: 0; } }

/* Channel usage and cost reporting. */
.usage-period-control { display: flex; align-items: flex-end; gap: 8px; }
.usage-period-control label { display: grid; gap: 4px; color: #6d8079; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.usage-period-control input { min-height: 37px; padding: 0 9px; border: 1px solid #d9e3dd; border-radius: 8px; color: #505135; background: #fff; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.usage-period-control button { min-height: 37px; }
.usage-report-unavailable, .usage-coverage-warning { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid #e5d9bb; border-radius: 10px; color: #755f35; background: #fffaf0; }
.usage-report-unavailable { align-items: flex-start; flex-direction: column; }
.usage-report-unavailable strong, .usage-coverage-warning strong { color: #6e562a; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.usage-report-unavailable p, .usage-coverage-warning span { margin: 0; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.usage-billing-metrics { margin-bottom: 12px; }
.usage-billing-section { margin-top: 12px; }
.usage-billing-section .ops-panel-heading { margin-bottom: 13px; }
.usage-billing-section .ops-panel-heading p:not(.eyebrow) { margin: 6px 0 0; color: #877e74; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.usage-policy-note { padding: 12px 14px; border: 1px solid #e8e9dc; border-radius: 10px; color: #4f6d63; background: #f9faf5; }
.usage-policy-note strong { display: block; color: #51522c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.usage-policy-note p { margin: 5px 0 0; color: #687f75; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.usage-policy-note a { display: inline-block; margin-top: 7px; color: #54561d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; text-decoration: none; }
.usage-policy-note a:hover { text-decoration: underline; }
.usage-table-wrap { margin-top: 12px; border: 1px solid #e6ece7; border-radius: 9px; background: #fff; }
.usage-table { width: 100%; min-width: 940px; border-collapse: collapse; text-align: left; }
.usage-table th { padding: 10px 11px; border-bottom: 1px solid #e6ece7; color: #7b8b84; background: #fafaf7; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; white-space: nowrap; }
.usage-table td { padding: 10px 11px; border-bottom: 1px solid #edf1ee; color: #5e5043; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.usage-table tr:last-child td { border-bottom: 0; }
.usage-table td:first-child { min-width: 185px; white-space: normal; }
.usage-table td:first-child strong, .usage-table td:first-child small, .usage-table td:last-child small { display: block; }
.usage-table td:first-child small, .usage-table td:last-child small { margin-top: 3px; color: #87958f; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.usage-channel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.usage-channel-grid .usage-billing-section { min-width: 0; }
.usage-plan-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.usage-plan-details > div { padding: 10px 11px; border: 1px solid #ebefeb; border-radius: 8px; background: #fdfdfa; }
.usage-plan-details dt { color: #7b8982; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.usage-plan-details dd { margin: 4px 0 0; color: #505134; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; font-variant-numeric: tabular-nums; }
.usage-coverage-list { display: grid; gap: 8px; margin: 0; padding-left: 17px; color: #5d736b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.usage-market-list { display: grid; gap: 10px; margin-top: 12px; }
.usage-market-row { padding: 12px; border: 1px solid #e5ece7; border-radius: 10px; background: #fdfdfa; }
.usage-market-row > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #5b5b3a; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.usage-base-fields { margin-top: 12px; }
.usage-base-fields label > small { color: #81918a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; line-height: 1.4; }
.usage-admin-footnote { margin: 10px 0 0; color: #82918b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.usage-admin-panel .usage-policy-note { margin-bottom: 2px; }
.usage-admin-panel .admin-settings-feedback { min-height: 16px; }
.usage-admin-panel .admin-setting-card > header { align-items: center; justify-content: space-between; }
.usage-admin-panel .admin-setting-card > header > div { min-width: 0; }
.usage-admin-panel .admin-setting-card > header .table-action { flex: 0 0 auto; }
.usage-admin-panel .admin-setting-fields label > small { color: #83918c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; }
.usage-period-control .campaign-panel-link { min-height: 37px; white-space: nowrap; }
.usage-period-control .campaign-panel-link:disabled, .usage-admin-panel .table-action:disabled { opacity: .56; cursor: not-allowed; }
.usage-period-control input:focus-visible, .usage-period-control button:focus-visible, .usage-admin-panel button:focus-visible, .usage-admin-panel input:focus-visible { outline: 3px solid rgba(102, 104, 21, .2); outline-offset: 2px; }
.usage-refresh-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 11px; border: 1px solid #e8e9dc; border-radius: 9px; color: #557168; background: #f9faf5; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.usage-refresh-banner .contact-loader { width: 13px; height: 13px; flex: 0 0 13px; }
.usage-admin-panel [aria-busy="true"] { cursor: progress; }
@media (max-width: 760px) {
  .usage-channel-grid { grid-template-columns: 1fr; gap: 0; }
  .usage-coverage-warning { align-items: flex-start; flex-direction: column; gap: 5px; }
  .usage-period-control { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .usage-period-control { width: 100%; }
  .usage-period-control label { flex: 1; }
  .usage-period-control input { width: 100%; }
  .usage-plan-details, .usage-admin-panel .admin-setting-fields { grid-template-columns: 1fr; }
  .usage-admin-panel .admin-setting-card > header { align-items: flex-start; flex-direction: column; }
  .usage-admin-panel .admin-setting-card > header .table-action { align-self: flex-start; }
  .usage-market-row { padding: 9px; }
}
@media (max-width: 760px) {
  .new-conversation-routing { grid-template-columns: minmax(0,1fr); }
  .new-conversation-routing > .conversation-dialog-field:last-child { max-width: none; }
}

/* Consumo e faturamento → Plano (3E.3, public/app/billing-plan.js). */
.billing-plan { border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 0 0 16px; background: var(--white); }
.billing-plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.billing-plan-head h3 { margin: 0; }
.billing-plan-meters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.billing-plan-meter { display: grid; gap: 4px; }
.billing-plan-meter-label { color: var(--text); opacity: .75; }
.billing-plan-bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.billing-plan-bar > span { display: block; height: 100%; background: var(--brand-blue); }
.billing-plan-meter.is-full .billing-plan-bar > span { background: #b42318; }
.billing-plan-note { margin: 0; }
/* Keep section controls above their content panels. */
.dashboard-report-toolbar,
.automation-workspace-toolbar {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}
.dashboard-report-toolbar > span:first-child { grid-column: 1; }
.dashboard-report-tabs {
  grid-column: 2;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  justify-content: center;
}
.dashboard-report-refresh { grid-column: 3; justify-self: end; align-self: center; }
.dashboard-report { margin-top: 0; }
.automation-workspace-toolbar > .automation-workspace-refresh { grid-column: 1; justify-self: start; margin-left: 0; }
.automation-workspace-toolbar > .automation-workspace-tabs {
  grid-column: 2;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  justify-self: center;
  overflow-x: auto;
}
.automation-workspace-toolbar > .automation-workspace-tabs > button { flex: 0 0 auto; white-space: nowrap; }
.automation-workspace-toolbar > .automation-primary-action,
.automation-workspace-toolbar > .automation-view-only { grid-column: 3; justify-self: end; align-self: center; }

@media (max-width: 760px) {
  .dashboard-report-toolbar,
  .automation-workspace-toolbar {
    grid-template-columns: repeat(2,minmax(0,1fr));
    min-height: 0;
    gap: 5px 8px;
  }
  .dashboard-report-toolbar > span:first-child { display: none; }
  .dashboard-report-tabs,
  .automation-workspace-tabs {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: fit-content;
    max-width: 100%;
  }
  .dashboard-report-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 0 0 4px; }
  .dashboard-report-refresh { grid-column: 2; grid-row: 2; justify-self: end; }
  .automation-workspace-toolbar > .automation-workspace-refresh {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .automation-workspace-toolbar > .automation-workspace-tabs { width: fit-content; }
  .automation-workspace-toolbar > .automation-workspace-tabs > button { flex: 0 0 auto; }
  .automation-workspace-toolbar > .automation-primary-action,
  .automation-workspace-toolbar > .automation-view-only { grid-column: 2; grid-row: 2; justify-self: end; }
  .automation-workspace-toolbar > .automation-primary-action { align-self: center; }
}

@media (max-width: 440px) {
  .dashboard-report-toolbar,
  .automation-workspace-toolbar { gap: 4px 6px; }
  .dashboard-report-tab { min-height: 34px; padding-inline: 8px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .automation-primary-action { min-height: 35px; padding-inline: 9px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
}

@media (max-width: 440px) {
  .section-toolbar-action { min-height: 33px; padding-inline: 8px; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
}

.dashboard-intro { justify-content: center; text-align: center; }

/* Screenshot-led control polish for the six requested work areas. */
.dashboard-greeting-emoji { display: inline-block; margin-left: 5px; font-size: .72em; vertical-align: .08em; }
.dashboard-report { border-radius: 20px; }
.dashboard-report-toolbar { min-height: 58px; gap: 16px; }
.dashboard-report-tabs { align-items: center; gap: 3px; padding: 4px; border: 1px solid #dce6e2; border-radius: 999px; background: #f0f4f3; }
.dashboard-report-tab { min-height: 38px; padding-inline: 14px; border-radius: 999px; font-size: calc(14px * var(--portal-text-scale)); }
.dashboard-report-tab.is-active { border-color: transparent; color: #5f6106; background: #fff; box-shadow: 0 2px 7px rgba(52, 53, 21, .09); }
.dashboard-report-refresh { min-height: 42px; padding-inline: 16px; border-radius: 999px; font-size: calc(14px * var(--portal-text-scale)); }
.dashboard-report-refresh svg { width: 15px; height: 15px; }
.dashboard-report-refresh:hover { border-color: #d5d5b1; color: #5f6106; background: #fff; }

.conversation-workspace { height: min(690px, max(380px, calc(100vh - 250px))); border-color: #dce6e2; border-radius: 20px; box-shadow: 0 8px 26px rgba(54, 55, 11, .045); }
.conversation-inbox-heading { gap: 11px; padding: 18px 16px 14px; }
.conversation-source-platform { width: 40px; height: 40px; border-radius: 50%; }
.conversation-source-platform svg { width: 20px; height: 20px; }
.conversation-inbox-heading .eyebrow { color: #63650e; letter-spacing: .15em; }
.conversation-inbox-heading h2 { font-size: calc(16px * var(--portal-text-scale)); }
.conversation-inbox-meta { gap: 7px; }
.conversation-handoff-button, .conversation-refresh-button, .conversation-new-button { min-height: 36px; padding-inline: 12px; border-radius: 999px; font-size: calc(13px * var(--portal-text-scale)); }
.conversation-refresh-button { background: #fff; }
.conversation-handoff-button { background: #fff; }
.conversation-new-button { gap: 6px; padding-inline: 14px; background: #616306; border-color: #616306; }
.conversation-new-button:hover { background: #585a06; }
.conversation-refresh-button svg, .conversation-handoff-button svg { width: 14px; height: 14px; }
.conversation-search-tools { gap: 8px; margin-inline: 14px; }
.conversation-search-tool { width: 36px; height: 36px; flex-basis: 36px; border-radius: 9px; background: #fcfcfa; }
.conversation-search { min-height: 40px; border-radius: 999px; background: #fff; }
.conversation-list { padding-block: 8px; }
.conversation-row { width: calc(100% - 20px); margin: 0 10px 7px; padding: 13px 14px; border: 1px solid transparent; border-bottom: 1px solid transparent; border-radius: 14px; }
.conversation-row.is-active { border-color: #e9e9d6; background: #f7f8ee; box-shadow: inset 3px 0 #64660d; }
.conversation-row:hover { border-color: #ecece1; background: #fbfbf8; }

.broadcast-workspace-heading .broadcast-view-tabs,
.automation-workspace-toolbar .broadcast-view-tabs { gap: 3px; padding: 4px; border-radius: 999px; border-color: #dce6e2; background: #f0f4f3; }
.broadcast-workspace-heading .broadcast-view-tabs button,
.automation-workspace-toolbar .broadcast-view-tabs button { min-height: 38px; padding-inline: 15px; border-radius: 999px; font-size: calc(14px * var(--portal-text-scale)); }
.broadcast-workspace-heading .broadcast-view-tabs button.is-active,
.automation-workspace-toolbar .broadcast-view-tabs button.is-active { color: #5f6106; background: #fff; box-shadow: 0 2px 7px rgba(52, 53, 21, .09); }
.broadcast-workspace-heading .section-toolbar-action { min-height: 42px; padding-inline: 16px; border: 1px solid #dce6e2; border-radius: 999px; color: #4c4d2d; background: #fff; font-size: calc(14px * var(--portal-text-scale)); }
.broadcast-workspace-heading .section-toolbar-action svg { width: 15px; height: 15px; }
.broadcast-workspace-heading .section-toolbar-action:hover { border-color: #d5d5b1; color: #5f6106; background: #fff; }
.campaign-list-toolbar .campaign-filter-tabs { gap: 2px; padding: 3px; border: 1px solid #dce6e2; border-radius: 999px; background: #f0f4f3; }
.campaign-list-toolbar .campaign-filter-tabs button { min-height: 34px; padding-inline: 13px; border-radius: 999px; font-size: calc(14px * var(--portal-text-scale)); }
.campaign-list-toolbar .campaign-filter-tabs button.is-active { color: #5f6106; background: #fff; box-shadow: 0 2px 7px rgba(52, 53, 21, .09); }

.automation-workspace { border-radius: 20px; }
.automation-workspace-toolbar { min-height: 58px; }
.automation-workspace-toolbar > .automation-workspace-refresh { min-height: 42px; padding-inline: 16px; border: 1px solid #dce6e2; border-radius: 999px; color: #4c4d2d; background: #fff; box-shadow: none; font-size: calc(14px * var(--portal-text-scale)); }
.automation-workspace-toolbar > .automation-workspace-refresh svg { width: 15px; height: 15px; }
.automation-workspace-toolbar > .automation-workspace-refresh:hover { border-color: #d5d5b1; color: #5f6106; background: #fff; }
.automation-primary-action { min-height: 42px; padding-inline: 17px; border-color: #5f6106; border-radius: 999px; background: #5f6106; box-shadow: 0 4px 10px rgba(83, 85, 10, .12); font-size: calc(14px * var(--portal-text-scale)); }
.automation-primary-action:hover { background: #585a06; }
.automation-create-card { min-height: 245px; border-radius: 18px; }
.automation-empty button, .automation-card-actions button, .automation-module-action { min-height: 35px; padding-inline: 13px; border-radius: 999px; font-size: calc(13px * var(--portal-text-scale)); }

.contact-toolbar-actions { gap: 9px; }
.contact-toolbar-actions .contact-export-button,
.contact-toolbar-actions .contact-import-button,
.contact-toolbar-actions .contact-create-button { min-height: 44px; padding-inline: 16px; border-radius: 999px; font-size: calc(14px * var(--portal-text-scale)); }
.contact-toolbar-actions .contact-export-button,
.contact-toolbar-actions .contact-import-button { color: #4c4d2d; background: #fff; }
.contact-toolbar-actions .contact-create-button { border-color: #5f6106; background: #5f6106; }
.contact-toolbar-actions .contact-create-button:hover { background: #585a06; }
.contact-toolbar-actions .contact-export-button:hover:not(:disabled),
.contact-toolbar-actions .contact-import-button:hover:not(:disabled) { border-color: #d5d5b1; color: #5f6106; background: #fff; }

.intelligence-panel { border-radius: 20px; box-shadow: 0 8px 25px rgba(54, 55, 11, .04); }
.intelligence-panel-titlebar { padding: 23px 22px 17px; }
.intelligence-panel-titlebar h2 { font-size: calc(27px * var(--portal-text-scale)); }
.intelligence-panel-head { padding-block: 15px 13px; }
.intelligence-panel-actions .heading-action,
.intelligence-panel-actions .contact-create-button { min-height: 42px; padding-inline: 16px; border-radius: 999px; font-size: calc(14px * var(--portal-text-scale)); }
.intelligence-panel-actions .contact-create-button { border-color: #5f6106; background: #5f6106; }
.intelligence-panel-actions .contact-create-button:hover { background: #585a06; }
.intelligence-controls { gap: 14px; padding-bottom: 16px; }
.intelligence-filters { gap: 2px; padding: 4px; border: 1px solid #dce6e2; border-radius: 999px; background: #f0f4f3; }
.intelligence-filter { min-height: 38px; padding-inline: 14px; border-radius: 999px; font-size: calc(14px * var(--portal-text-scale)); }
.intelligence-filter.is-active { border-color: transparent; color: #5f6106; background: #fff; box-shadow: 0 2px 7px rgba(52, 53, 21, .09); }
.intelligence-tools .intelligence-search-wrap { min-height: 40px; border-radius: 999px; }
.intelligence-tools .intelligence-select-wrap { min-height: 40px; border-radius: 999px; }
.intelligence-tools .intelligence-search-wrap input,
.intelligence-tools .intelligence-select-wrap select { font-size: calc(13px * var(--portal-text-scale)); }
.intelligence-tools .intelligence-refresh { min-height: 40px; padding-inline: 14px; border: 1px solid #dce6e2; border-radius: 999px; color: #4c4d2d; background: #fff; font-size: calc(13px * var(--portal-text-scale)); }
.intelligence-tools .intelligence-refresh svg { width: 15px; height: 15px; }
.intelligence-tools .intelligence-refresh:hover:not(:disabled) { border-color: #d5d5b1; color: #5f6106; background: #fff; }
.intelligence-record-list { gap: 9px; margin: 0 20px 20px; padding: 12px; border-radius: 16px; }
.intelligence-record { border-radius: 14px; }
.intelligence-record-toggle { min-height: 60px; }
.intelligence-record-category, .intelligence-record-tag { border-radius: 999px; }
.intelligence-row-action { width: 34px; height: 34px; border-radius: 50%; }

@media (max-width: 760px) {
  .dashboard-report-toolbar { min-height: 0; gap: 7px 9px; }
  .dashboard-report-tabs { padding: 3px; }
  .dashboard-report-tab { min-height: 35px; padding-inline: 10px; font-size: calc(12px * var(--portal-text-scale)); }
  .dashboard-report-refresh { min-height: 38px; padding-inline: 12px; font-size: calc(12px * var(--portal-text-scale)); }
  .conversation-workspace { height: auto; min-height: 0; }
  .conversation-inbox-meta { gap: 6px; }
  .conversation-handoff-button, .conversation-refresh-button, .conversation-new-button { min-height: 34px; padding-inline: 10px; font-size: calc(12px * var(--portal-text-scale)); }
  .broadcast-workspace-heading { gap: 8px; }
  .broadcast-workspace-heading .broadcast-view-tabs { max-width: 100%; overflow-x: auto; }
  .broadcast-workspace-heading .broadcast-view-tabs button,
  .automation-workspace-toolbar .broadcast-view-tabs button { min-height: 35px; padding-inline: 10px; font-size: calc(12px * var(--portal-text-scale)); }
  .broadcast-workspace-heading .section-toolbar-action,
  .automation-workspace-toolbar > .automation-workspace-refresh { min-height: 38px; padding-inline: 11px; font-size: calc(12px * var(--portal-text-scale)); }
  .automation-primary-action { min-height: 38px; padding-inline: 12px; font-size: calc(12px * var(--portal-text-scale)); }
  .contact-toolbar-actions .contact-export-button,
  .contact-toolbar-actions .contact-import-button,
  .contact-toolbar-actions .contact-create-button { min-height: 40px; padding-inline: 12px; font-size: calc(12px * var(--portal-text-scale)); }
  .intelligence-panel-titlebar h2 { font-size: calc(23px * var(--portal-text-scale)); }
  .intelligence-filter { min-height: 34px; padding-inline: 7px; font-size: calc(11px * var(--portal-text-scale)); }
  .intelligence-tools .intelligence-refresh,
  .intelligence-panel-actions .heading-action,
  .intelligence-panel-actions .contact-create-button { min-height: 38px; font-size: calc(12px * var(--portal-text-scale)); }
  .intelligence-record-list { margin: 0 12px 12px; padding: 9px; }
  .intelligence-row-action { width: 30px; height: 30px; }
}

/* Use the brand blue for brand actions and active controls throughout the portal. */
.hero-primary,
.contact-create-button,
.contact-save-button,
.conversation-control-button.is-primary,
.conversation-send-button,
.campaign-lifecycle-actions .campaign-action-primary,
.broadcast-review-actions .campaign-action-primary,
.automation-card-actions button.is-primary,
.automation-editor-footer .contact-save-button,
.automation-primary-action,
.conversation-new-button,
.conversation-dialog-submit,
.contact-toolbar-actions .contact-create-button,
.intelligence-panel-actions .contact-create-button {
  border-color: var(--brand-blue-button, var(--brand-blue));
  color: #fff;
  background: var(--brand-blue-button, var(--brand-blue));
}

.hero-primary:hover,
.contact-create-button:hover:not(:disabled),
.contact-save-button:hover:not(:disabled),
.conversation-control-button.is-primary:hover:not(:disabled),
.conversation-send-button:hover:not(:disabled),
.campaign-lifecycle-actions .campaign-action-primary:hover:not(:disabled),
.broadcast-review-actions .campaign-action-primary:hover:not(:disabled),
.automation-card-actions button.is-primary:hover:not(:disabled),
.automation-editor-footer .contact-save-button:hover:not(:disabled),
.automation-primary-action:hover:not(:disabled),
.conversation-new-button:hover:not(:disabled),
.conversation-dialog-submit:hover:not(:disabled),
.contact-toolbar-actions .contact-create-button:hover:not(:disabled),
.intelligence-panel-actions .contact-create-button:hover:not(:disabled) {
  border-color: var(--brand-blue-button-hover, var(--brand-blue-hover));
  color: #fff;
  background: var(--brand-blue-button-hover, var(--brand-blue-hover));
}

.automation-workspace-toolbar > .automation-primary-action {
  min-height: 42px;
  gap: 7px;
  padding-inline: 16px;
  border-radius: 999px;
  font-size: calc(14px * var(--portal-text-scale));
  font-weight: 660;
  line-height: normal;
}
.automation-workspace-toolbar > .automation-primary-action svg { width: 15px; height: 15px; }

.dashboard-report-tab.is-active,
.dashboard-report-tab.is-active > span,
.dashboard-period-button.is-active,
.intelligence-tab.is-active,
.intelligence-tab.is-active small,
.intelligence-filter.is-active,
.intelligence-filter.is-active small,
.broadcast-workspace-heading .broadcast-view-tabs button.is-active,
.automation-workspace-toolbar .broadcast-view-tabs button.is-active,
.campaign-list-toolbar .campaign-filter-tabs button.is-active,
.campaign-filter-tabs button.is-active,
.broadcast-channel-tabs > button.is-active,
.broadcast-filter-tabs button.is-active,
.template-manager-tabs button[aria-pressed="true"],
.campaign-view-tabs button.is-active,
.new-conversation-tabs [role="tab"].is-active,
.contact-document-switch button.is-active,
.broadcast-composer-dialog .broadcast-channel-tabs button.is-active,
.broadcast-view-tabs button.is-active,
.conversation-filter-toggle.has-active-filters,
.conversation-filter-option.is-selected {
  color: var(--brand-blue);
}

.heading-action:hover,
.integration-action:hover,
.contact-export-button:hover:not(:disabled),
.contact-import-button:hover:not(:disabled),
.contact-cancel-button:hover:not(:disabled),
.table-action:hover:not(:disabled),
.conversation-refresh-button:hover,
.dashboard-report-refresh:hover,
.broadcast-workspace-heading .section-toolbar-action:hover,
.automation-workspace-toolbar > .automation-workspace-refresh:hover,
.intelligence-tools .intelligence-refresh:hover:not(:disabled),
.conversation-handoff-button,
.conversation-handoff-button:hover,
.conversation-filter-menu-footer button,
.conversation-control-button:hover:not(:disabled),
.campaign-refresh-button:hover:not(:disabled),
.campaign-open-button,
.automation-card-actions button:hover,
.automation-empty button:hover,
.automation-module-action:hover,
.contact-import-text-button,
.contact-import-text-button:hover,
.contact-import-filter button[aria-pressed="true"],
.campaign-audience-admin-actions button:hover,
.report-callout button,
.email-editor-toolbar > button:hover,
.dispatch-create-button,
.broadcast-history-actions button:hover,
.broadcast-personalization-tools button,
.conversation-copy-button:hover,
.conversation-detail-action:hover,
.conversation-tool-button:hover:not(:disabled),
.conversation-quick-replies > summary:hover,
.conversation-quick-replies > div[role="menu"] button:hover,
.conversation-quick-replies > div[role="menu"] button:focus-visible,
.settings-reset-button:hover,
.profile-photo-button,
.profile-photo-remove,
.profile-password-control button:hover,
.handoff-recipient-actions button,
.conversation-notes-button:hover,
.conversation-tag-create-option:hover:not(:disabled),
.intelligence-row-action:hover,
.campaign-audience-actions button:hover,
.campaign-audience-actions button.is-reactivate {
  color: var(--brand-blue);
}

.dispatch-create-button:hover:not(:disabled) {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}
.dashboard-report-refresh:hover,
.broadcast-workspace-heading .section-toolbar-action:hover,
.automation-workspace-toolbar > .automation-workspace-refresh:hover,
.intelligence-tools .intelligence-refresh:hover:not(:disabled),
.contact-toolbar-actions .contact-export-button:hover:not(:disabled),
.contact-toolbar-actions .contact-import-button:hover:not(:disabled),
.conversation-refresh-button:hover {
  border-color: #edf0ae;
}
.contact-create-button:hover:not(:disabled),
.contact-save-button:hover:not(:disabled) { box-shadow: 0 5px 14px rgba(150, 153, 0,.18); }
.automation-primary-action { box-shadow: 0 4px 10px rgba(150, 153, 0,.14); }
.conversation-filter-count { color: var(--brand-blue-ink); background: var(--brand-blue); }
.broadcast-composer-progress button[aria-current="step"] { color: var(--brand-blue); }
.broadcast-composer-progress button[aria-current="step"] span {
  border-color: var(--brand-blue);
  color: var(--brand-blue-ink);
  background: var(--brand-blue);
  box-shadow: 0 0 0 4px var(--brand-blue-soft);
}

.conversation-row.is-active {
  border-color: #f4face;
  background: #fcfdf0;
  box-shadow: inset 3px 0 var(--brand-blue);
}
.automation-create-card { border-color: #f4f7d1; background: #fefff5; }
.automation-create-card:hover { border-color: var(--brand-blue); background: #fcfded; }
.automation-card-mark,
.automation-create-mark { border-color: #f4face; color: var(--brand-blue); background: var(--brand-blue-soft); }
.intelligence-panel-kicker::before,
.intelligence-record::before { background: var(--brand-blue); }
.intelligence-record-mark { color: var(--brand-blue); background: var(--brand-blue-soft); }
.intelligence-record-tag > span { color: var(--brand-blue); }

@media (max-width: 760px) {
  .automation-workspace-toolbar > .automation-primary-action {
    min-height: 38px;
    padding-inline: 11px;
    font-size: calc(12px * var(--portal-text-scale));
  }
}

@media (max-width: 440px) {
  .automation-workspace-toolbar > .automation-primary-action {
    min-height: 33px;
    padding-inline: 8px;
    font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  }
}
.intelligence-schedule-panel { display: grid; gap: 14px; margin: 0 0 16px; padding: 18px; border: 1px solid #e8e9dc; border-radius: 20px; background: linear-gradient(135deg,#fbfbf5 0%,#fff 78%); box-shadow: 0 8px 25px rgba(54, 55, 11, .035); }
.intelligence-schedule-panel > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.intelligence-schedule-panel h2 { margin: 4px 0 3px; color: #3a3b1c; font-size: calc(19px * var(--portal-text-scale)); letter-spacing: -.035em; }
.intelligence-schedule-panel h2 .intelligence-protected-badge { display: inline-flex; vertical-align: middle; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); letter-spacing: 0; }
.intelligence-schedule-panel header p, .intelligence-schedule-empty { margin: 0; color: #877e73; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.intelligence-schedule-kicker { color: #7d7e52; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .12em; }
.intelligence-schedule-summary { display: grid; justify-items: end; gap: 5px; }
.intelligence-schedule-summary small { color: #82938e; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-schedule-status { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border: 1px solid #e8e8d2; border-radius: 999px; background: #f7f7ec; color: #54561c; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; white-space: nowrap; }
.intelligence-schedule-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.intelligence-schedule-day { min-width: 0; padding: 10px; border: 1px solid #e7eee8; border-radius: 12px; background: rgba(255,255,255,.86); }
.intelligence-schedule-day h3 { display: grid; gap: 2px; margin: 0 0 8px; color: #4b4b2e; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-schedule-day h3 span { text-transform: capitalize; }
.intelligence-schedule-day h3 time { color: #82938e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 560; }
.intelligence-schedule-day ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.intelligence-schedule-day li { display: flex; align-items: flex-start; gap: 6px; color: #526963; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; }
.intelligence-schedule-day li > time { color: #565812; font-weight: 760; white-space: nowrap; }
.intelligence-schedule-day li > span { display: grid; min-width: 0; gap: 2px; }
.intelligence-schedule-day li strong { overflow-wrap: anywhere; font-weight: 650; }
.intelligence-schedule-day li small, .intelligence-schedule-day > p { margin: 0; color: #899892; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-schedule-source { display: inline-flex; justify-self: end; align-items: center; gap: 5px; color: #6c6e42; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 670; text-decoration: none; }
.intelligence-schedule-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
.intelligence-schedule-source svg { width: 12px; height: 12px; }
.intelligence-schedule-panel.is-unavailable { grid-template-columns: 1fr auto; align-items: center; border-color: #eddfc9; background: #fffaf1; }
.intelligence-schedule-panel.is-unavailable p { margin: 0; color: #89724f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.intelligence-type-badge.is-always-context { border-color: #e7e7d5; background: #f7f7ec; color: #5d5e2c; }
@media (max-width: 1100px) { .intelligence-schedule-days { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 760px) { .intelligence-schedule-panel { padding: 14px; border-radius: 16px; } .intelligence-schedule-days { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 440px) { .intelligence-schedule-panel > header { flex-direction: column; } .intelligence-schedule-summary { justify-items: start; } .intelligence-schedule-panel.is-unavailable { grid-template-columns: 1fr; } }

.whatsapp-pacing-status { display: block; margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--text-secondary, #7f8b64); overflow-wrap: anywhere; }

/* Compact broadcast composer: one balanced header and a focused editing surface. */
.broadcast-composer-dialog {
  width: min(940px,calc(100vw - 32px));
  height: min(740px,calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  border-color: #dce7e0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(27, 28, 4, .24);
}
.broadcast-composer-dialog::backdrop { background: rgba(25, 25, 4,.5); backdrop-filter: blur(3px); }
.broadcast-composer-progress-row {
  position: static;
  display: grid;
  flex: 0 0 61px;
  grid-template-columns: minmax(120px,1fr) auto minmax(120px,1fr);
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-height: 61px;
  padding: 8px 18px;
  border-bottom: 1px solid #e7ece8;
  background: #fff;
}
.broadcast-composer-head-left { display: flex; min-width: 0; align-items: center; justify-content: flex-start; }
.broadcast-template-action {
  position: static;
  display: inline-flex;
  max-width: 100%;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0 11px;
  transform: none;
  white-space: nowrap;
}
.broadcast-template-action svg { width: 14px; height: 14px; }
.broadcast-composer-progress-row .broadcast-composer-progress {
  width: max-content;
  max-width: 100%;
  justify-self: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
}
.broadcast-composer-progress-row .broadcast-composer-progress > i { width: clamp(14px,3vw,34px); }
.broadcast-composer-progress-row .broadcast-composer-progress button { gap: 7px; padding: 2px; }
.broadcast-composer-progress-row .broadcast-composer-progress button span { width: 28px; height: 28px; }
.broadcast-composer-progress-row .broadcast-composer-progress button strong { font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); white-space: nowrap; }
.broadcast-composer-close { justify-self: end; width: 34px; height: 34px; flex: 0 0 34px; font-size: 22px; }
.broadcast-composer-scroll { padding: 14px 22px 18px; background: #fff; }
.broadcast-composer-form { width: min(850px,100%); }
.broadcast-composer-step { padding: 18px 20px; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.broadcast-step-intro { margin-bottom: 15px; }
.broadcast-step-intro h3 { font-size: calc(17px * var(--portal-text-scale)); }
.broadcast-step-intro p:last-child { font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-settings-grid.broadcast-email-settings,
.broadcast-settings-grid.broadcast-whatsapp-settings { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; }
.broadcast-settings-grid > label,
.broadcast-settings-grid .broadcast-email-audience-settings > label,
.broadcast-content-fields > label { gap: 6px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-settings-grid input,
.broadcast-settings-grid select,
.broadcast-content-fields input,
.broadcast-content-fields textarea { min-height: 39px; padding-inline: 10px; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-content-grid { grid-template-columns: minmax(0,1.15fr) minmax(220px,.85fr); gap: 16px; }
.broadcast-content-fields { gap: 10px; }
.broadcast-content-fields textarea { min-height: 135px; max-height: 220px; padding: 10px; }
.broadcast-composer-form .email-editor-visual,
.broadcast-composer-form .email-editor-source { min-height: 175px; padding: 12px; }
.broadcast-contact-selector { padding: 11px; }
.broadcast-contact-results { max-height: 170px; }
.broadcast-consent-note { margin-top: 13px; padding: 9px 11px; }
.broadcast-step-actions { margin-top: 16px; padding-top: 13px; }
.broadcast-step-actions > button,
.broadcast-review-actions > button { min-height: 38px; padding-inline: 13px; }
.broadcast-composer-footer { min-height: 48px; padding: 8px 20px max(8px,env(safe-area-inset-bottom)); }

@media (max-width: 760px) {
  .broadcast-composer-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .broadcast-composer-progress-row { flex-basis: 56px; grid-template-columns: minmax(90px,1fr) auto minmax(90px,1fr); min-height: 56px; gap: 6px; padding: 7px 10px; }
  .broadcast-composer-progress-row .broadcast-composer-progress { gap: 4px; }
  .broadcast-composer-progress-row .broadcast-composer-progress > i { width: 12px; }
  .broadcast-composer-progress-row .broadcast-composer-progress button { gap: 4px; }
  .broadcast-composer-progress-row .broadcast-composer-progress button span { width: 26px; height: 26px; }
  .broadcast-composer-progress-row .broadcast-composer-progress button strong { font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
  .broadcast-template-action { min-height: 33px; padding-inline: 8px; }
  .broadcast-composer-scroll { padding: 10px 12px 14px; }
  .broadcast-composer-step { padding: 14px 10px; }
  .broadcast-content-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .broadcast-settings-grid.broadcast-email-settings,
  .broadcast-settings-grid.broadcast-whatsapp-settings { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .broadcast-step-actions { gap: 8px; }
}
@media (max-width: 560px) {
  .broadcast-composer-progress-row { grid-template-columns: 38px minmax(0,1fr) 38px; padding-inline: 8px; }
  .broadcast-composer-progress-row .broadcast-composer-progress { width: 100%; justify-content: center; }
  .broadcast-composer-progress-row .broadcast-composer-progress button:not([aria-current="step"]) strong { display: none; }
  .broadcast-composer-progress-row .broadcast-composer-progress > i { width: 10px; }
  .broadcast-template-action { min-height: 32px; padding-inline: 8px; }
  .broadcast-template-action svg { flex: 0 0 auto; }
  .broadcast-composer-close { width: 32px; height: 32px; }
}
@media (max-width: 400px) {
  .broadcast-step-actions { align-items: stretch; flex-direction: column-reverse; }
  .broadcast-step-actions > button { width: 100%; justify-content: center; }
}

.sms-provider-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 12px; margin: 14px 0; }
.sms-provider-card { display: grid; min-width: 0; align-content: start; gap: 11px; padding: 14px; border: 1px solid #dce7e0; border-radius: 12px; background: #fdfdfb; }
.sms-provider-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sms-provider-card > header .eyebrow { margin: 0 0 3px; color: #7d9088; font-size: 10px; letter-spacing: .08em; }
.sms-provider-card > header h4 { margin: 0; color: #444525; font-size: 15px; }
.sms-provider-card > label { display: grid; min-width: 0; gap: 6px; color: #526b64; font-size: 12px; font-weight: 650; }
.sms-provider-card > label input,
.sms-provider-card > label select,
.sms-crm-consent-settings > label input { box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #cfded5; border-radius: 8px; color: #404128; background: #fff; font: inherit; }
.sms-provider-card > label small,
.sms-crm-consent-settings > label small { color: #71827c; font-size: 11px; font-weight: 450; line-height: 1.45; }
.sms-provider-card > a { color: #5c5d29; font-size: 12px; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.sms-crm-consent-settings { display: grid; gap: 11px; margin: 14px 0; padding: 14px; border: 1px solid #dce7e0; border-radius: 12px; background: #fafaf7; }
.sms-crm-consent-settings h4 { margin: 0; color: #51522c; font-size: 13px; }
.sms-crm-consent-settings > label { display: grid; max-width: 720px; gap: 6px; color: #526b64; font-size: 12px; font-weight: 650; }
.sms-crm-consent-settings .admin-module-choice { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sms-callback-settings { display: grid; gap: 10px; margin: 14px 0; padding: 14px; border: 1px solid #dce7e0; border-radius: 12px; background: #fafaf7; }
.sms-callback-settings h4 { margin: 0; color: #51522c; font-size: 13px; }
.sms-callback-settings > p { margin: 0; color: #71827c; font-size: 11px; line-height: 1.5; }
.sms-callback-settings > label { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px 10px; color: #526b64; font-size: 11px; font-weight: 650; }
.sms-callback-settings > label input { box-sizing: border-box; grid-column: 1; width: 100%; min-width: 0; min-height: 34px; padding: 7px 9px; border: 1px solid #d4e0d8; border-radius: 7px; color: #60716b; background: #fff; font: 11px ui-monospace,monospace; }
.sms-callback-settings > label button { grid-column: 2; grid-row: 2; }
.sms-callback-settings > label small { grid-column: 1 / -1; color: #71827c; font-size: 10px; font-weight: 450; }
.sms-consent-admin-note { margin: 12px 0; padding: 11px 13px; border-left: 3px solid #7b7d41; border-radius: 7px; color: #436158; background: #f6f7ed; font-size: 12px; line-height: 1.5; }
.sms-provider-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 720px) {
  .sms-provider-grid { grid-template-columns: minmax(0,1fr); }
}

/* Branded, directly editable email canvases for templates and broadcasts. */
.email-template-dialog { width: min(1280px,calc(100vw - 28px)); max-width: 1280px; }
.template-manager-head { align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 10px; }
.template-manager-head > div { min-width: 0; }
.template-manager-head .eyebrow { margin: 0 0 5px; color: #6c6e10; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.template-manager-head h2 { margin: 0; color: #323312; font-size: 19px; letter-spacing: -.035em; }
.template-manager-head p:last-child { margin: 4px 0 0; color: #979483; font-size: 11px; }
.template-manager-tabs { gap: 6px; padding: 9px 20px 0; border-bottom: 1px solid #e9efeb; }
.template-manager-tabs button { min-height: 36px; padding-inline: 13px; }
.template-manager-tabs button[aria-pressed="true"] { border-color: #e3e4c8; color: #5c5e09; background: #f8f8ec; }
.template-manager-body { grid-template-columns: minmax(205px,.31fr) minmax(0,.69fr); gap: 18px; padding: 16px 20px 20px; }
.template-manager-list { position: sticky; top: 0; }
.template-manager-form { gap: 12px; }
.template-manager-fields { gap: 12px; }
.template-manager-fields > label { gap: 6px; color: #60613e; font-size: 10px; }
.template-manager-actions { gap: 8px; }
.template-email-editor, .broadcast-email-editor { overflow: hidden; border: 1px solid #dce7e3; border-radius: 13px; background: #fbfbf8; box-shadow: 0 5px 17px #31320d0a; }
.template-email-editor-bar, .broadcast-email-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #e5ece9; background: #fff; }
.template-email-editor-bar > div:first-child, .broadcast-email-editor-head > div:first-child { display: grid; gap: 4px; }
.template-email-editor-kicker { color: #6c6e10; font-size: 8px; font-weight: 820; letter-spacing: .13em; }
.template-email-editor-bar strong, .broadcast-email-editor-head strong { color: #42431e; font-size: 11px; font-weight: 760; }
.broadcast-email-editor-head small { color: #928d7d; font-size: 9px; line-height: 1.45; }
.email-mode-switch { display: inline-flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid #dce7e4; border-radius: 9px; background: #f6f7f2; }
.email-mode-switch button { min-height: 29px; padding: 0 11px; border: 1px solid transparent; border-radius: 6px; color: #857e70; background: transparent; font: inherit; font-size: 9px; font-weight: 730; cursor: pointer; transition: color .14s ease,background .14s ease,border-color .14s ease; }
.email-mode-switch button[aria-pressed="true"] { border-color: #e5e5d3; color: #55560e; background: #fff; box-shadow: 0 1px 2px #31321312; }
.email-mode-switch button:focus-visible { outline: 3px solid #bbc00055; outline-offset: 2px; }
.template-email-inbox { overflow: hidden; margin: 13px; border: 1px solid #dfe8e5; border-radius: 11px; background: #fff; box-shadow: 0 4px 14px #33340f0a; }
.template-email-inbox > div:first-child { display: flex; align-items: center; gap: 10px; min-height: 62px; padding: 10px 14px; border-bottom: 1px solid #e9efec; }
.template-email-inbox-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #191b06; background: #bbc000; font-size: 10px; font-weight: 900; letter-spacing: -.05em; }
.template-email-inbox > div > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.template-email-inbox small { color: #969285; font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.template-email-inbox strong { overflow: hidden; color: #545532; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.template-email-inbox i { color: #a3a093; font-size: 8px; font-style: normal; }
.template-email-inbox b { margin-left: auto; color: #a9a39a; font-size: 14px; font-weight: 500; }
.template-manager-actions .template-preview-button { border-color: #e0e0cc; color: #53541c; background: #fff; }
.template-manager-actions .template-preview-button:hover { border-color: #c2c391; color: #4b4d0f; background: #f8f8f1; }
.template-preview-sms { width: min(100%,430px); margin: 18px auto; padding: 14px; border: 1px solid #dde8e3; border-radius: 12px; background: #f4f7f5; box-shadow: 0 5px 20px #2b2b1110; }
.template-preview-sms > span { display: block; margin-bottom: 10px; color: #827b72; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.template-preview-sms p { margin: 0; padding: 12px 13px; border: 1px solid #e2e9e5; border-radius: 12px 12px 12px 3px; color: #4e4e30; background: #fff; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.template-preview-sms small { display: block; margin-top: 6px; color: #95a09d; font-size: 8px; text-align: right; }
.template-email-visual-frame { display: block; width: 100%; height: min(56dvh,540px); min-height: 300px; border: 0; background: #f3f0ed; }
.template-email-source, .broadcast-email-source { display: block; box-sizing: border-box; width: calc(100% - 26px); min-height: min(56dvh,540px); max-height: 700px; margin: 13px; padding: 14px; border: 1px solid #dce7e3; border-radius: 9px; color: #464724; background: #fff; font-family: ui-monospace,Consolas,monospace; font-size: 10px; line-height: 1.6; resize: vertical; tab-size: 2; }
.template-email-source[hidden], .broadcast-email-source[hidden], .template-email-visual-frame[hidden], .broadcast-email-visual-frame[hidden] { display: none !important; }
.template-email-editor-foot, .broadcast-email-editor-foot { display: flex; justify-content: space-between; gap: 10px; padding: 0 14px 12px; color: #938d81; font-size: 8px; line-height: 1.5; }
.template-email-editor-foot span:last-child, .broadcast-email-editor-foot span:last-child { flex: 0 0 auto; color: #7c715d; font-weight: 700; }
.broadcast-email-settings-line { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: end; gap: 12px; margin-bottom: 12px; }
.broadcast-email-settings-line > label { display: grid; gap: 5px; color: #706953; font-size: 9px; font-weight: 720; }
.broadcast-email-settings-line .campaign-template-select { gap: 7px; }
.broadcast-email-settings-line .campaign-template-select > label { display: grid; gap: 5px; color: #706953; font-size: 9px; font-weight: 720; }
.broadcast-email-settings-line .campaign-template-select select { margin: 0; }
.broadcast-email-settings-line .campaign-panel-link { min-height: 36px; white-space: nowrap; }
.broadcast-email-editor-head { padding: 13px 15px; }
.broadcast-email-canvas { overflow: hidden; margin: 13px; border: 1px solid #dfe8e5; border-radius: 11px; background: #fff; box-shadow: 0 4px 14px #33340f0a; }
.broadcast-email-canvas-meta { display: grid; gap: 5px; padding: 10px 13px; border-bottom: 1px solid #e9efec; }
.broadcast-email-canvas-meta > span:first-child { display: flex; align-items: center; gap: 6px; color: #928b80; font-size: 8px; font-weight: 760; }
.broadcast-email-canvas-meta > span:first-child i { width: 6px; height: 6px; border-radius: 50%; background: #6b6d20; }
.broadcast-email-canvas-meta > span:nth-child(2) { color: #999489; font-size: 8px; }
.broadcast-email-canvas-meta strong { overflow: hidden; color: #54542f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-email-builder { display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid #e4ece8; background: #f9fbfa; }
.broadcast-email-builder[hidden], .broadcast-email-source-note[hidden] { display: none !important; }
.broadcast-email-builder > span, .broadcast-email-builder > button, .broadcast-email-builder > i { flex: 0 0 auto; }
.broadcast-email-builder > span { padding: 0 4px; color: #958d85; font-size: 8px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
.broadcast-email-builder > button { min-height: 29px; padding: 0 9px; border: 1px solid #dce6e2; border-radius: 7px; color: #6a6548; background: #fff; font: inherit; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: border-color .14s ease,background .14s ease,color .14s ease,transform .14s ease; }
.broadcast-email-builder > button:hover { transform: translateY(-1px); border-color: #c8bca7; color: #51480f; background: #f8f3f0; }
.broadcast-email-builder > button:focus-visible { outline: 3px solid #7c5e0055; outline-offset: 2px; }
.broadcast-email-builder > button[data-broadcast-email-tool="bold"] { font-weight: 850; }
.broadcast-email-builder > button[data-broadcast-email-tool="italic"] { min-width: 30px; font-family: Georgia,serif; font-size: 14px; }
.broadcast-email-builder > i { width: 1px; height: 20px; margin: 0 3px; background: #dfe7e4; }
.email-format-tools { display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; overflow-x: auto; padding: 7px 10px; border-bottom: 1px solid #e4ece8; background: #f1f7f5; }
.email-format-tools[hidden] { display: none !important; }
.email-format-tools > label { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; color: #847b70; font-size: 8px; font-weight: 760; white-space: nowrap; }
.email-format-tools > label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.email-format-tools select { min-height: 28px; padding: 0 21px 0 7px; border: 1px solid #d5e3de; border-radius: 6px; color: #5f5b3d; background: #fff; font: inherit; font-size: 9px; cursor: pointer; }
.email-format-tools input[type="color"] { width: 30px; height: 28px; padding: 3px; border: 1px solid #d5e3de; border-radius: 6px; background: #fff; cursor: pointer; }
.email-format-tools > button { min-width: 29px; min-height: 28px; padding: 0 8px; border: 1px solid #d5e3de; border-radius: 6px; color: #6a6548; background: #fff; font: inherit; font-size: 9px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.email-format-tools > button:hover, .email-format-tools select:hover, .email-format-tools input[type="color"]:hover { border-color: #beb096; color: #51480f; background: #f8fffd; }
.email-format-tools > button:focus-visible, .email-format-tools select:focus-visible, .email-format-tools input[type="color"]:focus-visible { outline: 3px solid #7c5e0055; outline-offset: 2px; }
.email-format-divider { width: 1px; height: 20px; flex: 0 0 auto; margin: 0 2px; background: #d5e2de; }
.template-email-editor > .email-format-tools { margin: 0 13px; border: 1px solid #e4ece8; border-radius: 8px; }
.template-email-inbox > .email-format-tools,
.broadcast-email-canvas > .email-format-tools { margin: 0; padding: 4px 10px; border-top: 1px solid #e7efec; border-bottom: 1px solid #e7efec; background: linear-gradient(180deg,#fbfdfc 0%,#f5f9f7 100%); }
.broadcast-email-builder + .email-format-tools { border-top: 0; }
.broadcast-email-builder { border-bottom: 0; }
.broadcast-email-builder { flex-wrap: wrap; overflow: visible; }
.email-format-tools > label,
.email-format-tools > button { font-size: 8px; }
.email-format-tools select,
.email-format-tools input[type="color"],
.email-format-tools > button { min-height: 25px; height: 25px; }
.email-format-tools input[type="color"] { width: 27px; }
.email-format-tools > button { min-width: 27px; padding-inline: 7px; border-color: #dfe9e5; box-shadow: 0 1px 1px #32241310; }
.email-format-tools select { min-height: 25px; height: 25px; }
.broadcast-email-source-note { margin: 10px 13px 0; padding: 9px 11px; border: 1px solid #dce8e4; border-radius: 8px; color: #716a58; background: #f1f7f5; font-size: 9px; line-height: 1.5; }
.broadcast-email-visual-frame { display: block; width: 100%; height: min(68dvh,680px); min-height: 420px; border: 0; background: #fff; }
.broadcast-email-canvas .broadcast-email-source { width: 100%; min-height: min(68dvh,680px); max-height: 720px; margin: 0; border: 0; border-radius: 0; }
.broadcast-email-editor-foot { padding: 0 14px 12px; }
.broadcast-email-editor-feedback { margin: 0 14px 12px; padding: 9px 11px; border: 1px solid #efc7bb; border-radius: 8px; color: #8a4431; background: #fff8f5; font-size: 11px; line-height: 1.5; }
.broadcast-email-editor-feedback[hidden] { display: none !important; }

@media (max-width: 760px) {
  .template-manager-head { padding: 11px 13px 8px; }
  .template-manager-head h2 { font-size: 16px; }
  .template-manager-tabs { padding-inline: 13px; }
  .template-manager-body { grid-template-columns: minmax(0,1fr); gap: 11px; padding: 11px 13px 15px; }
  .template-manager-list { position: static; }
  .template-manager-form { max-height: none; }
  .template-email-editor-bar, .broadcast-email-editor-head { align-items: flex-start; }
  .template-email-visual-frame { height: 58dvh; min-height: 280px; }
  .broadcast-email-visual-frame { height: 58dvh; min-height: 360px; }
  .template-email-source, .broadcast-email-source { min-height: 58dvh; }
  .broadcast-email-settings-line { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .broadcast-email-settings-line .campaign-template-select { align-items: end; }
  .broadcast-email-settings-line .campaign-template-select > label { flex: 1; }
}

@media (max-width: 480px) {
  .template-email-editor-bar, .broadcast-email-editor-head { flex-direction: column; align-items: stretch; }
  .email-mode-switch { align-self: flex-start; }
  .template-email-inbox, .broadcast-email-canvas { margin: 9px; }
  .template-email-editor-foot, .broadcast-email-editor-foot { flex-direction: column; gap: 4px; padding-inline: 10px; }
  .template-email-editor-foot span:last-child, .broadcast-email-editor-foot span:last-child { align-self: flex-end; }
}

/* Keep campaign dialogs sized to the work in the current step. */
.broadcast-composer-dialog {
  width: min(860px,calc(100vw - 32px));
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 24px);
  align-self: center;
}
.broadcast-composer-scroll {
  min-height: 0;
  flex: 0 1 auto;
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: 8px 14px 10px;
}
.broadcast-composer-form { width: min(800px,100%); }
.broadcast-composer-step { padding: 11px 14px; }
.broadcast-step-intro { margin-bottom: 9px; }
.broadcast-step-intro h3 { font-size: calc(16px * var(--portal-text-scale)); }
.broadcast-settings-grid.broadcast-email-settings,
.broadcast-settings-grid.broadcast-whatsapp-settings { gap: 9px 12px; }
.broadcast-content-grid { gap: 12px; }
.broadcast-content-fields { gap: 8px; }
.broadcast-content-fields textarea { min-height: 112px; max-height: 180px; }
.broadcast-composer-form .email-editor-visual,
.broadcast-composer-form .email-editor-source { min-height: 150px; }
.broadcast-contact-selector { padding: 9px; }
.broadcast-contact-results { max-height: 132px; }
.broadcast-consent-note { margin-top: 8px; padding: 7px 9px; }
.broadcast-step-actions { margin-top: 10px; padding-top: 9px; }
.broadcast-composer-footer { min-height: 42px; padding-block: 5px; }

.audience-list-dialog[open]:not(.audience-list-dialog-wide) {
  width: min(500px,calc(100vw - 28px));
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 24px);
  align-self: center;
}
.audience-list-dialog:not(.audience-list-dialog-wide) > form,
.audience-list-dialog:not(.audience-list-dialog-wide) .audience-editor-shell { min-height: 0; flex: 0 1 auto; }
.audience-list-dialog:not(.audience-list-dialog-wide) > form { min-height: 0; flex: 0 1 auto; }
.audience-list-dialog:not(.audience-list-dialog-wide) .contact-form-scroll { min-height: 0; flex: 0 1 auto; }
.audience-dialog-head { padding: 16px 20px 12px; }
.audience-dialog-head h2 { font-size: calc(20px * var(--portal-text-scale)); }
.audience-list-dialog .audience-flow-progress { min-height: 43px; gap: 9px; padding-inline: 20px; }
.audience-list-dialog .audience-flow-progress i { width: 20px; height: 20px; }
.audience-list-dialog:not(.audience-list-dialog-wide) .audience-list-fields { gap: 10px; padding: 13px 20px 15px; }
.audience-list-dialog:not(.audience-list-dialog-wide) .audience-list-fields input,
.audience-list-dialog:not(.audience-list-dialog-wide) .audience-list-fields select { min-height: 39px; }
.audience-list-dialog:not(.audience-list-dialog-wide) .audience-list-fields textarea { min-height: 54px; }
.audience-list-dialog .audience-editor-actions { min-height: 54px; padding: 8px 20px max(9px,env(safe-area-inset-bottom)); }
.audience-list-dialog-wide[open] {
  width: min(720px,calc(100vw - 28px));
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 24px);
  align-self: center;
}
.audience-list-dialog-wide .audience-editor-shell,
.audience-list-dialog-wide .audience-flow-contact-step,
.audience-list-dialog-wide .audience-add-contacts-in-dialog { min-height: 0; flex: 0 1 auto; }
.audience-list-dialog-wide .audience-editor-shell,
.audience-list-dialog-wide .audience-flow-contact-step { min-height: 0; flex: 0 1 auto; }
.audience-list-dialog-wide .audience-flow-contact-step { max-height: calc(100dvh - 190px); }
.audience-list-dialog-wide .audience-add-contacts-in-dialog .audience-eligible-list {
  max-height: min(270px,34dvh);
  min-height: 0;
  flex: 0 1 auto;
  overflow-y: auto;
}
.audience-list-dialog-wide .audience-add-contacts-in-dialog .audience-contact-state { min-height: 82px; }

@media (max-width: 760px) {
  .broadcast-composer-dialog { width: calc(100vw - 20px); height: auto; min-height: 0; max-height: calc(100dvh - 20px); }
  .broadcast-composer-scroll { max-height: calc(100dvh - 108px); padding: 7px 10px 9px; }
  .broadcast-composer-step { padding: 10px 9px; }
  .audience-list-dialog[open] { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .audience-dialog-head { padding-inline: 16px; }
  .audience-list-dialog .audience-flow-progress { padding-inline: 16px; }
  .audience-list-dialog:not(.audience-list-dialog-wide) .audience-list-fields { padding-inline: 16px; }
  .audience-list-dialog .audience-editor-actions { padding-inline: 16px; }
  .audience-list-dialog-wide[open] { height: auto; }
  .audience-list-dialog-wide .audience-flow-contact-step { max-height: calc(100dvh - 190px); }
}

@media (max-width: 560px) {
  .broadcast-composer-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .broadcast-composer-scroll { max-height: calc(100dvh - 102px); }
}
.broadcast-image-choose:focus-within { outline: 2px solid var(--green); outline-offset: 3px; }
.broadcast-image-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: #61756d; }
.broadcast-image-controls [hidden] { display: none; }
.broadcast-image-choose { display: inline-flex; position: relative; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid #dce7e0; border-radius: 8px; color: var(--text); cursor: pointer; font-weight: 600; }
.broadcast-image-choose input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.broadcast-image-controls button { min-height: 36px; padding: 4px 8px; text-decoration: underline; cursor: pointer; }
.broadcast-image-controls small { max-width: 100%; overflow-wrap: anywhere; }
.broadcast-image-dropzone.is-dragging { outline: 2px dashed var(--green); outline-offset: 4px; }
.broadcast-image-preview { display: block; max-width: 100%; max-height: 280px; width: auto; object-fit: contain; border-radius: 8px; margin-bottom: 10px; }
/* Square, as the chat shows it, so a picture that would be cut is seen here first. */
#broadcastWhatsappLivePreview .broadcast-image-preview { width: 100%; max-height: none; aspect-ratio: 1 / 1; object-fit: cover; }
/* Audience registry and its focused, self-contained manager. */
.campaign-audience-list {
  grid-template-columns: repeat(auto-fit,minmax(min(100%,360px),1fr));
  gap: 11px;
  padding: 15px 17px 17px;
}
.campaign-audience-item {
  position: relative;
  grid-template-columns: minmax(0,1fr) auto;
  min-height: 94px;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid #e2eae4;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(60, 61, 25, .035);
  transition: border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.campaign-audience-item:hover,
.campaign-audience-item.is-selected {
  border-color: #d3d3b3;
  background: #fff;
  box-shadow: 0 7px 20px rgba(60, 61, 25, .08);
  transform: translateY(-1px);
}
.campaign-audience-item.is-archived { opacity: .8; }
.campaign-audience-main {
  grid-template-columns: 38px minmax(0,1fr) auto 15px;
  gap: 10px;
  align-self: stretch;
  padding: 2px 0;
}
.campaign-audience-main:hover { background: transparent; }
.campaign-audience-mark { width: 36px; height: 36px; }
.campaign-audience-name { align-content: center; gap: 4px; }
.campaign-audience-name strong { font-size: max(13px,calc(13px * var(--portal-text-scale))); }
.campaign-audience-name small { max-width: 320px; font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.campaign-audience-meta { flex-wrap: wrap; row-gap: 3px; }
.campaign-audience-count { min-width: 48px; align-content: center; }
.campaign-audience-count strong { font-size: max(18px,calc(18px * var(--portal-text-scale))); }
.campaign-audience-actions { justify-content: flex-end; align-self: center; }
.campaign-audience-actions button.campaign-audience-manage {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-color: #e6e6d6;
  color: #4d4e1e;
  background: #f9faf5;
  font-size: max(10px,calc(10px * var(--portal-text-scale)));
  white-space: nowrap;
}
.campaign-audience-actions button.campaign-audience-manage:hover { border-color: #cacaa3; background: #f7f7ec; }
.campaign-audience-actions button.campaign-audience-manage svg { width: 13px; height: 13px; }
.campaign-audience-item.is-archived .campaign-audience-manage { color: #65766e; background: #f7f8f6; }
.campaign-footnote { padding: 0 18px 14px; font-size: max(9px,calc(9px * var(--portal-text-scale))); }

.audience-list-dialog[open]:not(.audience-list-dialog-wide) {
  width: min(490px,calc(100vw - 28px));
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 28px);
  align-self: center;
  overflow: hidden;
}
.audience-list-dialog:not(.audience-list-dialog-wide) > form,
.audience-list-dialog:not(.audience-list-dialog-wide) .audience-editor-shell {
  min-height: 0;
  flex: 0 1 auto;
}
.audience-create-head {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 32px;
  align-items: center;
  gap: 12px;
  padding: 19px 21px 16px;
  border-bottom: 1px solid #e9efea;
  background: linear-gradient(120deg,#f9faf5,#fff 72%);
}
.audience-create-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e8e8d8;
  border-radius: 12px;
  color: #595a27;
  background: #f6f7ed;
}
.audience-create-icon svg { width: 18px; height: 18px; }
.audience-create-head > div { min-width: 0; }
.audience-create-head .eyebrow { margin: 0 0 4px; color: #7b9383; font-size: max(8px,calc(8px * var(--portal-text-scale))); font-weight: 760; letter-spacing: .09em; }
.audience-create-head h2 { margin: 0; color: #414122; font-size: max(20px,calc(20px * var(--portal-text-scale))); font-weight: 760; letter-spacing: -.035em; }
.audience-create-head p:not(.eyebrow) { margin: 4px 0 0; color: #7b8d83; font-size: max(11px,calc(11px * var(--portal-text-scale))); line-height: 1.4; }
.audience-create-head .contact-dialog-close { width: 31px; height: 31px; }
.audience-create-fields { display: grid; gap: 12px; padding: 17px 21px 10px; }
.audience-create-fields > label,
.audience-manage-settings-fields > label { display: grid; gap: 6px; color: #486458; font-size: max(11px,calc(11px * var(--portal-text-scale))); font-weight: 710; }
.audience-create-fields > label > span,
.audience-manage-settings-fields > label > span { color: #91a097; font-weight: 520; }
.audience-create-fields input,
.audience-create-fields textarea,
.audience-manage-settings-fields input,
.audience-manage-settings-fields textarea {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid #d9e5dc;
  border-radius: 9px;
  color: #48492a;
  background: #fff;
  font: inherit;
  font-size: max(12px,calc(12px * var(--portal-text-scale)));
}
.audience-create-fields textarea,
.audience-manage-settings-fields textarea { min-height: 70px; resize: vertical; }
.audience-create-fields input:focus,
.audience-create-fields textarea:focus,
.audience-manage-settings-fields input:focus,
.audience-manage-settings-fields textarea:focus { border-color: #a4a668; outline: 3px solid rgba(120, 121, 61, .14); outline-offset: 1px; }
.audience-create-hint { margin: 0; padding: 9px 11px; border: 1px solid #edeee5; border-radius: 9px; color: #6d8375; background: #fafaf6; font-size: max(10px,calc(10px * var(--portal-text-scale))); line-height: 1.4; }
.audience-create-fields .contact-form-error { margin: 0; }
.audience-create-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 21px 18px; border-top: 1px solid #edf1ed; }
.audience-create-actions button { min-height: 37px; }

.audience-manage-dialog[open] {
  display: flex;
  width: min(1000px,calc(100vw - 32px));
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - max(28px,env(safe-area-inset-top) + env(safe-area-inset-bottom)));
  align-self: center;
  overflow: hidden;
  border-color: #d9e5dc;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(28, 28, 4,.3);
}
.audience-manage-dialog::backdrop { background: rgba(25, 26, 5,.56); backdrop-filter: blur(4px); }
.audience-manage-shell { display: flex; width: 100%; min-height: min(370px,calc(100dvh - 32px)); max-height: calc(100dvh - max(28px,env(safe-area-inset-top) + env(safe-area-inset-bottom))); flex: 0 1 auto; flex-direction: column; overflow: hidden; }
.audience-manage-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 32px;
  align-items: center;
  gap: 20px;
  padding: 19px 22px 17px;
  border-bottom: 1px solid #e8eee9;
  background: linear-gradient(112deg,#f9faf5 0,#fff 78%);
}
.audience-manage-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
.audience-manage-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid #e7e7d7; border-radius: 13px; color: #585a28; background: #f5f6ed; }
.audience-manage-icon svg { width: 19px; height: 19px; }
.audience-manage-identity > div { min-width: 0; }
.audience-manage-identity .eyebrow { margin: 0 0 4px; color: #82968a; font-size: max(8px,calc(8px * var(--portal-text-scale))); font-weight: 760; letter-spacing: .09em; }
.audience-manage-identity h2 { overflow: hidden; margin: 0; color: #414122; font-size: max(21px,calc(21px * var(--portal-text-scale))); font-weight: 760; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.audience-manage-identity > div > p:last-child { overflow: hidden; max-width: 580px; margin: 4px 0 0; color: #7c8d84; font-size: max(11px,calc(11px * var(--portal-text-scale))); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.audience-manage-summary { display: flex; align-items: center; gap: 13px; white-space: nowrap; }
.audience-manage-status { display: inline-flex; min-height: 27px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #e7e7d7; border-radius: 99px; color: #5c5e2c; background: #f7f7ef; font-size: max(10px,calc(10px * var(--portal-text-scale))); font-weight: 700; }
.audience-manage-status > i { width: 7px; height: 7px; border-radius: 50%; background: #8c8d48; }
.audience-manage-status.is-archived { border-color: #e2e6df; color: #758078; background: #f5f6f3; }
.audience-manage-status.is-archived > i { background: #98a39a; }
.audience-manage-member-count { color: #75857a; font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-manage-member-count strong { color: #52532b; font-size: max(15px,calc(15px * var(--portal-text-scale))); font-variant-numeric: tabular-nums; }
.audience-manage-head .contact-dialog-close { width: 32px; height: 32px; }
.audience-manage-tabs { display: flex; min-height: 53px; flex: 0 0 auto; align-items: stretch; gap: 5px; padding: 0 21px; border-bottom: 1px solid #e8eee9; background: #fff; }
.audience-manage-tab { position: relative; display: inline-flex; min-width: 100px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 0; color: #788981; background: transparent; font: inherit; font-size: max(11px,calc(11px * var(--portal-text-scale))); font-weight: 680; cursor: pointer; }
.audience-manage-tab::after { position: absolute; right: 8px; bottom: -1px; left: 8px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; content: ""; }
.audience-manage-tab:hover { color: #525425; }
.audience-manage-tab.is-active { color: #4e4f1d; }
.audience-manage-tab.is-active::after { background: #7b7d3c; }
.audience-manage-tab small { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 99px; color: #648171; background: #f5f5ef; font-size: max(9px,calc(9px * var(--portal-text-scale))); font-variant-numeric: tabular-nums; }
.audience-manage-tab:focus-visible,
.audience-manage-dialog button:focus-visible { outline: 3px solid rgba(105, 106, 47, .2); outline-offset: 2px; }
.audience-manage-content { min-height: 0; flex: 0 1 auto; overflow: auto; padding: 15px 20px 13px; overscroll-behavior: contain; }
.audience-manage-content[aria-busy="true"] { cursor: progress; }
.audience-manage-panel { min-width: 0; }
.audience-manage-members-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.audience-manage-members-toolbar .campaign-list-search { width: min(460px,100%); min-height: 39px; flex: 1; border-color: #dce6df; border-radius: 9px; background: #fff; }
.audience-manage-members-toolbar .campaign-list-search input { min-height: 37px; font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.audience-manage-members-toolbar .campaign-subscriber-total { margin-left: auto; color: #718579; font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-manage-member-scroll { max-height: min(410px,calc(100dvh - 330px)); overflow: auto; border: 1px solid #e8eee9; border-radius: 11px; background: #fff; scrollbar-gutter: stable; }
.audience-manage-member-scroll .campaign-subscriber-table { min-width: 770px; }
.audience-manage-member-scroll .campaign-subscriber-head,
.audience-manage-member-scroll .campaign-subscriber-row { grid-template-columns: minmax(185px,1.05fr) minmax(120px,.65fr) minmax(300px,1.5fr) minmax(66px,auto); gap: 12px; padding-inline: 14px; }
.audience-manage-member-scroll .campaign-subscriber-head { min-height: 34px; position: sticky; top: 0; z-index: 1; background: #fafaf7; }
.audience-manage-member-scroll .campaign-subscriber-row { min-height: 61px; }
.audience-manage-member-scroll .campaign-subscriber-person { gap: 3px; }
.audience-manage-member-scroll .campaign-subscriber-person strong { color: #505032; font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.audience-manage-member-scroll .campaign-subscriber-person small { font-size: max(9px,calc(9px * var(--portal-text-scale))); }
.campaign-subscriber-row > .campaign-subscriber-status { width: auto; padding: 0; border: 0; border-radius: 0; color: #788880; background: transparent; font-size: max(9px,calc(9px * var(--portal-text-scale))); }
.campaign-subscriber-row > .campaign-consent-channel-status { display: flex; gap: 4px; }
.campaign-consent-channel-status > i { display: inline-flex; min-height: 22px; align-items: center; padding: 0 7px; border: 1px solid #e4e9e4; border-radius: 99px; color: #7f8982; background: #f7f8f6; font-size: max(8px,calc(8px * var(--portal-text-scale))); font-style: normal; font-weight: 650; white-space: nowrap; }
.campaign-consent-channel-status > i.is-on { border-color: #e8e8d6; color: #5d5e2c; background: #f8f8f0; }
.campaign-consent-channel-status > i.is-off { color: #8a918b; }
.audience-manage-member-scroll .campaign-subscriber-pagination { min-height: 42px; position: sticky; bottom: 0; z-index: 1; border-top: 1px solid #edf1ed; background: #fff; }
.audience-manage-member-scroll .campaign-loading,
.audience-manage-member-scroll .campaign-empty { min-height: 160px; }
.audience-manage-panel .audience-add-contacts { gap: 10px; padding: 2px 0 0; border: 0; background: transparent; }
.audience-manage-panel .audience-add-heading { padding: 0 0 2px; }
.audience-manage-panel .audience-add-heading h3 { font-size: max(13px,calc(13px * var(--portal-text-scale))); }
.audience-manage-panel .audience-add-heading p:not(.eyebrow) { font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-manage-panel .audience-contact-search-row .campaign-list-search { max-width: 560px; min-height: 39px; border-color: #dce6df; border-radius: 9px; background: #fff; }
.audience-manage-panel .audience-contact-search-row .campaign-list-search input { min-height: 37px; font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.audience-manage-panel .audience-contact-search-row .campaign-panel-link { min-height: 36px; }
.audience-manage-panel .audience-eligible-list { max-height: min(340px,calc(100dvh - 390px)); padding-inline: 4px; border-color: #e7ede8; border-radius: 10px; background: #fff; }
.audience-manage-panel .audience-contact-option { grid-template-columns: 16px 32px minmax(0,1fr) minmax(210px,auto); min-height: 53px; gap: 9px; padding: 6px 8px; }
.audience-manage-panel .audience-contact-copy strong { font-size: max(11px,calc(11px * var(--portal-text-scale))); }
.audience-manage-panel .audience-contact-copy small { font-size: max(9px,calc(9px * var(--portal-text-scale))); }
.audience-manage-panel .audience-contact-badges { max-width: 290px; }
.audience-manage-panel .audience-contact-badges i { font-size: max(8px,calc(8px * var(--portal-text-scale))); }
.audience-manage-panel .audience-contact-state { min-height: 112px; }
.audience-manage-panel .audience-contact-footer { padding-top: 3px; }
.audience-manage-panel .audience-contact-footer > span { font-size: max(9px,calc(9px * var(--portal-text-scale))); }
.audience-manage-locked { display: flex; align-items: center; gap: 12px; padding: 17px; border: 1px solid #e5e9e4; border-radius: 11px; color: #708077; background: #f7f8f6; }
.audience-manage-locked > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #75877b; background: #eaf0e9; }
.audience-manage-locked svg { width: 16px; height: 16px; }
.audience-manage-locked strong { color: #4c6458; font-size: max(12px,calc(12px * var(--portal-text-scale))); }
.audience-manage-locked p { margin: 3px 0 0; color: #7f8e84; font-size: max(10px,calc(10px * var(--portal-text-scale))); }
.audience-manage-settings-panel { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(280px,.9fr); align-items: start; gap: 18px; padding: 4px 2px; }
.audience-manage-settings-form { min-width: 0; }
.audience-manage-settings-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.audience-manage-settings-intro .eyebrow,
.audience-manage-availability .eyebrow { margin: 0 0 4px; color: #87998c; font-size: max(8px,calc(8px * var(--portal-text-scale))); font-weight: 760; letter-spacing: .09em; }
.audience-manage-settings-intro h3,
.audience-manage-availability h3 { margin: 0; color: #4d4e2f; font-size: max(14px,calc(14px * var(--portal-text-scale))); font-weight: 740; letter-spacing: -.015em; }
.audience-manage-settings-intro p:not(.eyebrow),
.audience-manage-availability p:not(.eyebrow) { margin: 4px 0 0; color: #7f9086; font-size: max(10px,calc(10px * var(--portal-text-scale))); line-height: 1.45; }
.audience-manage-settings-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #e2ebe3; border-radius: 10px; color: #6e6f45; background: #f7f8f3; }
.audience-manage-settings-mark svg { width: 15px; height: 15px; }
.audience-manage-settings-fields { display: grid; gap: 11px; }
.audience-manage-settings-fields textarea { min-height: 79px; }
.audience-manage-settings-actions { display: flex; justify-content: flex-end; padding-top: 12px; }
.audience-manage-settings-actions .contact-save-button { min-height: 36px; }
.audience-manage-availability { display: flex; min-height: 117px; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid #e5ece5; border-radius: 12px; background: #fafaf7; }
.audience-manage-availability > div { min-width: 0; }
.audience-manage-archive,
.audience-manage-reactivate { min-height: 34px; flex: 0 0 auto; padding: 0 10px; border: 1px solid #eadfd9; border-radius: 8px; color: #9a6256; background: #fff; font: inherit; font-size: max(10px,calc(10px * var(--portal-text-scale))); font-weight: 680; cursor: pointer; }
.audience-manage-reactivate { border-color: #e2e2ce; color: #5a5b2a; background: #f8f8f2; }
.audience-manage-archive:hover { background: #fff6f2; }
.audience-manage-reactivate:hover { background: #f5f5e9; }
.audience-manage-archive:disabled,
.audience-manage-reactivate:disabled { opacity: .55; cursor: not-allowed; }
.audience-manage-danger-zone { grid-column: 1 / -1; display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid #f0dcd7; border-radius: 12px; background: linear-gradient(120deg,#fffaf8,#fffdfc); }
.audience-manage-danger-zone > div { min-width: 0; }
.audience-manage-danger-zone .eyebrow { margin: 0 0 4px; color: #b06d60; font-size: max(8px,calc(8px * var(--portal-text-scale))); font-weight: 760; letter-spacing: .09em; }
.audience-manage-danger-zone h3 { margin: 0; color: #744e49; font-size: max(14px,calc(14px * var(--portal-text-scale))); font-weight: 740; letter-spacing: -.015em; }
.audience-manage-danger-zone p:not(.eyebrow) { max-width: 620px; margin: 4px 0 0; color: #8d716d; font-size: max(10px,calc(10px * var(--portal-text-scale))); line-height: 1.5; }
.audience-manage-danger-zone .campaign-action-danger { display: inline-flex; min-height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border: 1px solid #e8c9c2; border-radius: 8px; color: #a34f42; background: #fff; font: inherit; font-size: max(10px,calc(10px * var(--portal-text-scale))); font-weight: 700; cursor: pointer; }
.audience-manage-danger-zone .campaign-action-danger:hover:not(:disabled) { border-color: #d7aaa0; color: #903f34; background: #fff2ef; }
.audience-manage-danger-zone .campaign-action-danger:focus-visible { outline: 3px solid rgba(183,87,70,.2); outline-offset: 2px; }
.audience-manage-danger-zone .campaign-action-danger:disabled { opacity: .55; cursor: wait; }
.audience-manage-danger-zone .campaign-action-danger svg { width: 13px; height: 13px; }
.audience-manage-feedback { margin: 11px 0 0; padding: 8px 10px; border: 1px solid #eaeadb; border-radius: 8px; color: #666736; background: #f8f8f2; font-size: max(10px,calc(10px * var(--portal-text-scale))); line-height: 1.4; }
.audience-manage-feedback[hidden] { display: none; }
.audience-manage-footer { display: flex; min-height: 49px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 20px max(8px,env(safe-area-inset-bottom)); border-top: 1px solid #e8eee9; background: #fdfdfa; }
.audience-manage-footer > span { display: flex; min-width: 0; align-items: center; gap: 7px; color: #77877d; font-size: max(9px,calc(9px * var(--portal-text-scale))); }
.audience-manage-footer > span > svg { width: 14px; height: 14px; flex: 0 0 auto; color: #8e8f5d; }
.audience-manage-footer .campaign-action-secondary { min-height: 31px; flex: 0 0 auto; padding-inline: 12px; }

@media (max-width: 760px) {
  .campaign-audience-list { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 11px 12px 13px; }
  .campaign-audience-item { min-height: 82px; padding: 10px; }
  .campaign-audience-main { grid-template-columns: 34px minmax(0,1fr) auto 12px; gap: 8px; }
  .campaign-audience-mark { width: 32px; height: 32px; }
  .campaign-audience-actions button.campaign-audience-manage { min-height: 31px; padding-inline: 8px; }
  .audience-manage-dialog[open] { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .audience-manage-shell { min-height: min(350px,calc(100dvh - 20px)); max-height: calc(100dvh - 20px); }
  .audience-manage-head { grid-template-columns: minmax(0,1fr) 32px; gap: 10px 12px; padding: 15px 16px 13px; }
  .audience-manage-identity { grid-column: 1; }
  .audience-manage-summary { grid-column: 1; grid-row: 2; justify-content: flex-start; padding-left: 54px; }
  .audience-manage-head > .contact-dialog-close { grid-column: 2; grid-row: 1; }
  .audience-manage-identity h2 { font-size: max(18px,calc(18px * var(--portal-text-scale))); }
  .audience-manage-tabs { min-height: 48px; gap: 2px; padding-inline: 10px; }
  .audience-manage-tab { min-width: 0; flex: 1; gap: 6px; padding-inline: 6px; font-size: max(10px,calc(10px * var(--portal-text-scale))); }
  .audience-manage-content { padding: 12px 12px 10px; }
  .audience-manage-member-scroll { max-height: min(46dvh,calc(100dvh - 310px)); }
  .audience-manage-member-scroll .campaign-subscriber-table { min-width: 0; }
  .audience-manage-member-scroll .campaign-subscriber-head { display: none; }
  .audience-manage-member-scroll .campaign-subscriber-row { grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; padding: 10px; }
  .audience-manage-member-scroll .campaign-subscriber-person { grid-column: 1 / -1; grid-row: 1; }
  .audience-manage-member-scroll .campaign-subscriber-row > .campaign-subscriber-status:nth-of-type(1) { grid-column: 1; grid-row: 2; justify-self: start; }
  .audience-manage-member-scroll .campaign-subscriber-row > .campaign-consent-channel-status { grid-column: 1 / -1; grid-row: 3; }
  .audience-manage-member-scroll .campaign-subscriber-row > .audience-member-remove { grid-column: 2; grid-row: 2; justify-self: end; }
  .audience-manage-panel .audience-contact-option { grid-template-columns: 16px 30px minmax(0,1fr); gap: 7px; padding: 8px 5px; }
  .audience-manage-panel .audience-contact-badges { grid-column: 3; justify-content: flex-start; max-width: none; }
  .audience-manage-panel .audience-eligible-list { max-height: min(39dvh,calc(100dvh - 400px)); }
  .audience-manage-settings-panel { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .audience-manage-availability { min-height: 92px; }
  .audience-manage-danger-zone { align-items: stretch; flex-direction: column; gap: 10px; }
  .audience-manage-danger-zone .campaign-action-danger { align-self: flex-start; }
  .audience-manage-footer { min-height: 45px; padding-inline: 12px; }
}
@media (max-width: 440px) {
  .campaign-audience-item { grid-template-columns: minmax(0,1fr); gap: 7px; }
  .campaign-audience-actions { justify-content: flex-end; }
  .campaign-audience-actions button.campaign-audience-manage { min-height: 29px; }
  .audience-list-dialog[open]:not(.audience-list-dialog-wide) { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .audience-create-head { grid-template-columns: 36px minmax(0,1fr) 30px; gap: 9px; padding: 15px 14px 13px; }
  .audience-create-icon { width: 36px; height: 36px; }
  .audience-create-head h2 { font-size: max(18px,calc(18px * var(--portal-text-scale))); }
  .audience-create-fields { gap: 10px; padding: 13px 14px 9px; }
  .audience-create-actions { padding: 10px 14px 14px; }
  .audience-manage-head { padding-inline: 12px; }
  .audience-manage-identity { gap: 9px; }
  .audience-manage-icon { width: 36px; height: 36px; }
  .audience-manage-summary { padding-left: 45px; }
  .audience-manage-member-scroll .campaign-subscriber-row > .campaign-subscriber-status:nth-of-type(1) { font-size: max(9px,calc(9px * var(--portal-text-scale))); }
  .audience-manage-footer > span { font-size: 0; }
  .audience-manage-footer > span > span { display: none; }
}

/* Keep the CRM picker scannable: channel states form a compact, aligned matrix. */
.audience-manage-add-panel .audience-add-contacts { gap: 7px; }
.audience-manage-add-panel .audience-add-heading .eyebrow { display: none; }
.audience-manage-add-panel .audience-add-heading p:not(.eyebrow) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audience-manage-panel .audience-contact-option { grid-template-columns: 16px 32px minmax(0,1fr) minmax(230px,290px); min-height: 56px; }
.audience-manage-panel .audience-contact-badges { display: grid; width: 100%; grid-template-columns: repeat(2,max-content); align-content: center; justify-content: end; gap: 4px; }
.audience-manage-panel .audience-contact-badges i { padding: 3px 6px; }

@media (max-width: 760px) {
  .audience-manage-panel .audience-contact-option { grid-template-columns: 16px 30px minmax(0,1fr); min-height: 0; row-gap: 5px; }
  .audience-manage-panel .audience-contact-badges { grid-column: 3; justify-content: start; }
}

/* Billing: cycle overview, transparent estimates, and low-noise channel cards. */
.billing-ledger-toolbar { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 10px; padding-top: 3px; }
.billing-ledger-title { min-width: 0; }
.billing-ledger-export-actions { display: flex; justify-content: flex-end; gap: 7px; }
.billing-cycle-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #ededd5; border-radius: 10px; background: #fbfbf1; }
.billing-cycle-switch button { min-height: 32px; padding: 0 11px; border: 1px solid transparent; border-radius: 7px; color: #888961; background: transparent; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; transition: color .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease; }
.billing-cycle-switch button[aria-pressed="true"] { border-color: #e4e4d6; color: #3d3d12; background: #fff; box-shadow: 0 1px 3px #34351212; }
.billing-cycle-switch button:hover:not([aria-pressed="true"]) { color: #4f4d1f; }
.billing-ledger-export-actions > .campaign-panel-link { display: inline-flex; min-height: 38px; align-items: center; gap: 6px; }
.billing-ledger-export-actions > .campaign-panel-link svg { width: 14px; height: 14px; }
.billing-ledger-export-actions .billing-statement-action { border-color: #42430a; color: #fff; background: #42430a; }
.billing-ledger-export-actions .billing-statement-action:hover:not(:disabled) { border-color: #333307; background: #333307; }
.billing-refresh-action { display: inline-flex; min-height: 38px; align-items: center; justify-self: start; gap: 7px; padding: 0 11px; border: 1px solid #e4e5d8; border-radius: 9px; color: #66673f; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.billing-refresh-action:hover:not(:disabled) { border-color: #d3d49c; color: #5b5d0d; background: #fafbf2; }
.billing-ledger-toolbar button:disabled { opacity: .48; cursor: not-allowed; }
.billing-ledger { margin-bottom: 13px; overflow: hidden; border: 1px solid #ecedde; border-radius: 14px; background: #fff; box-shadow: 0 4px 16px #3d3c1308; }
.billing-ledger-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(350px,44%); align-items: center; gap: 24px; padding: 20px 21px 17px; }
.billing-ledger-head > div:first-child { min-width: 0; }
.billing-ledger-head .billing-card-eyebrow { color: #838545; }
.billing-ledger-head h1 { margin: 0; color: #3e3e1b; font-size: calc(20px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.04em; line-height: 1.2; }
.billing-ledger-head > div:first-child > p:last-child { margin: 6px 0 0; color: #919274; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.billing-payment-method { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; margin: 12px 0 0; padding: 11px 13px; border: 1px solid #eae9d4; border-radius: 11px; background: #fbfbf5; }
.billing-payment-badge { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #fff; background: #46450a; font-size: 8px; font-weight: 820; letter-spacing: .06em; }
.billing-payment-copy { display: grid; min-width: 0; gap: 2px; }
.billing-payment-copy > span { color: #8b8c67; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .08em; }
.billing-payment-copy > strong { color: #484920; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.billing-payment-copy > small { color: #939378; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-payment-copy > code { color: #4d4e17; font-family: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; overflow-wrap: anywhere; }
.billing-pix-copy { min-height: 36px; padding: 0 12px; border: 1px solid #e1e1c6; border-radius: 8px; color: #51511e; background: #fff; font: inherit; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.billing-pix-copy:hover { border-color: #cecea0; color: #63620a; background: #fdfdf9; }
.billing-pix-copy:focus-visible { outline: 2px solid rgba(106, 107, 25, .28); outline-offset: 2px; }
.billing-pix-copy.is-copied { border-color: #bedfd0; color: #26724c; background: #f2faf5; }
.billing-ledger-summary { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); min-width: 0; overflow: hidden; border: 1px solid #f0f0d9; border-radius: 11px; background: #fbfcf3; }
.billing-ledger-period { display: grid; align-content: center; gap: 5px; min-width: 0; padding: 11px 13px; }
.billing-ledger-period > span, .billing-ledger-total > span { color: #7f8157; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.billing-ledger-period strong { color: #47481c; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; font-variant-numeric: tabular-nums; letter-spacing: -.025em; line-height: 1.25; white-space: nowrap; }
.billing-ledger-period small { color: #919372; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; }
.billing-ledger-total { display: grid; align-content: center; gap: 4px; min-width: 0; padding: 11px 13px; border-left: 1px solid #f0f0d9; }
.billing-ledger-total strong { color: #3e4012; font-size: calc(23px * var(--portal-text-scale)); font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.15; }
.billing-ledger-total small { color: #919372; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.35; }
.billing-ledger-table-wrap { overflow-x: auto; border-top: 1px solid #f2f2e8; }
.billing-ledger-table { width: 100%; min-width: 840px; border-collapse: collapse; table-layout: fixed; text-align: left; }
.billing-ledger-table tr > :nth-child(1) { width: 32%; }
.billing-ledger-table tr > :nth-child(2) { width: 20%; }
.billing-ledger-table tr > :nth-child(3) { width: 28%; }
.billing-ledger-table tr > :nth-child(4) { width: 20%; }
.billing-ledger-table thead { background: #fafbf6; }
.billing-ledger-table th, .billing-ledger-table td { padding: 11px 14px; border-bottom: 1px solid #f4f4ed; color: #757751; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 520; line-height: 1.45; vertical-align: middle; }
.billing-ledger-table thead th { color: #959573; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.billing-ledger-table thead th:last-child { text-align: right; }
.billing-ledger-table tbody tr:last-child th, .billing-ledger-table tbody tr:last-child td { border-bottom: 0; }
.billing-ledger-table tbody th { min-width: 0; text-align: left; }
.billing-ledger-service { display: flex; align-items: center; gap: 7px; color: #4c4d28; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; }
.billing-ledger-table tbody th > small { display: block; margin: 3px 0 0 13px; color: #a0a087; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 450; white-space: nowrap; }
.billing-ledger-table tbody td:nth-child(2), .billing-ledger-table tbody td:nth-child(3) { white-space: nowrap; }
.billing-ledger-amount { color: #45451d !important; font-weight: 740 !important; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.billing-ledger-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #b8b8a6; }
.billing-ledger-dot.is-green { background: #4b9c6c; }
.billing-ledger-dot.is-muted { background: #b8b8a6; }
.billing-ledger-dot.is-reference { background: #716e1a; }
.billing-rate-link { display: inline; padding: 0; border: 0; color: #696610; background: transparent; font: inherit; font-weight: 700; text-align: left; text-decoration: underline; text-decoration-color: #dad89a; text-underline-offset: 3px; cursor: pointer; }
.billing-rate-link:hover { color: #535409; text-decoration-color: currentColor; }
.billing-rate-link:focus-visible { border-radius: 3px; outline: 2px solid #969132; outline-offset: 3px; }
.contact-dialog.billing-meta-dialog[open] { width: min(620px,calc(100vw - 24px)); height: fit-content; min-height: 0; max-height: min(620px,calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)))); overflow-x: hidden; overflow-y: auto; }
.billing-meta-dialog-content { padding: 17px; }
.billing-meta-dialog .contact-dialog-head { padding-bottom: 12px; }
.billing-meta-rate-markets { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 8px; padding-top: 12px; }
.billing-meta-market-card { min-width: 0; padding: 10px 11px 7px; border: 1px solid #f0f0e2; border-radius: 10px; background: #fefefb; }
.billing-meta-market-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 7px; border-bottom: 1px solid #f3f3e8; }
.billing-meta-market-card > header strong { min-width: 0; overflow: hidden; color: #50502a; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.billing-meta-market-card > header span { flex: 0 0 auto; color: #99997a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.billing-meta-market-card dl { margin: 4px 0 0; }
.billing-meta-market-card dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 1px; border-bottom: 1px solid #f4f4ed; }
.billing-meta-market-card dl > div:last-child { border-bottom: 0; }
.billing-meta-market-card dt { color: #838460; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-meta-market-card dd { margin: 0; color: #494a1f; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; font-variant-numeric: tabular-nums; }
.contact-dialog.billing-log-dialog[open] { width: min(940px,calc(100vw - 24px)); height: fit-content; min-height: 0; max-height: min(720px,calc(100dvh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom)))); overflow: hidden; }
.billing-log-content { display: flex; flex-direction: column; gap: 12px; max-height: inherit; padding: 17px; box-sizing: border-box; }
.billing-log-dialog .contact-dialog-head { padding-bottom: 0; }
.billing-log-dialog .contact-dialog-head p strong { color: #4d4e17; font-weight: 740; }
.billing-log-dialog[aria-busy="true"] .billing-log-table-wrap { opacity: .55; transition: opacity .15s; }
.billing-log-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid #f0f0e2; border-radius: 10px; overscroll-behavior: contain; }
.billing-log-table { width: 100%; min-width: 640px; border-collapse: collapse; table-layout: fixed; }
.billing-log-table thead th { position: sticky; top: 0; z-index: 1; padding: 9px 12px; background: #fafbf6; color: #959573; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.billing-log-table td { padding: 9px 12px; border-top: 1px solid #f4f4ed; color: #757751; font-size: calc((9.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; white-space: nowrap; }
.billing-log-table tr > :nth-child(1) { width: 92px; }
.billing-log-table tr > :nth-child(2) { width: 150px; }
.billing-log-table.is-email tr > :nth-child(3) { width: 220px; }
.billing-log-table.is-email tr > :nth-child(5) { width: 70px; }
.billing-log-table.is-sms tr > :nth-child(3) { width: 130px; }
.billing-log-table.is-sms tr > :nth-child(5) { width: 50px; }
.billing-log-table.is-sms tr > :nth-child(6) { width: 110px; }
.billing-log-table time { color: #3e3c24; font-variant-numeric: tabular-nums; font-weight: 640; }
.billing-log-text { overflow: hidden; text-overflow: ellipsis; }
.billing-log-text small { color: #959573; font-weight: 700; }
.billing-log-mono, .billing-log-count { font-variant-numeric: tabular-nums; }
.billing-log-table .billing-log-count, .billing-log-table thead th.billing-log-count { text-align: right; }
.billing-log-table.is-email thead th:last-child, .billing-log-table.is-sms thead th:nth-child(5) { text-align: right; }
.billing-log-muted { color: #afaf93; }
.billing-log-status { display: inline-block; padding: 2px 8px; border-radius: 999px; color: #757751; background: #f6f6ee; font-weight: 700; }
.billing-log-status.is-delivered, .billing-log-status.is-read { color: #1d6b4a; background: #e5f5ec; }
.billing-log-status.is-failed { color: #9a3b32; background: #fbecea; }
.billing-log-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; color: #898965; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-variant-numeric: tabular-nums; }
.billing-log-pager > div { display: flex; align-items: center; gap: 8px; }
.billing-log-pager .contact-cancel-button { min-width: 86px; }
.billing-log-pager .contact-cancel-button:disabled { opacity: .45; cursor: default; }
.billing-meta-rates-empty { grid-column: 1/-1; margin: 0; padding: 15px; border: 1px solid #f0f0e2; border-radius: 10px; color: #898965; background: #fefefb; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-meta-note { display: grid; gap: 3px; margin: 10px 0 0; padding: 9px 11px; border: 1px solid #f0f0d9; border-radius: 9px; color: #838460; background: #fbfcf3; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.billing-meta-note strong { color: #57582d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-rate-rule { white-space: nowrap; }
.billing-price-list { margin: 12px 0 0; }
.billing-price-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid #f4f4ed; }
.billing-price-list > div:last-child { border-bottom: 0; }
.billing-price-list > div.is-current { margin: 0 -6px; padding: 8px 8px; border-radius: 8px; background: #fafbed; }
.billing-price-list dt { color: #727348; }
.billing-price-list dd { margin: 0; color: #494a1f; font-weight: 700; font-variant-numeric: tabular-nums; }
.billing-meta-dialog-actions { display: flex; justify-content: flex-end; padding-top: 10px; }
.billing-meta-dialog-actions .contact-cancel-button { min-width: 86px; }
.billing-statement-preview { width: min(1240px,calc(100vw - 24px)); height: min(920px,calc(100dvh - 24px)); max-width: none; max-height: none; overflow: hidden; padding: 0; border: 1px solid #eaeadb; border-radius: 15px; color: #4e4f2c; background: #fff; box-shadow: 0 28px 90px rgba(28, 28, 4,.3); }
.billing-statement-preview::backdrop { background: rgba(25, 26, 5,.56); backdrop-filter: blur(3px); }
.billing-statement-preview-shell { display: grid; width: 100%; height: 100%; min-height: 0; grid-template-rows: auto minmax(0,1fr); }
.billing-statement-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px 11px 17px; border-bottom: 1px solid #efeee6; background: #fff; }
.billing-statement-preview-head .eyebrow { margin-bottom: 3px; color: #89894a; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-statement-preview-head h2 { margin: 0; color: #414222; font-size: calc(17px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.billing-statement-preview-head p:not(.eyebrow) { margin: 3px 0 0; color: #939378; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.billing-statement-preview-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.billing-statement-preview-actions .contact-create-button { display: inline-flex; min-height: 37px; align-items: center; gap: 7px; padding-inline: 11px; }
.billing-statement-preview-actions .contact-create-button svg { width: 14px; height: 14px; }
.billing-statement-preview iframe { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #f5f6ed; }
.billing-ledger-foot { padding: 10px 13px; border-top: 1px solid #f4f4ed; color: #949575; background: #fdfdfb; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.billing-card-eyebrow { margin: 0 0 6px; color: #b0ad91; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 820; letter-spacing: .14em; line-height: 1.4; }
.billing-detail-disclosure { min-width: 0; margin-top: 12px; overflow: hidden; border: 1px solid #ecedde; border-radius: 12px; background: #fff; }
.billing-detail-disclosure > summary { display: flex; min-height: 45px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; color: #585931; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; list-style: none; cursor: pointer; }
.billing-detail-disclosure > summary::-webkit-details-marker { display: none; }
.billing-detail-disclosure > summary::after { width: 7px; height: 7px; flex: 0 0 auto; border-right: 1.5px solid #97986e; border-bottom: 1.5px solid #97986e; content: ''; transform: rotate(45deg); transition: transform .16s ease; }
.billing-detail-disclosure[open] > summary::after { transform: rotate(225deg); }
.billing-detail-disclosure > summary span:last-child { margin-left: auto; color: #919271; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 600; }
.billing-detail-disclosure .usage-table-wrap { width: auto; min-width: 0; margin: 0 12px 10px; overflow-x: auto; }
.billing-detail-disclosure .usage-table { min-width: 640px; }
.billing-detail-disclosure .usage-table th, .billing-detail-disclosure .usage-table td { white-space: normal; }
.billing-detail-disclosure .usage-table tbody th { background: transparent; }
.billing-detail-empty { margin: 0; padding: 12px 14px; color: #929370; font-size: 9px; }
.billing-detail-foot { margin: 0; padding: 2px 14px 11px; color: #919274; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.billing-report-footer { display: flex; justify-content: space-between; gap: 14px; padding: 12px 1px 3px; color: #919274; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-report-footer span:last-child { text-align: right; }
.usage-admin-panel [data-usage-sms="rateMode"] { min-height: 37px; padding: 0 9px; border: 1px solid #d9e3dd; border-radius: 8px; color: #505135; background: #fff; font: inherit; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

@media (max-width: 760px) {
  .billing-ledger-head { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 15px 14px 13px; }
  .billing-payment-method { grid-template-columns: 32px minmax(0,1fr); gap: 8px 10px; padding: 10px; }
  .billing-payment-badge { width: 32px; height: 32px; border-radius: 9px; }
  .billing-pix-copy { grid-column: 2; justify-self: start; }
  .billing-ledger-head h1 { font-size: calc(18px * var(--portal-text-scale)); }
  .billing-ledger-toolbar { grid-template-columns: minmax(0,1fr); justify-items: stretch; gap: 6px; }
  .billing-refresh-action { justify-self: start; }
  .billing-cycle-switch { justify-self: center; }
  .billing-ledger-export-actions { justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .billing-ledger-summary { grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); }
  .billing-ledger-period { padding: 9px 11px; }
  .billing-ledger-total { grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px; padding: 9px 11px; }
  .billing-ledger-total > span { grid-column: 1; }
  .billing-ledger-total strong { grid-column: 1; grid-row: 2; font-size: calc(21px * var(--portal-text-scale)); }
  .billing-ledger-total small { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .billing-report-footer { flex-direction: column; gap: 4px; }
  .billing-report-footer span:last-child { text-align: left; }
}
@media (max-width: 560px) {
  .billing-ledger-toolbar { gap: 8px; }
  .billing-cycle-switch button { flex: 1; }
  .billing-ledger-export-actions > .campaign-panel-link { justify-content: center; padding-inline: 8px; }
  .billing-detail-disclosure > summary { min-height: 42px; padding-inline: 11px; }
  .billing-report-footer { padding-top: 10px; }
}
@media (max-width: 760px) {
  .billing-statement-preview-head { align-items: flex-start; flex-wrap: wrap; gap: 9px; padding: 11px 12px; }
  .billing-statement-preview-actions { width: 100%; justify-content: space-between; }
}
@media (max-width: 440px) {
  .billing-ledger-summary { grid-template-columns: minmax(0,1fr); }
  .billing-ledger-period { padding: 9px 11px; border-bottom: 1px solid #f0f0d9; }
  .billing-ledger-total { border-left: 0; }
  .billing-meta-dialog-content { padding: 15px; }
  .billing-log-content { padding: 13px; }
  .contact-dialog.billing-log-dialog[open] { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); }
  .billing-meta-rate-markets { grid-template-columns: minmax(0,1fr); }
  .billing-statement-preview { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 11px; }
  .billing-statement-preview-head { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px; }
  .billing-statement-preview-actions { width: 100%; justify-content: space-between; }
}

/* Keep green for positive system, delivery, and completion states. */
.admin-settings-feedback.is-good { color: #347659 !important; }
.status-light.is-good { background: #43c594; box-shadow: 0 0 0 3px rgba(67,197,148,.12); }
.system-state.is-online,
.app-status:not(.is-offline) { color: #268267; }
.source-badge-green { border-color: #dceddf; color: #438168; background: #f3f8f1; }
.consent-pill.is-good { border-color: #d5eade; color: #347b5c; background: #f1f8f2; }
.contact-consent-channel.is-active { border-color: #d5eade; background: #f1f8f2; }
.contact-consent-channel.is-active i,
.campaign-consent-channel-status i.is-on { color: #347b5c; }
.conversation-channel-banner.is-connected { border-color: #d9e9df; background: #f5faf6; }
.conversation-row-bot-state { border-color: #d5e7df !important; color: #347660; background: #eff8f3; }
.conversation-status-pill:not(.is-resolved) { border-color: #dcebe2; color: #3b8062; background: #f3f9f3; }
.intelligence-status.is-published,
.intelligence-status.is-active { border-color: #d5eade; color: #347b5c; background: #f1f8f2; }
.campaign-service-chip.is-good { border-color: #d4e9dc; color: #38785b; background: #f5faf5; }
.campaign-service-chip.is-good i { background: #47a475; box-shadow: 0 0 0 3px #e8f4eb; }
.campaign-status.is-good { border-color: #d6eade; color: #347651; background: #f1f8f2; }
.campaign-subscriber-status.is-confirmed { border-color: #d7eadd; color: #397652; background: #f1f8f2; }
.automation-integrations i.is-ready { background: #28a274; box-shadow: 0 0 0 3px #e3f3eb; }
.automation-notice.is-good { border-color: #d5e8db; }
.automation-state.is-live { border-color: #d9eade; background: #f5faf5; }
.automation-state.is-live strong { color: #3d7658; }
.automation-card-status.is-active { border-color: #d8eadd; color: #3f7c59; background: #f0f8f2; }
.contact-import-file-ready { border-color: #dce8e1; }
.broadcast-whatsapp-panel.is-connected { border-color: #d9e9df; background: #f5faf6; }
.broadcast-whatsapp-panel.is-connected .broadcast-whatsapp-status { color: #39835f; }
.dispatch-channel-state.is-ready { border-color: #d6eade; color: #397d5b; background: #f2f8f2; }
.broadcast-review-check { color: #27755d; background: #e1f1e4; }
.staff-admin-message.is-good { border-color: #d9e8dd; color: #347659; background: #f2f8f3; }
.admin-mail-state.is-ready { border-color: #dce9e2; color: #277353; background: #eef7f0; }
.admin-mail-service-dot.is-ready { background: #3e9a72; box-shadow: 0 0 0 3px #e8f4ec; }
.admin-mail-feedback.is-good { color: #347659; }
.handoff-integration-state.is-ready > span { background: #45a275; box-shadow: 0 0 0 3px #edf7f0; }
.dashboard-queue-summary.is-good { border-color: #dcebe1; background: #f4faf5; }
.dashboard-channel-chip.is-good { border-color: #d8eade; color: #327a5d; background: #f1f8f2; }
.audience-manage-status:not(.is-archived) { border-color: #d8e8dc; color: #367350; background: #eff7ef; }
.audience-manage-status:not(.is-archived) > i { background: #53a36d; }
.contact-feedback { border-color: #d7e9df; color: #347b5c; background: #f1f8f2; }
.campaign-metric.is-green > strong { color: #217752; }
.campaign-editor-feedback.is-success { color: #3d7953; background: #edf7ec; }
.campaign-action-feedback.is-success { color: #3d7953; background: #eaf5e8; }
.contact-import-status:not(.is-update):not(.is-skip):not(.is-error) { color: #346e54; background: #edf6ee; }
.contact-import-result:not(.is-error) { border-color: #dcece0; color: #347b5c; background: #f1f8f2; }
.contact-import-notice { color: #347b5c; }
.staff-account-state:not(.is-disabled):not(.is-pending):not(.is-orphan) { border-color: #d9eadf; color: #347653; background: #edf7ef; }
.broadcast-composer-progress button.is-complete span { border-color: #a8d0bd; color: #553518; background: #edf7ef; }
.broadcast-page-message { border-color: #d6e9dc; color: #2d7158; background: #eef8f0; }
.campaign-audience-status:not(.is-archived) { border-color: #d8eade; color: #367454; background: #f1f8f1; }
.audience-management-feedback { border-color: #d9e8dd; color: #367253; background: #f2f8f3; }
.audience-flow-progress .is-current { color: #28694d; }
.audience-flow-progress .is-current i,
.audience-flow-progress .is-done i { border-color: #c4dfcb; color: #28694d; background: #edf7ee; }
.audience-editor-notice:not(.is-error) { border-color: #d7e9da; color: #387151; background: #f2f8f1; }
.audience-manage-feedback { border-color: #dceade; color: #3e7656; background: #f2f8f2; }
.campaign-consent-channel-status > i.is-on { border-color: #d7e9d9; color: #36724d; background: #f0f8f0; }
.dashboard-outcome-track rect.is-success { fill: #4ba780; }
.dashboard-knowledge-notice:not(.is-attention):not(.is-partial) { border-color: #dceae1; color: #315f50; background: #f4faf4; }
.dashboard-queue-summary.is-good .dashboard-queue-summary-icon { color: #2e8166; background: #e4f2e8; }

/* Keep the requested messaging and automation card surfaces clean white. */
.broadcast-view-panel#broadcastDispatchesPanel .dispatch-channel-card,
.broadcast-view-panel#broadcastDispatchesPanel .broadcast-history-panel,
.broadcast-view-panel#broadcastDispatchesPanel .dispatch-channel-card.is-unavailable,
.broadcast-view-panel#broadcastAudiencesPanel > .campaign-audience-panel,
.broadcast-view-panel#broadcastAudiencesPanel .campaign-audience-toolbar { background: #fff; }
.automation-workspace { background: #fff; }
.automation-workspace .automation-card,
.automation-workspace .automation-create-card,
.automation-workspace .automation-module-card,
.automation-workspace .automation-module-card.is-unavailable,
.automation-workspace .automation-empty,
.automation-workspace .automation-run-row { background: #fff; }
.automation-workspace .automation-create-card:hover { background: #fff; }

.broadcast-settings-grid.broadcast-whatsapp-first-row { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) minmax(0,1fr); }
.template-list-entry { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr) auto; align-items: stretch; gap: 4px; }
.template-list-entry .template-list-item { min-width: 0; }
.template-list-delete { align-self: stretch; padding: 0 8px; border: 1px solid #ebd9d4; border-radius: 7px; color: #99594d; background: #fff; font: inherit; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; white-space: nowrap; cursor: pointer; }
.template-list-delete:hover:not(:disabled) { border-color: #d8b4ab; color: #87463b; background: #fff5f2; }
.template-list-delete:focus-visible { outline: 3px solid #efd6d0; outline-offset: 1px; }
.template-list-delete:disabled { border-color: transparent; color: #a5ada8; background: transparent; cursor: not-allowed; }
@media (max-width: 760px) {
  .broadcast-settings-grid.broadcast-whatsapp-first-row { grid-template-columns: minmax(0,1fr); }
}

/* One slim scrollbar in the tenant's colour, on the page and on every scroll region. Chrome drops
   the ::-webkit-scrollbar rules for any element that sets scrollbar-width or scrollbar-color, so
   those two stay in the fallback for browsers without the pseudo-elements. */
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: var(--brand-blue); background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--brand-blue-hover); border-width: 1px; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; background: transparent; }
*::-webkit-scrollbar-corner { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.34); }
.sidebar-menu::-webkit-scrollbar-thumb:hover { background-color: #fff; }
@supports not selector(::-webkit-scrollbar) {
  *, *::before, *::after { scrollbar-width: thin; scrollbar-color: var(--brand-blue) transparent; }
  .sidebar-menu { scrollbar-color: rgba(255,255,255,.34) transparent; }
}

/* Keep the page scrollbar present behind dialogs, but let the modal own focus. */
html:has(dialog[open])::-webkit-scrollbar-thumb, body:has(dialog[open])::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,.34); }

.admin-billing-layout { display: grid; gap: 14px; }
.billing-statement-schedule-panel { gap: 16px; }
.billing-statement-schedule-panel .admin-settings-heading { align-items: center; }
.billing-statement-schedule-panel .admin-settings-heading h2 { font-size: calc(20px * var(--portal-text-scale)); }
.billing-statement-state { display: inline-flex; min-height: 28px; align-items: center; padding: 5px 10px; border: 1px solid #e2e8e5; border-radius: 999px; color: #74827d; background: #f4f6f4; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; white-space: nowrap; }
.billing-statement-state.is-on { border-color: #e4e0cd; color: #5b5911; background: #f8f6ed; }
.billing-statement-fields { grid-template-columns: minmax(220px,1.5fr) minmax(105px,.55fr) minmax(155px,.75fr); align-items: start; }
.billing-statement-fields .billing-statement-enabled { display: flex; min-height: 42px; grid-column: 1 / -1; align-items: flex-start; padding: 11px 12px; border-color: #e2eae6; background: #f8faf9; }
.billing-statement-enabled > input { width: 17px; height: 17px; min-height: 0; flex: 0 0 auto; margin: 1px 0 0; accent-color: #6f6906; }
.billing-statement-enabled > span { display: grid; gap: 4px; }
.billing-statement-enabled > span strong { color: #555532; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-statement-enabled > span small { color: #8d857c; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; }
.billing-statement-activity { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.billing-statement-activity > p { display: grid; gap: 5px; margin: 0; padding: 12px 14px; border: 1px solid #e4ebe8; border-radius: 10px; background: #f8faf9; }
.billing-statement-activity > p strong, .billing-statement-test-form > div > strong { color: #616041; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.billing-statement-activity > p span, .billing-statement-test-form > div > p { margin: 0; color: #877e75; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.billing-statement-test-form { display: grid; grid-template-columns: minmax(200px,1fr) minmax(220px,.8fr) auto; align-items: end; gap: 10px 14px; padding-top: 14px; border-top: 1px solid #e5ece7; }
.billing-statement-test-form > div { display: grid; align-content: center; gap: 5px; min-height: 42px; }
.billing-statement-test-form > label { display: grid; gap: 6px; color: #6b6052; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 660; }
.billing-statement-test-form > label input { width: 100%; min-width: 0; min-height: 41px; padding: 9px 11px; border: 1px solid #d9e3dd; border-radius: 9px; color: #404026; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.billing-statement-test-form > label input:focus { border-color: #909250; outline: 3px solid rgba(94, 95, 29,.13); }
.billing-statement-test-form > button { min-height: 41px; white-space: nowrap; }
.billing-statement-test-form .billing-statement-test-status { grid-column: 1 / -1; margin: 0; color: #827971; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.billing-statement-schedule-panel [data-billing-statement-test-cancel] { justify-self: start; }
.billing-statement-schedule-panel button:disabled { opacity: .65; cursor: wait; }

.broadcast-detail-dialog { width: min(940px,calc(100vw - 36px)); max-width: 940px; max-height: min(900px,calc(100dvh - 36px)); padding: 0; overflow: auto; border: 1px solid #d9e4df; border-radius: 17px; color: #515030; background: #f7f9f7; box-shadow: 0 28px 90px rgba(30, 31, 5,.28); }
.broadcast-detail-dialog::backdrop { background: rgba(26, 27, 5,.54); backdrop-filter: blur(4px); }
.broadcast-detail-shell { display: grid; gap: 0; min-width: 0; }
.broadcast-detail-loading { display: flex; min-height: 220px; align-items: center; justify-content: center; gap: 11px; padding: 28px; color: #837a71; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-detail-header { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 22px; border-bottom: 1px solid #e3ebe6; background: #fff; }
.broadcast-detail-heading { display: flex; min-width: 0; align-items: center; gap: 13px; }
.broadcast-detail-heading > div { display: grid; min-width: 0; gap: 4px; }
.broadcast-detail-heading .eyebrow, .broadcast-detail-section .eyebrow { margin: 0; color: #84948e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .13em; }
.broadcast-detail-heading h2 { overflow: hidden; margin: 0; color: #4c4c2b; font-size: calc(20px * var(--portal-text-scale)); font-weight: 760; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-detail-subtitle { display: flex; align-items: center; gap: 6px; color: #82918d; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-detail-status-row { display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 8px 22px; border-bottom: 1px solid #e7eeea; background: #fff; }
.broadcast-detail-status-row > span:last-child { overflow: hidden; margin-left: auto; color: #7d7368; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.broadcast-detail-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(112px,1fr)); gap: 9px; padding: 14px 20px 10px; }
.broadcast-detail-metric { display: grid; min-height: 66px; align-content: center; gap: 4px; padding: 10px 13px; border: 1px solid #e1e9e4; border-radius: 10px; background: #fff; }
.broadcast-detail-metric strong { color: #59582d; font-size: calc(17px * var(--portal-text-scale)); font-weight: 770; letter-spacing: -.035em; line-height: 1; }
.broadcast-detail-metric span { color: #82918d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.broadcast-detail-result-note { margin: 0 20px 12px; color: #81908b; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-align: right; }
.broadcast-detail-columns { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(250px,.88fr); align-items: start; gap: 11px; padding: 0 20px 17px; }
.broadcast-detail-section { min-width: 0; overflow: hidden; border: 1px solid #e0e8e3; border-radius: 11px; background: #fff; }
.broadcast-detail-section > header { display: flex; min-height: 60px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid #edf1ee; }
.broadcast-detail-section > header > div { display: grid; min-width: 0; gap: 4px; }
.broadcast-detail-section h3 { overflow: hidden; margin: 0; color: #585738; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-detail-section > header small { color: #84938f; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-detail-email-subject { display: grid; gap: 4px; padding: 10px 13px; border-bottom: 1px solid #edf1ee; }
.broadcast-detail-email-subject span, .broadcast-detail-message-bubble > span { color: #82928d; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 780; letter-spacing: .1em; }
.broadcast-detail-email-subject strong { color: #60613e; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); overflow-wrap: anywhere; }
.broadcast-detail-email-frame { display: block; width: 100%; height: 390px; border: 0; background: #f2f5f3; }
.broadcast-detail-message-bubble { margin: 13px; padding: 13px; border: 1px solid #e2e9e5; border-radius: 10px 10px 10px 3px; background: #f6f9f7; }
.broadcast-detail-message-bubble p { margin: 8px 0 0; color: #5c5a3c; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.broadcast-detail-recipient-list { max-height: 385px; overflow-y: auto; padding: 2px 13px 8px; }
.broadcast-detail-recipient { display: flex; min-height: 47px; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef2ef; }
.broadcast-detail-recipient:last-child { border-bottom: 0; }
.broadcast-detail-recipient > span { display: grid; min-width: 0; gap: 3px; }
.broadcast-detail-recipient strong { overflow: hidden; color: #5f5e3f; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 710; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-detail-recipient small { overflow: hidden; color: #918a84; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.broadcast-detail-recipient-signals { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.broadcast-detail-recipient-signals em { max-width: 100%; padding: 3px 6px; border-radius: 99px; color: #7d7368; background: #f0f4f1; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; font-weight: 690; line-height: 1.25; overflow-wrap: anywhere; }
.broadcast-detail-recipient-signals em.is-good { color: #47755d; background: #eaf4ed; }
.broadcast-detail-recipient-signals em.is-error { color: #99574f; background: #fff0ec; }
.broadcast-detail-recipient-events { min-width: 0; margin-top: 3px; color: #5f746e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-detail-recipient-events summary { width: fit-content; color: #716352; cursor: pointer; font-weight: 700; }
.broadcast-detail-recipient-events > div { display: grid; gap: 6px; margin-top: 6px; padding: 7px 8px; border-radius: 7px; background: #f6f8f6; }
.broadcast-detail-recipient-events p { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; margin: 0; color: #786d64; line-height: 1.4; }
.broadcast-detail-recipient-events p strong { color: #62594b; font-size: inherit; white-space: normal; }
.broadcast-detail-recipient-events time { color: #918a84; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-detail-recipient-events p small, .broadcast-detail-recipient-events-note { grid-column: 1 / -1; overflow-wrap: anywhere; color: #778780; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.4; white-space: normal; }
.broadcast-detail-recipient-events-note { display: block; }
.broadcast-detail-recipient-pagination { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 12px 9px; border-top: 1px solid #edf1ee; }
.broadcast-detail-recipient-pagination span { color: #71837e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.broadcast-detail-recipient-pagination button { min-height: 29px; padding: 0 9px; border: 1px solid #dfe8e2; border-radius: 7px; color: #615d39; background: #fff; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.broadcast-detail-recipient-pagination button:hover:not(:disabled) { border-color: #b8d3c7; background: #f3f8f5; }
.broadcast-detail-recipient-pagination button:disabled { color: #a3b0ab; background: #f7f9f7; cursor: default; }
.broadcast-detail-recipient-note { margin: 0; padding: 0 12px 10px; color: #83918c; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.broadcast-detail-recipient-empty { display: grid; min-height: 116px; align-content: center; padding: 16px; color: #81908b; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; text-align: center; }
.broadcast-detail-error, .broadcast-detail-error-state { margin: 0 20px 13px; padding: 9px 11px; border-radius: 8px; color: #96574d; background: #fff1eb; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-sms-events { margin: 0 20px 17px; }
.broadcast-sms-event-list { max-height: 360px; overflow-y: auto; padding: 4px 13px 8px; }
.broadcast-sms-event { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid #eef2ef; }
.broadcast-sms-event:last-child { border-bottom: 0; }
.broadcast-sms-event-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: #6e6f4b; background: #eef4f1; font-size: 8px; font-weight: 800; }
.broadcast-sms-event-mark.reply { color: #7c5b88; background: #f4eef7; }
.broadcast-sms-event-mark.click { color: #696733; background: #f8f7e9; }
.broadcast-sms-event > div { display: grid; min-width: 0; gap: 3px; }
.broadcast-sms-event strong { color: #5f5e3f; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-sms-event small { color: #918a84; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-sms-event p { margin: 2px 0 0; color: #706e53; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; overflow-wrap: anywhere; }
.broadcast-detail-error-state { margin: 18px 22px; }
.broadcast-detail-footer { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid #e2eae5; background: #fff; }
.broadcast-detail-footer > span { color: #7d8d88; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.broadcast-detail-footer > div { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.broadcast-detail-footer button { min-height: 34px; padding: 0 11px; border-radius: 8px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.broadcast-detail-footer .campaign-action-primary { border-color: #5a5c12; color: #fff; background: #5a5c12; }
.broadcast-detail-footer .campaign-action-primary:hover:not(:disabled) { background: #4e500e; }
.broadcast-detail-footer button:disabled { opacity: .58; cursor: wait; }
.broadcast-detail-dialog button:focus-visible { outline: 3px solid rgba(127, 129, 41,.3); outline-offset: 2px; }
@media (max-width: 760px) {
  .billing-statement-schedule-panel .admin-settings-heading { align-items: flex-start; flex-direction: column; }
  .billing-statement-fields, .billing-statement-activity, .billing-statement-test-form { grid-template-columns: minmax(0,1fr); }
  .billing-statement-test-form > button { width: 100%; }
  .billing-statement-test-form .billing-statement-test-status { grid-column: auto; }
  .broadcast-detail-dialog { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); border-radius: 13px; }
  .broadcast-detail-header { min-height: 73px; padding: 12px 14px; }
  .broadcast-detail-heading { gap: 9px; }
  .broadcast-detail-heading h2 { font-size: calc(16px * var(--portal-text-scale)); }
  .broadcast-detail-status-row { flex-wrap: wrap; gap: 7px; padding: 8px 14px; }
  .broadcast-detail-status-row > span:last-child { width: 100%; margin-left: 0; }
  .broadcast-detail-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding: 11px 12px 8px; }
  .broadcast-detail-metric { min-height: 57px; padding: 8px 10px; }
  .broadcast-detail-columns { grid-template-columns: minmax(0,1fr); gap: 9px; padding: 0 12px 12px; }
  .broadcast-detail-email-frame { height: 300px; }
  .broadcast-detail-recipient-list { max-height: 230px; }
  .broadcast-detail-result-note { margin-inline: 12px; }
  .broadcast-sms-events { margin-inline: 12px; }
  .broadcast-detail-footer { align-items: stretch; flex-direction: column; padding: 11px 12px; }
  .broadcast-detail-footer > span { text-align: center; }
  .broadcast-detail-footer > div { display: grid; grid-template-columns: minmax(72px,.7fr) minmax(0,1.3fr); }
  .broadcast-detail-footer button { min-width: 0; padding-inline: 8px; }
}

/* ==========================================================================
   Admin refresh: one compact, brand-styled layer for #admin and #configuracoes.
   Everything is scoped under .adm so the rest of the portal is untouched.
   Text sizes follow the personal text scale through --portal-font-zoom.
   ========================================================================== */
.adm {
  --adm-z: var(--portal-font-zoom, 1);
  --adm-surface: #fff;
  --adm-surface-2: #f9f9f6;
  --adm-surface-3: #f5f5ee;
  --adm-line: #eaebe2;
  --adm-line-strong: #dfe0d0;
  --adm-ink: #2c2c12;
  --adm-ink-2: #545430;
  --adm-muted: #86856b;
  --adm-brand: var(--brand-blue, #969900);
  --adm-brand-hover: var(--brand-blue-hover, #8b9000);
  --adm-brand-ink: #6e7107;
  --adm-brand-soft: #fbfce7;
  --adm-brand-line: #eef0ad;
  --adm-good: #1c8f62;
  --adm-good-soft: #e7f6ef;
  --adm-warn: #b07524;
  --adm-warn-soft: #fbf3e6;
  --adm-danger: #c64b4b;
  --adm-danger-soft: #fcefef;
  --adm-danger-line: #efcccc;
  --adm-radius: 12px;
  --adm-control-radius: 8px;
  --adm-shadow: 0 1px 2px rgba(44, 45, 11, .04), 0 4px 16px rgba(44, 45, 11, .04);
  --adm-focus: 0 0 0 3px rgba(150, 153, 0, .18);
  color: var(--adm-ink);
}

/* --- Page heading (compact, the panels carry the detail) --- */
.page-heading:has(+ .admin-page.adm) { margin-bottom: 14px; }
.page-heading:has(+ .admin-page.adm) h1, .user-preferences-page.adm > .page-heading h1 { font-size: calc(24px * var(--portal-font-zoom, 1)); letter-spacing: -.03em; }
.page-heading:has(+ .admin-page.adm) p, .user-preferences-page.adm > .page-heading p { margin-top: 4px; font-size: calc(12.5px * var(--portal-font-zoom, 1)); }
.user-preferences-page.adm > .page-heading { margin-bottom: 14px; }

/* --- Workspace: sticky vertical tab rail + panel --- */
.adm.admin-page { gap: 0; margin-bottom: 16px; }
.adm .admin-workspace { grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 18px; }
.adm .admin-tabs { position: sticky; top: 81px; display: flex; flex-direction: column; gap: 1px; max-height: calc(100vh - 97px); overflow-y: auto; padding: 8px; border: 1px solid var(--adm-line); border-radius: 14px; background: var(--adm-surface); box-shadow: var(--adm-shadow); }
.adm .admin-tab-group { padding: 10px 10px 4px; color: #a0a08a; font-size: calc(10px * var(--adm-z)); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.adm .admin-tab-group:first-child { padding-top: 4px; }
.adm .admin-tab { position: relative; display: flex; align-items: center; gap: 10px; min-height: 0; padding: 6px 8px; border: 0; border-radius: 9px; color: var(--adm-ink-2); background: transparent; box-shadow: none; }
.adm .admin-tab-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #80805d; background: var(--adm-surface-2); transition: background .15s ease, color .15s ease; }
.adm .admin-tab-icon svg { width: 15px; height: 15px; }
.adm .admin-tab-copy { display: grid; min-width: 0; gap: 1px; }
.adm .admin-tab strong { font-size: calc(13px * var(--adm-z)); font-weight: 620; line-height: 1.25; }
.adm .admin-tab small { overflow: hidden; color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.adm .admin-tab:hover { color: var(--adm-ink); background: var(--adm-surface-2); }
.adm .admin-tab:hover .admin-tab-icon { color: var(--adm-brand-ink); background: var(--adm-brand-soft); }
.adm .admin-tab.is-active { color: var(--adm-ink); background: var(--adm-brand-soft); box-shadow: none; }
.adm .admin-tab.is-active::before { position: absolute; top: 9px; bottom: 9px; left: -8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--adm-brand); content: ""; }
.adm .admin-tab.is-active .admin-tab-icon { color: #fff; background: var(--adm-brand); }
.adm .admin-tab.is-active strong { font-weight: 700; }
.adm .admin-tab.is-active small { color: #7a7b4a; }
.adm .admin-tab:focus-visible { outline: none; box-shadow: var(--adm-focus); }

/* --- Panels: one light surface, compact heading --- */
.adm .admin-tab-panel { min-width: 0; }
.adm .admin-settings-panel, .adm .staff-admin-workspace { display: grid; gap: 14px; margin: 0; padding: 16px 18px 18px; border: 1px solid var(--adm-line); border-radius: 14px; background: var(--adm-surface); box-shadow: var(--adm-shadow); }
.adm .admin-billing-layout { display: grid; gap: 14px; }
.adm .admin-settings-heading, .adm .staff-admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--adm-line); }
.adm .admin-settings-heading > div:first-child, .adm .staff-admin-heading > div:first-child { min-width: 0; }
.adm .admin-settings-heading .eyebrow, .adm .staff-admin-heading .eyebrow { margin: 0 0 3px; color: var(--adm-brand-ink); font-size: calc(10px * var(--adm-z)); font-weight: 700; letter-spacing: .12em; }
.adm .admin-settings-heading h2, .adm .staff-admin-heading h2 { margin: 0; color: var(--adm-ink); font-size: calc(18px * var(--adm-z)); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.adm .admin-settings-heading p:not(.eyebrow), .adm .staff-admin-heading p:not(.eyebrow) { max-width: 78ch; margin: 3px 0 0; color: var(--adm-muted); font-size: calc(12.5px * var(--adm-z)); line-height: 1.45; }
.adm .staff-admin-heading > div:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.adm .admin-settings-version { padding: 3px 9px; border: 1px solid var(--adm-line); border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface-2); font-size: calc(11px * var(--adm-z)); font-weight: 600; white-space: nowrap; }
.adm .campaign-loading { padding: 18px 4px; }

/* --- Cards inside a panel --- */
.adm .admin-settings-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; gap: 12px; }
.adm .admin-setting-card, .adm .admin-mail-card, .adm .sms-provider-card, .adm .ai-provider-card { min-width: 0; padding: 14px 16px; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: var(--adm-surface); box-shadow: none; }
.adm .admin-setting-card > header, .adm .admin-mail-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.adm .admin-setting-card > header > span:first-child { display: none; }
.adm .admin-setting-card > header h3, .adm .admin-mail-card > header h3, .adm .admin-setting-card > h3 { margin: 0 0 2px; color: var(--adm-ink); font-size: calc(14px * var(--adm-z)); font-weight: 680; letter-spacing: -.01em; }
.adm .admin-setting-card > header p, .adm .admin-mail-card > header p, .adm .admin-setting-card > p { margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.45; }
.adm .admin-mail-card > header .eyebrow, .adm .ai-provider-head .eyebrow, .adm .sms-provider-card .eyebrow { margin: 0 0 2px; color: #a0a08a; font-size: calc(10px * var(--adm-z)); font-weight: 700; letter-spacing: .1em; }

/* --- Form fields --- */
.adm .admin-email-package { grid-column: 1/-1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 12px; min-width: 0; margin: 0; padding: 8px 10px 10px; border: 1px solid var(--adm-line); border-radius: 8px; }
.adm .admin-email-package legend { padding: 0 4px; color: #838460; font-size: 12px; font-weight: 700; }
.adm .admin-setting-fields, .adm .admin-mail-server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 12px; }
.adm :is(.admin-setting-fields, .admin-mail-server-grid, .ai-provider-fields, .ai-key-row, .staff-account-fields, .sms-provider-card, .sms-crm-consent-settings, .billing-statement-test-form, .user-preferences-panel) > label:not(.admin-module-choice):not(.ai-toggle):not(.ai-clear-choice):not(.sms-key-clear):not(.admin-mail-clear-password):not(.settings-motion-toggle) { display: grid; min-width: 0; align-content: start; gap: 5px; color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); font-weight: 600; }
.adm label > small, .adm .admin-setting-fields small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); font-weight: 400; line-height: 1.4; }
.adm :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 34px; padding: 6px 10px; border: 1px solid var(--adm-line-strong); border-radius: var(--adm-control-radius); color: var(--adm-ink); background-color: var(--adm-surface); font: inherit; font-size: calc(13px * var(--adm-z)); font-weight: 400; line-height: 1.4; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.adm select { padding-right: 28px; }
.adm textarea { min-height: 60px; resize: vertical; }
.adm :is(input, select, textarea)::placeholder { color: #adac99; }
.adm :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover:not(:disabled):not([readonly]) { border-color: #cdceb7; }
.adm :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus { border-color: var(--adm-brand); outline: none; box-shadow: var(--adm-focus); }
.adm :is(input, select, textarea)[readonly] { color: #6e6e50; background-color: var(--adm-surface-2); }
.adm :is(input, select, textarea):disabled { color: #a1a08d; background-color: var(--adm-surface-2); cursor: not-allowed; }
.adm fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.adm fieldset:disabled { opacity: .6; }

/* --- Toggle switches (every admin checkbox) --- */
.admin-page.adm input[type="checkbox"] {
  --sw-w: 30px; --sw-h: 18px;
  position: relative; display: inline-block; box-sizing: border-box; width: var(--sw-w); min-width: var(--sw-w); height: var(--sw-h); min-height: var(--sw-h); flex: 0 0 var(--sw-w);
  margin: 0; padding: 0; border: 0; border-radius: 99px; background: #dbdbca; box-shadow: none; cursor: pointer; appearance: none; -webkit-appearance: none; vertical-align: middle; transition: background .16s ease;
}
.admin-page.adm input[type="checkbox"]::before { position: absolute; top: 2px; left: 2px; width: calc(var(--sw-h) - 4px); height: calc(var(--sw-h) - 4px); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(34, 36, 9, .25); content: ""; transition: transform .16s ease; }
.admin-page.adm input[type="checkbox"]:checked { background: var(--adm-brand); }
.admin-page.adm input[type="checkbox"]:checked::before { transform: translateX(calc(var(--sw-w) - var(--sw-h))); }
.admin-page.adm input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--adm-focus); }
.admin-page.adm input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.admin-page.adm .ai-toggle input[type="checkbox"] { width: var(--sw-w) !important; min-height: var(--sw-h) !important; margin: 0; }
.admin-page.adm :is(.sms-key-clear, .ai-clear-choice, .admin-mail-clear-password, .staff-capability-choice) input[type="checkbox"] { --sw-w: 26px; --sw-h: 15px; }
.admin-page.adm :is(.sms-key-clear, .ai-clear-choice, .admin-mail-clear-password) input[type="checkbox"]:checked { background: var(--adm-danger); }

/* Option rows: label left, switch right */
.adm .admin-module-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.adm :is(.admin-module-choice, .ai-toggle) { display: flex !important; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 12px; min-height: 0; padding: 9px 12px !important; border: 1px solid var(--adm-line); border-radius: 10px; color: var(--adm-ink-2); background: var(--adm-surface); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.adm :is(.admin-module-choice, .ai-toggle):hover { border-color: #d6d6be; background: #fdfdfb; }
.adm :is(.admin-module-choice, .ai-toggle):has(input:checked) { border-color: var(--adm-brand-line); background: #fdfef6; }
.adm :is(.admin-module-choice, .ai-toggle) > span { display: grid; min-width: 0; flex: 1; gap: 2px; }
.adm :is(.admin-module-choice, .ai-toggle) strong { color: var(--adm-ink); font-size: calc(13px * var(--adm-z)); font-weight: 600; line-height: 1.3; }
.adm :is(.admin-module-choice, .ai-toggle) small { color: var(--adm-muted); font-size: calc(11.5px * var(--adm-z)); font-weight: 400; line-height: 1.4; }
.adm .admin-module-choice.is-disabled { opacity: .6; cursor: not-allowed; }

/* Small inline "remove" switches */
.adm :is(.sms-key-clear, .ai-clear-choice, .admin-mail-clear-password) { display: inline-flex !important; flex-direction: row; align-items: center; align-self: center; justify-content: flex-start; gap: 7px !important; width: auto; min-height: 0; padding: 0 !important; border: 0; color: #8a5a55 !important; background: none !important; font-size: calc(12px * var(--adm-z)); font-weight: 500; cursor: pointer; }
.adm :is(.sms-key-clear, .ai-clear-choice, .admin-mail-clear-password) > span, .adm .sms-key-clear strong { display: inline; color: inherit; font-size: inherit; font-weight: 500; white-space: nowrap; }

/* --- Buttons: primary, secondary, danger --- */
.adm :is(.contact-create-button, .contact-save-button) { display: inline-flex; min-width: 0; min-height: 34px; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid var(--adm-brand); border-radius: var(--adm-control-radius); color: #fff; background: var(--adm-brand); box-shadow: none; font-size: calc(13px * var(--adm-z)); font-weight: 600; white-space: nowrap; transform: none; cursor: pointer; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.adm :is(.contact-create-button, .contact-save-button):hover:not(:disabled) { border-color: var(--adm-brand-hover); background: var(--adm-brand-hover); box-shadow: 0 4px 12px rgba(150, 153, 0, .2); transform: none; }
.adm :is(.contact-create-button, .contact-save-button) svg { width: 14px; height: 14px; }
.adm :is(.table-action, .campaign-panel-link, .contact-cancel-button, .staff-capability-tools button, .settings-reset-button) { display: inline-flex; min-width: 0; min-height: 30px; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border: 1px solid var(--adm-line-strong); border-radius: var(--adm-control-radius); color: var(--adm-ink-2); background: var(--adm-surface); box-shadow: none; font-family: inherit; font-size: calc(12px * var(--adm-z)); font-weight: 560; white-space: nowrap; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.adm :is(.table-action, .campaign-panel-link, .contact-cancel-button, .staff-capability-tools button, .settings-reset-button):hover:not(:disabled) { border-color: var(--adm-brand-line); color: var(--adm-brand-ink); background: #fdfdf7; }
.adm :is(.table-action.is-danger, .campaign-action-danger) { display: inline-flex; min-height: 30px; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid var(--adm-danger-line); border-radius: var(--adm-control-radius); color: var(--adm-danger); background: var(--adm-surface); font-family: inherit; font-size: calc(12px * var(--adm-z)); font-weight: 560; white-space: nowrap; cursor: pointer; }
.adm :is(.table-action.is-danger, .campaign-action-danger):hover:not(:disabled) { border-color: #e2a9a9; color: #a83a3a; background: var(--adm-danger-soft); }
.adm :is(button, .contact-create-button, .table-action):disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.adm :is(button, a):focus-visible { outline: none; box-shadow: var(--adm-focus); }
.adm .admin-setting-card a:not([class]):hover, .adm .sms-provider-card a:hover { text-decoration: underline; }

/* --- Sticky save bar --- */
.adm .admin-settings-footer { position: sticky; z-index: 6; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; padding: 8px 8px 8px 14px; border: 1px solid var(--adm-line); border-radius: 12px; background: rgba(255, 255, 255, .9); box-shadow: 0 8px 24px rgba(44, 45, 11, .1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.adm .admin-settings-footer > div { display: grid; min-width: 0; gap: 2px; }
.adm .admin-settings-footer p { margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.4; }
.adm .admin-settings-footer .contact-create-button { min-width: 0; min-height: 34px; font-size: calc(13px * var(--adm-z)); }
.adm :is(.admin-settings-feedback, .admin-mail-feedback, .staff-admin-message) { margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); font-weight: 500; }
.adm :is(.admin-settings-feedback, .admin-mail-feedback, .staff-admin-message):empty { display: none; }
.adm :is(.admin-settings-feedback, .admin-mail-feedback, .staff-admin-message).is-good { color: var(--adm-good); }
.adm :is(.admin-settings-feedback, .admin-mail-feedback, .staff-admin-message).is-error { color: var(--adm-danger); }
.adm .admin-settings-panel > .admin-settings-feedback, .adm .staff-admin-message { padding: 8px 12px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface-2); }
.adm .admin-settings-panel > .admin-settings-feedback.is-good { border-color: #bfe5d3; background: var(--adm-good-soft); }

/* --- Disclosures ("Como funciona" and secondary forms) --- */
.adm details.admin-disclosure { display: block; min-width: 0; margin: 0; padding: 0; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); color: var(--adm-muted); background: var(--adm-surface-2); box-shadow: none; }
.adm details.admin-disclosure > summary { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-height: 0; padding: 10px 40px 10px 14px; color: var(--adm-ink); list-style: none; cursor: pointer; user-select: none; }
.adm details.admin-disclosure > summary::-webkit-details-marker { display: none; }
.adm details.admin-disclosure > summary::after { position: absolute; top: 50%; right: 16px; width: 7px; height: 7px; margin-top: -5px; border-right: 1.6px solid #98987b; border-bottom: 1.6px solid #98987b; content: ""; transform: rotate(45deg); transition: transform .16s ease; }
.adm details.admin-disclosure[open] > summary::after { margin-top: -2px; transform: rotate(-135deg); }
.adm details.admin-disclosure > summary:hover { background: rgba(150, 153, 0, .04); }
.adm details.admin-disclosure[open] > summary { border-bottom: 1px solid var(--adm-line); }
.adm details.admin-disclosure > summary > span { display: grid; min-width: 0; gap: 2px; }
.adm details.admin-disclosure > summary strong { display: inline; color: var(--adm-ink); font-size: calc(13px * var(--adm-z)); font-weight: 650; }
.adm details.admin-disclosure > summary small { display: inline; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); font-weight: 400; line-height: 1.4; }
.adm details.admin-disclosure > :not(summary) { margin: 12px 14px; }
.adm details.admin-disclosure :is(p, li, small, span:not([class])) { color: var(--adm-muted); font-size: calc(12.5px * var(--adm-z)); line-height: 1.55; }
.adm details.admin-disclosure > div { display: grid; gap: 8px; }
.adm details.admin-disclosure > div > :is(p, small) { display: block; margin: 0; }
.adm details.admin-disclosure ul { display: grid; gap: 6px; padding-left: 18px; }
.adm details.admin-disclosure code { padding: 1px 5px; border-radius: 5px; color: var(--adm-ink-2); background: var(--adm-surface-3); font-size: .92em; overflow-wrap: anywhere; }
/* Disclosures that hold a form get a white body */
.adm details.admin-disclosure > form { display: grid; gap: 12px; }
.adm details.admin-disclosure > form > p { margin: 0; }
.adm .staff-access-guidance { gap: 0; }
.adm .staff-access-guidance > span { display: block; margin: 10px 14px; }
.adm .staff-access-guidance > span + span { margin-top: -4px; }

/* --- Channels tab: integrations + SMS span the full width --- */
.adm .admin-settings-grid:has(> #adminSmsSettingsRoot) { grid-template-columns: minmax(0, 1fr); }
.adm .admin-channel-note { margin: 10px 0 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .admin-sms-settings { display: grid; gap: 12px; }
.adm .admin-sms-settings > header { margin-bottom: 0; }
.adm .admin-sms-settings > .admin-setting-fields { grid-template-columns: minmax(0, 420px); }
.adm .sms-provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.adm .sms-provider-card { display: grid; align-content: start; gap: 10px; background: var(--adm-surface-2); }
.adm .sms-provider-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 0; }
.adm .sms-provider-card h4, .adm .sms-crm-consent-settings h4 { margin: 0; color: var(--adm-ink); font-size: calc(14px * var(--adm-z)); font-weight: 680; }
.adm .sms-provider-card > button, .adm .sms-crm-consent-settings > button { justify-self: start; }
.adm .sms-provider-card > small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); }
.adm .sms-crm-consent-settings { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: var(--adm-surface); }
.adm .sms-crm-consent-settings > h4, .adm .sms-crm-consent-settings > label:not(.sms-key-clear) { grid-column: 1 / -1; }
.adm .sms-crm-consent-settings > .sms-key-clear { justify-self: end; }
.adm .sms-consent-admin-note { margin: 0; padding: 9px 12px; border-left: 3px solid var(--adm-brand-line); border-radius: 0 8px 8px 0; color: var(--adm-muted); background: var(--adm-surface-2); font-size: calc(12px * var(--adm-z)); line-height: 1.5; }
.adm details.sms-callback-settings { margin: 0; }
.adm details.sms-callback-settings[open] { display: block; }
.adm details.sms-callback-settings > label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 8px; color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); font-weight: 600; }
.adm details.sms-callback-settings > label input { grid-column: 1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: calc(11.5px * var(--adm-z)); }
.adm details.sms-callback-settings > label button { grid-column: 2; grid-row: 2; }
.adm details.sms-callback-settings > label small { grid-column: 1 / -1; }
.adm .sms-provider-actions { display: flex; justify-content: flex-end; }
.adm .source-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--adm-line); border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface); font-size: calc(11px * var(--adm-z)); font-weight: 600; white-space: nowrap; }
.adm .source-badge.is-connected { border-color: #bfe5d3; color: var(--adm-good); background: var(--adm-good-soft); }
.adm .source-badge.is-error { border-color: var(--adm-danger-line); color: var(--adm-danger); background: var(--adm-danger-soft); }

/* --- Bot tab --- */
.adm .support-bot-settings-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.adm .support-bot-settings-grid > :is(.support-bot-prompt-card, .support-bot-context-card, .support-bot-handoff-card) { grid-column: 1 / -1; }
.adm .support-bot-prompt-card .admin-setting-fields { grid-template-columns: minmax(0, 1fr); }
.adm .support-bot-prompt-field textarea { min-height: 280px; max-height: 70vh; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: calc(12.5px * var(--adm-z)); line-height: 1.55; }
.adm .support-bot-handoff-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.adm .support-bot-handoff-card > header { flex: 1 1 320px; margin: 0; }
.adm .support-bot-handoff-card > p { flex-basis: 100%; margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm details.support-bot-context-card { padding: 0; }

/* --- AI tab --- */
.adm .ai-heading-actions { display: flex; align-items: center; gap: 8px; }
.adm .ai-signal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.adm .ai-signal { display: flex; align-items: center; gap: 10px; min-height: 0; padding: 10px 12px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface-2); }
.adm .ai-signal small { color: var(--adm-muted); font-size: calc(10.5px * var(--adm-z)); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.adm .ai-signal strong { display: block; color: var(--adm-ink); font-size: calc(13px * var(--adm-z)); font-weight: 650; }
.adm .ai-signal-icon { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: var(--adm-brand-ink); background: var(--adm-brand-soft); }
.adm .ai-signal-dot { width: 9px; height: 9px; flex: 0 0 auto; margin: 0 8px; border-radius: 50%; background: #bcbca9; }
.adm .ai-signal-dot.is-good { background: var(--adm-good); box-shadow: 0 0 0 4px rgba(28, 143, 98, .14); }
#adminAiSettingsForm { display: grid; gap: 12px; }
.adm .ai-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; gap: 12px; }
.adm .ai-admin-grid > :is(.ai-routing-card, .ai-gemini-card, .ai-provider-grid, .ai-workflow-note) { grid-column: 1 / -1; }
.adm .ai-routing-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 14px; }
.adm .ai-order-list { display: grid; align-content: start; gap: 6px; padding: 0; border: 0; background: none; }
.adm .ai-section-label { display: grid; gap: 1px; margin-bottom: 4px; }
.adm .ai-section-label strong { color: var(--adm-ink); font-size: calc(12.5px * var(--adm-z)); font-weight: 650; }
.adm .ai-section-label small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); }
.adm .ai-order-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 70px; align-items: center; gap: 8px; }
.adm .ai-order-number { color: #a0a08a; font-size: calc(11px * var(--adm-z)); font-weight: 700; font-variant-numeric: tabular-nums; }
.adm .ai-order-row small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); }
.adm .ai-order-row:first-of-type small { color: var(--adm-brand-ink); font-weight: 650; }
.adm .ai-routing-fields { align-content: start; }
.adm .ai-routing-fields > .ai-toggle { grid-column: span 1; }
.adm .ai-provider-card { display: grid; align-content: start; gap: 12px; }
.adm .ai-provider-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0; }
.adm .ai-provider-head h3 { margin: 0 0 2px; color: var(--adm-ink); font-size: calc(14px * var(--adm-z)); font-weight: 680; }
.adm .ai-provider-head p:not(.eyebrow) { margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.45; }
.adm .ai-provider-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); align-items: end; gap: 10px 12px; }
.adm .ai-provider-fields > .ai-toggle { grid-column: 1 / -1; }
.adm .ai-provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.adm .ai-provider-grid .ai-provider-card { background: var(--adm-surface-2); }
.adm .ai-provider-grid .ai-provider-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm .ai-provider-grid .ai-provider-fields > label:has([data-ai-key]) { grid-column: 1 / -1; }
.adm .ai-provider-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.adm .ai-provider-actions small, .adm .ai-key-count { color: var(--adm-muted); font-size: calc(11.5px * var(--adm-z)); }
.adm .ai-key-list { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface-2); }
.adm .ai-key-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 2fr) auto; align-items: end; gap: 10px; }
.adm .ai-key-index { padding-bottom: 9px; color: #a0a08a; font-size: calc(11px * var(--adm-z)); font-weight: 700; }
.adm .ai-key-row .ai-clear-choice { padding-bottom: 8px !important; }
.adm .ai-provider-status { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; padding: 2px 8px; overflow: hidden; border: 1px solid var(--adm-line); border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface); font-size: calc(11px * var(--adm-z)); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.adm .ai-provider-status.is-good { border-color: #bfe5d3; color: var(--adm-good); background: var(--adm-good-soft); }
.adm .ai-provider-status.is-warn { border-color: #ecd6b2; color: var(--adm-warn); background: var(--adm-warn-soft); }
.adm .ai-provider-status.is-error { border-color: var(--adm-danger-line); color: var(--adm-danger); background: var(--adm-danger-soft); }
.adm .ai-workflow-note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface-2); }
.adm .ai-workflow-note strong { color: var(--adm-ink); font-size: calc(12.5px * var(--adm-z)); }
.adm .ai-workflow-note p { margin: 2px 0 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.5; }
.adm .ai-note-icon { color: var(--adm-brand); }

/* --- WhatsApp tab --- */
.adm .adm-status { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px 1px 7px; border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface-3); font-size: calc(11.5px * var(--adm-z)); font-weight: 650; }
.adm .adm-status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.adm .is-online .adm-status { color: var(--adm-good); background: var(--adm-good-soft); }
.adm .is-offline .adm-status { color: var(--adm-danger); background: var(--adm-danger-soft); }
.adm .is-connecting .adm-status { color: var(--adm-warn); background: var(--adm-warn-soft); }
.adm .is-offline > header > span { color: #8a6a6a; background: var(--adm-danger-soft); }
.adm .whatsapp-pacing-status { margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }

/* --- Team tab: compact rows --- */
.adm .staff-account-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); }
.adm .staff-account-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 14px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--adm-line); border-radius: 0; background: var(--adm-surface); box-shadow: none; }
.adm .staff-account-card:last-child { border-bottom: 0; }
.adm .staff-account-card:hover { background: #fdfdfb; }
.adm .staff-account-heading { gap: 10px; }
.adm .staff-account-avatar { width: 34px; height: 34px; border-radius: 10px; font-size: calc(13px * var(--adm-z)); }
.adm .staff-account-ident { gap: 1px; }
.adm .staff-account-ident strong { color: var(--adm-ink); font-size: calc(13.5px * var(--adm-z)); font-weight: 650; }
.adm .staff-account-ident span { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .staff-account-state { padding: 2px 9px; border: 0; border-radius: 99px; color: var(--adm-good); background: var(--adm-good-soft); font-size: calc(11px * var(--adm-z)); font-weight: 650; }
.adm .staff-account-state.is-pending { color: var(--adm-warn); background: var(--adm-warn-soft); }
.adm .staff-account-state.is-disabled { color: var(--adm-danger); background: var(--adm-danger-soft); }
.adm .staff-account-state.is-orphan { color: var(--adm-muted); background: var(--adm-surface-3); }
.adm .staff-account-app-links { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.adm .staff-account-app-links span { padding: 2px 8px; border: 1px solid var(--adm-line); border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface-2); font-size: calc(11px * var(--adm-z)); font-weight: 550; white-space: nowrap; }
.adm .staff-account-permissions { margin: 0; border: 0; }
.adm .staff-account-permissions > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 30px 0 11px; position: relative; border: 1px solid var(--adm-line-strong); border-radius: var(--adm-control-radius); color: var(--adm-ink-2); background: var(--adm-surface); font-size: calc(12px * var(--adm-z)); font-weight: 600; list-style: none; cursor: pointer; }
.adm .staff-account-permissions > summary::-webkit-details-marker { display: none; }
.adm .staff-account-permissions > summary::after { position: absolute; top: 50%; right: 11px; width: 6px; height: 6px; margin-top: -4px; border-right: 1.5px solid #98987b; border-bottom: 1.5px solid #98987b; content: ""; transform: rotate(45deg); }
.adm .staff-account-permissions > summary:hover { border-color: var(--adm-brand-line); color: var(--adm-brand-ink); }
.adm .staff-account-permissions > summary small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); font-weight: 500; }
.adm .staff-account-permissions[open] { grid-column: 1 / -1; display: grid; gap: 12px; padding: 12px 0 4px; border-top: 1px dashed var(--adm-line); }
.adm .staff-account-permissions[open] > summary { justify-self: start; border-color: var(--adm-brand-line); color: var(--adm-brand-ink); background: var(--adm-brand-soft); }
.adm .staff-account-permissions[open] > summary::after { margin-top: -1px; transform: rotate(-135deg); }
.adm .staff-account-card:has(.staff-account-permissions[open]) { background: #fdfdfb; }
.adm .staff-capability-scope { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; margin: 0; }
.adm .staff-capability-tools { padding: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .staff-capability-group { padding: 10px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface); }
.adm .staff-capability-group h3 { margin: 0 0 6px; color: var(--adm-ink-2); font-size: calc(11px * var(--adm-z)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.adm .staff-capability-group > div { display: grid; gap: 2px; }
.adm .staff-capability-choice { display: flex; align-items: center; gap: 8px; min-height: 0; padding: 4px 4px; border: 0; border-radius: 6px; color: var(--adm-ink-2); background: none; font-size: calc(12px * var(--adm-z)); font-weight: 500; cursor: pointer; }
.adm .staff-capability-choice:hover { background: var(--adm-surface-2); }
.adm .staff-capability-choice:has(input:checked) { border: 0; background: none; }
.adm .staff-capability-choice.is-destructive { color: #9b4a40; background: none; }
.adm .staff-capability-choice.is-destructive input:checked { background: var(--adm-danger); }
.adm .staff-account-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px 12px; }
.adm .staff-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; }
.adm .staff-account-actions button { min-height: 30px; padding: 0 11px; font-size: calc(12px * var(--adm-z)); }
.adm .staff-account-actions [data-staff-toggle-account] { margin-left: auto; }
.adm .staff-protected-note, .adm .staff-account-admin-note { grid-column: 1 / -1; margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .staff-orphan-group { display: grid; gap: 8px; margin-top: 4px; }
.adm .staff-orphan-group > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.adm .staff-orphan-group h3 { margin: 0; color: var(--adm-ink-2); font-size: calc(13px * var(--adm-z)); font-weight: 650; }
.adm .staff-orphan-group header p { margin: 2px 0 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .staff-orphan-group header > span { color: var(--adm-muted); font-size: calc(11.5px * var(--adm-z)); white-space: nowrap; }
.adm .staff-orphan-card { grid-template-columns: minmax(0, 1fr) auto auto; background: var(--adm-surface-2); }
.adm .staff-orphan-card .staff-account-actions { padding: 0; }
.adm .staff-orphan-protected, .adm .staff-orphan-status { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .campaign-empty { display: grid; justify-items: start; gap: 6px; padding: 18px; border: 1px dashed var(--adm-line-strong); border-radius: var(--adm-radius); }

/* --- Billing tab --- */
.adm .billing-statement-schedule-form, .adm #adminUsageBillingForm { display: grid; gap: 12px; }
.adm .billing-statement-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: end; }
.adm .billing-statement-state { padding: 3px 10px; border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface-3); font-size: calc(11.5px * var(--adm-z)); font-weight: 650; white-space: nowrap; }
.adm .billing-statement-state.is-on { color: var(--adm-good); background: var(--adm-good-soft); }
.adm .billing-statement-activity { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.adm .billing-statement-activity p { display: grid; gap: 2px; margin: 0; padding: 10px 12px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface-2); }
.adm .billing-statement-activity strong { color: var(--adm-ink); font-size: calc(12.5px * var(--adm-z)); }
.adm .billing-statement-activity span { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.45; }
.adm .billing-statement-test-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: end; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: var(--adm-surface-2); }
.adm .billing-statement-test-form > div strong { color: var(--adm-ink); font-size: calc(13px * var(--adm-z)); }
.adm .billing-statement-test-form > div p { margin: 2px 0 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .billing-statement-test-status { grid-column: 1 / -1; margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .usage-market-list { display: grid; gap: 6px; margin-top: 12px; }
.adm .usage-market-row { padding: 10px 12px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface-2); }
.adm .usage-market-row > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.adm .usage-market-row > header strong { color: var(--adm-ink); font-size: calc(12.5px * var(--adm-z)); font-weight: 650; }
.adm .usage-market-row .admin-setting-fields { grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 8px 10px; }
@media (min-width: 1280px) {
  .adm .usage-market-row .admin-setting-fields { grid-template-columns: 76px minmax(110px, 1.3fr) 76px repeat(4, minmax(0, 1fr)); }
}
.adm .usage-admin-footnote { margin: 10px 0 0; color: var(--adm-muted); font-size: calc(11.5px * var(--adm-z)); line-height: 1.5; }
.adm details.usage-policy-note > a { display: inline-block; }

/* --- Mail tabs --- */
.adm .admin-mail-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; gap: 12px; }
.adm .admin-mail-state { padding: 3px 10px; border: 0; border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface-3); font-size: calc(11.5px * var(--adm-z)); font-weight: 650; white-space: nowrap; }
.adm .admin-mail-state.is-ready { color: var(--adm-good); background: var(--adm-good-soft); }
.adm .admin-mail-fallback { margin-top: 12px; border: 1px solid var(--adm-line); border-radius: 10px; background: var(--adm-surface-2); }
.adm .admin-mail-fallback > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 9px 12px; color: var(--adm-ink); font-size: calc(13px * var(--adm-z)); font-weight: 650; cursor: pointer; }
.adm .admin-mail-fallback > summary small { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); font-weight: 400; }
.adm .admin-mail-fallback > div { padding: 0 12px 12px; }
.adm .admin-mail-fallback-sender-note { grid-column: 1 / -1; margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .admin-mail-enable { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.adm .admin-mail-enable label { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: 10px; cursor: pointer; }
.adm .admin-mail-enable label > span, .adm .admin-mail-enable > span:first-child { display: grid; gap: 2px; }
.adm .admin-mail-enable strong { color: var(--adm-ink); font-size: calc(13px * var(--adm-z)); font-weight: 650; }
.adm .admin-mail-enable small { color: var(--adm-muted); font-size: calc(11.5px * var(--adm-z)); }
.adm .admin-mail-consumers { display: grid; gap: 6px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--adm-line); list-style: none; }
.adm .admin-mail-consumers li { display: flex; align-items: center; gap: 8px; color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); }
.adm .admin-mail-test-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.adm .admin-mail-test-row label { color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); font-weight: 600; }
.adm .admin-mail-test .admin-mail-feedback { margin-top: 8px; }

/* --- #configuracoes --- */
.user-preferences-page.adm .user-preferences-form { gap: 12px; }
.user-preferences-page.adm .user-preferences-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 12px; align-items: start; }
.user-preferences-page.adm .user-preferences-panel { gap: 12px; padding: 16px 18px; border: 1px solid var(--adm-line); border-radius: 14px; background: var(--adm-surface); box-shadow: var(--adm-shadow); }
.user-preferences-page.adm .user-preferences-panel-head { gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--adm-line); }
.user-preferences-page.adm .user-preferences-mark { width: 32px; height: 32px; border: 0; border-radius: 9px; color: #fff; background: var(--adm-brand); font-size: calc(13px * var(--adm-z)); }
.user-preferences-page.adm .user-preferences-mark svg { width: 16px; height: 16px; }
.user-preferences-page.adm .user-preferences-panel-head .eyebrow { margin: 0 0 2px; color: var(--adm-brand-ink); font-size: calc(10px * var(--adm-z)); font-weight: 700; letter-spacing: .12em; }
.user-preferences-page.adm .user-preferences-panel-head h2 { color: var(--adm-ink); font-size: calc(16px * var(--adm-z)); font-weight: 700; }
.user-preferences-page.adm .user-preferences-description, .user-preferences-page.adm .settings-dashboard-preferences > small { margin: 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.5; }
.user-preferences-page.adm .settings-subheading { margin: 0; color: var(--adm-ink-2); font-size: calc(11px * var(--adm-z)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.user-preferences-page.adm .settings-select-field { display: grid; gap: 5px; }
.user-preferences-page.adm .settings-select-field > span { color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); font-weight: 600; }
.user-preferences-page.adm .settings-select-field > small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); }
.user-preferences-page.adm .settings-select-grid { gap: 10px 12px; }
.user-preferences-page.adm .settings-dashboard-preferences { border-color: var(--adm-line); }
.user-preferences-page.adm .settings-scale-fieldset legend { margin-bottom: 6px; color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); font-weight: 600; }
.user-preferences-page.adm .settings-scale-options { gap: 6px; }
.user-preferences-page.adm .settings-scale-choice { min-height: 0; padding: 8px 10px; border-color: var(--adm-line); }
.user-preferences-page.adm .settings-scale-choice > span { padding: 0; border: 0; background: none; box-shadow: none; }
.user-preferences-page.adm .settings-scale-choice:has(input:checked) { border-color: var(--adm-brand); background: var(--adm-brand-soft); box-shadow: inset 0 0 0 1px var(--adm-brand); }
.user-preferences-page.adm .settings-scale-choice input { accent-color: var(--adm-brand); }
.user-preferences-page.adm .settings-motion-toggle { flex-wrap: nowrap; }
.user-preferences-page.adm .settings-motion-toggle { padding: 9px 12px; border-color: var(--adm-line); border-radius: 10px; background: var(--adm-surface); }
.user-preferences-page.adm .settings-motion-toggle strong { color: var(--adm-ink); font-size: calc(13px * var(--adm-z)); font-weight: 600; }
.user-preferences-page.adm .settings-motion-toggle small { color: var(--adm-muted); font-size: calc(11.5px * var(--adm-z)); }
.user-preferences-page.adm .settings-toggle-track { width: 30px; height: 18px; border: 0; background: #dbdbca; }
.user-preferences-page.adm .settings-toggle-track::after { top: 2px; left: 2px; width: 14px; height: 14px; }
.user-preferences-page.adm .settings-motion-toggle input:checked + .settings-toggle-track { border: 0; background: var(--adm-brand); }
.user-preferences-page.adm .settings-motion-toggle input:checked + .settings-toggle-track::after { transform: translateX(12px); }
.user-preferences-page.adm .user-preferences-footer { position: sticky; z-index: 6; bottom: 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--adm-line); border-radius: 12px; background: rgba(255, 255, 255, .9); box-shadow: 0 8px 24px rgba(44, 45, 11, .1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.user-preferences-page.adm .user-preferences-feedback { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.user-preferences-page.adm .user-preferences-feedback.is-error { color: var(--adm-danger); }
.user-preferences-page.adm .user-preferences-footer > div { gap: 6px; }

/* --- Responsive --- */
@media (max-width: 1100px) {
  .adm .admin-workspace { grid-template-columns: 196px minmax(0, 1fr); gap: 14px; }
  .adm .admin-tab small { display: none; }
  .adm .ai-routing-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .adm .admin-workspace { grid-template-columns: minmax(0, 1fr); }
  .adm .admin-tabs { position: static; flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 5px; gap: 4px; border-radius: 12px; scroll-snap-type: x proximity; }
  .adm .admin-tab-group { display: none; }
  .adm .admin-tab { flex: 0 0 auto; padding: 5px 10px 5px 5px; scroll-snap-align: start; }
  .adm .admin-tab.is-active::before { display: none; }
  .adm .admin-tab-icon { width: 24px; height: 24px; }
  .adm .admin-tab strong { white-space: nowrap; }
  .adm .staff-account-card { grid-template-columns: minmax(0, 1fr) auto; }
  .adm .staff-account-app-links { grid-column: 1; grid-row: 2; }
  .adm .staff-account-permissions:not([open]) { grid-column: 2; grid-row: 1 / span 2; }
  .adm .staff-account-heading .staff-account-state { display: none; }
}
@media (max-width: 640px) {
  .adm .admin-settings-panel, .adm .staff-admin-workspace { padding: 12px; border-radius: 12px; }
  .adm .admin-settings-heading, .adm .staff-admin-heading { flex-wrap: wrap; align-items: flex-start; }
  .adm .admin-setting-card, .adm .admin-mail-card, .adm .sms-provider-card, .adm .ai-provider-card { padding: 12px; }
  .adm .admin-settings-footer, .user-preferences-page.adm .user-preferences-footer { flex-direction: row; flex-wrap: wrap; bottom: 8px; }
  .adm .admin-settings-footer > div { flex: 1 1 160px; }
  .adm .admin-settings-footer .contact-create-button { width: auto; flex: 1 0 auto; }
  .adm .ai-key-row { grid-template-columns: minmax(0, 1fr) auto; }
  .adm .ai-key-row > .ai-key-index { display: none; }
  .adm .ai-key-row > .ai-key-input { grid-column: 1 / -1; grid-row: 2; }
  .adm .ai-provider-grid .ai-provider-fields { grid-template-columns: minmax(0, 1fr); }
  .adm .billing-statement-test-form, .adm .admin-mail-test-row, .adm .sms-crm-consent-settings { grid-template-columns: minmax(0, 1fr); }
  .adm .staff-account-actions [data-staff-toggle-account] { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .adm *, .adm *::before, .adm *::after { transition: none !important; }
}

/* Admin refresh: alignment and density fixes */
.adm .admin-setting-fields label > small, .adm .usage-base-fields label > small, .adm .usage-admin-panel .admin-setting-fields label > small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); font-weight: 400; line-height: 1.4; }
.adm .admin-setting-fields { align-items: start; }
.adm .usage-market-row .admin-setting-fields { align-items: end; }
.adm .usage-market-row > header small { color: var(--adm-muted); font-weight: 400; }
.adm .usage-base-fields { margin: 0 0 4px; }
.adm .billing-statement-schedule-form .admin-settings-footer { position: static; box-shadow: none; background: var(--adm-surface-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
.adm .support-bot-settings-grid { align-items: stretch; }
.adm .source-badge { letter-spacing: 0; text-transform: none; }
.adm .sms-provider-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.adm .ai-admin-grid > .ai-generation-card { grid-column: 1 / -1; }
.adm .ai-generation-card .admin-setting-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.adm .ai-provider-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.adm .ai-provider-grid .ai-provider-card { gap: 10px; padding: 12px 14px; }
.adm .ai-provider-grid .ai-toggle small, .adm .ai-provider-grid label:has([data-ai-key]) > small { display: none; }
.adm .ai-provider-grid .ai-toggle { padding: 7px 10px !important; }
.adm .ai-provider-grid .ai-provider-fields > .ai-clear-choice { grid-column: 1 / -1; }
.adm .ai-provider-grid .ai-provider-head p:not(.eyebrow) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }

/* ==========================================================================
   Conversas refresh: full-height workspace, slim chrome, readable queue rows,
   WhatsApp-style thread. Scoped under .conversations-page.
   ========================================================================== */
.content:has(> .conversations-page) { width: 100%; max-width: none; min-height: 0; padding: 12px clamp(12px, 1.4vw, 20px) 12px; }
.main-shell:has(.conversations-page) .page-foot { display: none; }
.conversations-page {
  --cv-z: var(--portal-text-scale, 1);
  --cv-line: #ebece3;
  --cv-line-soft: #f4f4ee;
  --cv-ink: #2c2c12;
  --cv-ink-2: #595938;
  --cv-muted: #8a896f;
  --cv-brand: var(--brand-blue, #969900);
  --cv-brand-ink: #6e7107;
  --cv-brand-soft: #fbfce7;
  --cv-good: #1c8f62;
  --cv-good-soft: #e7f6ef;
  --cv-warn: #a86d1d;
  --cv-warn-soft: #fbf3e6;
  --cv-danger: #c64b4b;
  --cv-danger-soft: #fcefef;
  --cv-chat-bg: #f7f7f3;
  display: flex; flex-direction: column; gap: 8px;
  height: calc(100dvh - 65px - 24px); min-height: 520px;
}
.conversations-page #conversationChannelState:empty { display: none; }
.conversations-page .conversation-channel-banner { margin: 0; padding: 8px 12px; border-radius: 10px; }

/* --- Workspace frame --- */
.conversations-page .conversation-workspace {
  flex: 1 1 0; height: auto; min-height: 0;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  border: 1px solid var(--cv-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(44, 45, 11, .04), 0 6px 20px rgba(44, 45, 11, .05);
}
.conversations-page .conversation-workspace.has-conversation-details { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(250px, 290px); }

/* --- Inbox column --- */
.conversations-page .conversation-inbox-panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--cv-line); }
.conversations-page .conversation-inbox-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; text-align: left; }
.conversations-page .conversation-inbox-title { display: flex; min-width: 0; align-items: center; gap: 8px; }
.conversations-page .conversation-inbox-title h2 { margin: 0; color: var(--cv-ink); font-size: calc(15px * var(--cv-z)); font-weight: 760; letter-spacing: -.02em; white-space: nowrap; }
.conversations-page .conversation-inbox-title > *:first-child:not(h2) { display: flex; gap: 4px; margin: 0; }
.conversations-page .conversation-source-platform { width: 28px; height: 28px; border-radius: 8px; }
.conversations-page .conversation-source-platform svg { width: 16px; height: 16px; }
.conversations-page .conversation-inbox-meta { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 4px; margin: 0; }
.conversations-page .conversation-handoff-button, .conversations-page .conversation-refresh-button {
  display: inline-grid; width: 30px; min-height: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid var(--cv-line); border-radius: 8px; color: var(--cv-ink-2); background: #fff; cursor: pointer;
}
.conversations-page .conversation-handoff-button:hover, .conversations-page .conversation-refresh-button:hover { border-color: #eef0ad; color: var(--cv-brand-ink); background: var(--cv-brand-soft); }
.conversations-page .conversation-handoff-button svg, .conversations-page .conversation-refresh-button svg { width: 15px; height: 15px; margin: 0; }
.conversations-page .conversation-new-button { display: inline-flex; min-height: 30px; height: 30px; align-items: center; gap: 4px; padding: 0 11px 0 8px; border: 1px solid var(--cv-brand); border-radius: 8px; color: #fff; background: var(--cv-brand); font-size: calc(12.5px * var(--cv-z)); font-weight: 700; white-space: nowrap; }
.conversations-page .conversation-new-button:hover { border-color: #8b9000; background: #8b9000; }
.conversations-page .conversation-new-button svg { width: 14px; height: 14px; }

.conversations-page .conversation-search-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin: 0; padding: 0 12px 8px; }
.conversations-page .conversation-search { flex: 1 1 auto; min-height: 32px; height: 32px; border-radius: 8px; background: #f9f9f6; border-color: var(--cv-line); }
.conversations-page .conversation-search:focus-within { background: #fff; border-color: #e4e68e; box-shadow: 0 0 0 3px rgba(150, 153, 0, .14); }
.conversations-page .conversation-search input { font-size: calc(13px * var(--cv-z)); }
.conversations-page .conversation-search-tool { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; background: #fff; border-color: var(--cv-line); }

.conversations-page .conversation-queue-inbox-control { flex: 0 0 auto; margin: 0; padding: 0 12px 8px; border: 0; background: none; }
.conversations-page .conversation-queue-inbox-control label { display: block; margin: 0; }
.conversations-page .conversation-queue-inbox-control label > span, .conversations-page .conversation-queue-inbox-control small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.conversations-page .conversation-queue-inbox-control select { width: 100%; height: 32px; min-height: 32px; padding: 0 30px 0 10px; border: 1px solid var(--cv-line); border-radius: 8px; color: var(--cv-ink-2); background-color: #fff; font-size: calc(12.5px * var(--cv-z)); font-weight: 600; }

.conversations-page .conversation-queue { flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--cv-line-soft); }
.conversations-page .conversation-list { padding: 4px 0; }

/* --- Queue rows --- */
.conversations-page .conversation-row-shell { position: relative; display: block; margin: 0 6px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; }
.conversations-page .conversation-row-shell + .conversation-row-shell { margin-top: 1px; }
.conversations-page .conversation-row-shell:hover { background: #f9f9f5; }
.conversations-page .conversation-row-shell.is-active { background: var(--cv-brand-soft); box-shadow: inset 3px 0 var(--cv-brand); }
.conversations-page .conversation-row-shell .conversation-row { display: flex; width: 100%; margin: 0; align-items: flex-start; gap: 10px; padding: 9px 10px 3px 11px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; }
.conversations-page .conversation-row-shell .conversation-row:focus-visible { outline: 2px solid var(--cv-brand); outline-offset: -2px; }
.conversations-page .conversation-row .conversation-avatar { width: 38px; height: 38px; border-radius: 50%; margin-top: 1px; font-size: calc(12px * var(--cv-z)); }
.conversations-page .conversation-row-copy { display: grid; flex: 1 1 auto; min-width: 0; gap: 1px; }
.conversations-page .conversation-row-top { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 8px; }
.conversations-page .conversation-row-top .conversation-contact-name { display: flex; min-width: 0; align-items: center; gap: 5px; overflow: hidden; color: var(--cv-ink); font-size: calc(13.5px * var(--cv-z)); font-weight: 650; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; }
.conversations-page .conversation-row-shell.is-unread .conversation-contact-name { font-weight: 780; }
.conversations-page .conversation-row-top time { flex: 0 0 auto; color: var(--cv-muted); font-size: calc(11px * var(--cv-z)); font-variant-numeric: tabular-nums; }
.conversations-page .conversation-row-shell.is-unread .conversation-row-top time { color: var(--cv-good); font-weight: 700; }
.conversations-page .conversation-row-sub { display: flex; min-width: 0; align-items: center; gap: 6px; color: var(--cv-muted); font-size: calc(11.5px * var(--cv-z)); line-height: 1.35; white-space: nowrap; }
.conversations-page .conversation-row-phone { overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.conversations-page .conversation-row-sub small { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 0; border: 0; color: var(--cv-muted); background: none; font-size: inherit; font-weight: 600; }
.conversations-page .conversation-row-sub .conversation-row-phone + small::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #c8c8b5; margin-right: 2px; }
.conversations-page .conversation-row-whatsapp-source { color: #1f8a57 !important; }
.conversations-page .conversation-row-whatsapp-source.is-unidentified { color: var(--cv-warn) !important; }
.conversations-page .conversation-row-bottom { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; margin-top: 1px; }
.conversations-page .conversation-row-preview { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--cv-ink-2); font-size: calc(12.5px * var(--cv-z)); line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.conversations-page .conversation-row-shell.is-unread .conversation-row-preview { color: var(--cv-ink); font-weight: 600; }
.conversations-page .conversation-row-preview.is-empty { color: #b0af9a; font-style: italic; }
.conversations-page .conversation-row-tags { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.conversations-page .conversation-row-tags b { display: inline-grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border-radius: 99px; color: #fff; background: #1fae66; font-size: calc(10.5px * var(--cv-z)); font-weight: 800; line-height: 1; }
.conversations-page .conversation-row-tags b.is-priority { min-width: 19px; padding: 0; color: #fff; background: var(--cv-danger); border: 0; }
.conversations-page .conversation-row-labels { display: flex; min-height: 0; flex-wrap: nowrap; align-items: center; gap: 4px; overflow: hidden; padding: 3px 10px 9px 60px; mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
.conversations-page .conversation-row-labels > small, .conversations-page .conversation-row-labels > button {
  display: inline-flex; flex: 0 0 auto; height: 19px; min-height: 19px; align-items: center; gap: 4px; padding: 0 7px; border: 1px solid transparent; border-radius: 6px; font-size: calc(10.5px * var(--cv-z)); font-weight: 650; line-height: 1; white-space: nowrap; letter-spacing: 0;
}
.conversations-page .conversation-row-bot-state { color: #6f704f; background: #f4f4ee; }
.conversations-page .conversation-row-bot-state.is-handoff { color: #8a5a12; background: var(--cv-warn-soft); }
.conversations-page .conversation-row-bot-state.is-paused { color: #a14444; background: var(--cv-danger-soft); }
.conversations-page .conversation-assignee-chip { color: var(--cv-brand-ink); background: var(--cv-brand-soft); }
.conversations-page .conversation-unassigned-chip { color: #9ea08b; background: transparent; border-color: #e9eae1 !important; border-style: dashed !important; }
.conversations-page .conversation-label-chip { color: var(--conversation-tag-color, #64652c); background: color-mix(in srgb, var(--conversation-tag-color, #64652c) 11%, #fff); border-color: transparent; }
.conversations-page .conversation-label-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--conversation-tag-color, #64652c); }
.conversations-page .conversation-label-more { color: var(--cv-muted); background: #f5f5f1; }
.conversations-page .conversation-row-notes { color: #8a5a12; background: #fff; border-color: #ecd9b2 !important; cursor: pointer; }
.conversations-page .conversation-row-notes:hover { background: var(--cv-warn-soft); }
.conversations-page .conversation-row-notes .conversation-notes-new-dot { position: static; width: 6px; height: 6px; }
.conversations-page .conversation-row-shell.is-active .conversation-row-bot-state { background: #fff; }
.conversations-page .conversation-list-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--cv-line-soft); color: var(--cv-muted); font-size: calc(11.5px * var(--cv-z)); }
.conversations-page .conversation-list-footer > div { display: flex; align-items: center; gap: 6px; }
.conversations-page .conversation-list-footer .table-action { min-height: 26px; height: 26px; min-width: 26px; padding: 0 8px; border-radius: 7px; }
.conversations-page .conversation-queue { display: flex; flex-direction: column; }
.conversations-page .conversation-queue > .conversation-list { flex: 1 1 auto; align-content: start; grid-auto-rows: max-content; }
.conversations-page .conversation-queue > .conversation-list-footer { position: sticky; bottom: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); }

/* --- Thread --- */
.conversations-page .conversation-thread { grid-template-rows: auto minmax(0, 1fr) auto auto; background: var(--cv-chat-bg); }
.conversations-page .conversation-thread-top { grid-row: 1; position: relative; z-index: 8; border-bottom: 1px solid var(--cv-line); background: #fff; }
.conversations-page .conversation-thread > .conversation-messages { grid-row: 2; }
.conversations-page .conversation-thread > .conversation-readonly-note { grid-row: 3; }
.conversations-page .conversation-thread > .conversation-composer-wrap { grid-row: 4; }
.conversations-page .conversation-thread-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 6px; border: 0; background: transparent; }
.conversations-page .conversation-thread-head:hover { background: #fcfbfa; }
.conversations-page .conversation-thread-head .conversation-avatar.is-large { width: 36px; height: 36px; border-radius: 50%; }
.conversations-page .conversation-thread-person { display: grid; flex: 1 1 auto; min-width: 0; gap: 1px; }
.conversations-page .conversation-thread-person > strong { display: flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; color: var(--cv-ink); font-size: calc(14.5px * var(--cv-z)); font-weight: 720; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.conversations-page .conversation-thread-meta { display: flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; color: var(--cv-muted); font-size: calc(12px * var(--cv-z)); white-space: nowrap; }
.conversations-page .conversation-thread-phone { flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--cv-ink-2); }
.conversations-page .conversation-thread-route { display: inline-flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; margin: 0; color: var(--cv-muted); font-size: inherit; font-weight: 500; text-overflow: ellipsis; }
.conversations-page .conversation-thread-phone + .conversation-thread-route::before { content: ""; flex: 0 0 auto; width: 3px; height: 3px; border-radius: 50%; background: #c8c8b5; }
.conversations-page .conversation-status-pill { flex: 0 0 auto; height: 22px; padding: 0 9px; border-radius: 99px; font-size: calc(11px * var(--cv-z)); font-weight: 700; display: inline-flex; align-items: center; }
.conversations-page .conversation-thread-head::after { margin-left: 2px; }

.conversations-page .conversation-thread-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 0 14px 8px 60px; }
.conversations-page .conversation-thread-actions { display: flex; flex: 1 1 auto; min-width: 0; min-height: 0; flex-wrap: wrap; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; }
.conversations-page .conversation-control-button, .conversations-page .conversation-thread-actions .conversation-tag-picker > button {
  display: inline-flex; height: 28px; min-height: 28px; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--cv-line); border-radius: 7px; color: var(--cv-ink-2); background: #fff; font-size: calc(12px * var(--cv-z)); font-weight: 650; white-space: nowrap; box-shadow: none;
}
.conversations-page .conversation-control-button:hover:not(:disabled), .conversations-page .conversation-thread-actions .conversation-tag-picker > button:hover:not(:disabled) { border-color: #eef0ad; color: var(--cv-brand-ink); background: var(--cv-brand-soft); }
.conversations-page .conversation-control-button.is-primary { border-color: var(--cv-brand); color: #fff; background: var(--cv-brand); }
.conversations-page .conversation-control-button.is-primary:hover:not(:disabled) { border-color: #8b9000; color: #fff; background: #8b9000; }
.conversations-page .conversation-control-button.is-warning { border-color: #ecd9b2; color: #8a5a12; background: #fff; }
.conversations-page .conversation-control-button:disabled { opacity: .55; cursor: default; }
.conversations-page .conversation-urgency-toggle.is-active { border-color: var(--cv-danger-line, #efcccc); color: var(--cv-danger); background: var(--cv-danger-soft); }
.conversations-page .conversation-urgency-indicator { display: inline-grid; width: 15px; height: 15px; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--cv-danger); font-size: 10px; font-weight: 800; }
.conversations-page .conversation-assignment-note { display: inline-flex; height: 28px; align-items: center; gap: 5px; margin-left: 2px; padding: 0 2px; color: var(--cv-muted); font-size: calc(12px * var(--cv-z)); white-space: nowrap; }
.conversations-page .conversation-assignment-note::before { content: "Responsável:"; color: #abaa95; }
.conversations-page .conversation-action-error { flex-basis: 100%; margin: 2px 0 0; font-size: calc(12px * var(--cv-z)); }

.conversations-page .conversation-source-error { flex-basis: 100%; font-size: calc(11.5px * var(--cv-z)); }

/* --- Messages --- */
.conversations-page .conversation-messages { padding: 14px clamp(14px, 3vw, 36px) 10px; }
.conversations-page .conversation-message-list { display: flex; flex-direction: column; gap: 2px; }
.conversations-page .conversation-day-separator { display: flex; justify-content: center; margin: 10px 0 8px; }
.conversations-page .conversation-day-separator span { padding: 3px 10px; border-radius: 99px; color: var(--cv-muted); background: #fff; box-shadow: 0 1px 2px rgba(44, 45, 11, .06); font-size: calc(11px * var(--cv-z)); font-weight: 650; text-transform: capitalize; }
.conversations-page .conversation-message-row { display: flex; flex-direction: column; max-width: min(620px, 78%); align-self: flex-start; align-items: flex-start; gap: 2px; margin-top: 8px; }
.conversations-page .conversation-message-row.is-outgoing { align-self: flex-end; align-items: flex-end; }
.conversations-page .conversation-message-row.is-continued { margin-top: 0; }
.conversations-page .conversation-message-row.is-continued .conversation-message-meta { display: none; }
.conversations-page .conversation-message-meta { display: flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--cv-muted); font-size: calc(11px * var(--cv-z)); }
.conversations-page .conversation-message-meta strong { color: var(--cv-ink-2); font-size: inherit; font-weight: 700; }
.conversations-page .conversation-message-meta .conversation-avatar.is-inline { width: 18px; height: 18px; border-radius: 50%; font-size: 8px; }
.conversations-page .conversation-message-bubble {
  position: relative; max-width: 100%; padding: 7px 10px 6px; border: 0; border-radius: 4px 12px 12px 12px; color: var(--cv-ink); background: #fff; box-shadow: 0 1px 1.5px rgba(44, 45, 11, .08);
  font-size: calc(13.5px * var(--cv-z)); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.conversations-page .conversation-message-row.is-continued .conversation-message-bubble { border-radius: 12px; }
.conversations-page .conversation-message-row.is-outgoing .conversation-message-bubble { border: 0; border-radius: 12px 4px 12px 12px; color: #34340f; background: #f9fbd6; }
.conversations-page .conversation-message-row.is-outgoing.is-continued .conversation-message-bubble { border-radius: 12px; }
.conversations-page .conversation-message-stamp { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 6px -2px -2px 10px; color: #a2a18a; font-size: calc(10.5px * var(--cv-z)); line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.conversations-page .conversation-message-row.is-outgoing .conversation-message-stamp { color: #8f915c; }
.conversations-page .conversation-delivery-ticks { display: inline-flex; color: #a4a67e; font-size: calc(11px * var(--cv-z)); letter-spacing: -.25em; padding-right: .25em; }
.conversations-page .conversation-delivery-ticks.is-read { color: var(--cv-brand); }
.conversations-page .conversation-delivery-ticks.is-delivered { color: #8f915c; }
.conversations-page .conversation-delivery { display: inline-flex; align-items: center; gap: 4px; padding: 0 4px; font-size: calc(11px * var(--cv-z)); font-weight: 650; }
.conversations-page .conversation-delivery.is-failed { color: var(--cv-danger); }
.conversations-page .conversation-retry-button { height: 24px; min-height: 24px; padding: 0 9px; border: 1px solid #efcccc; border-radius: 7px; color: var(--cv-danger); background: #fff; font-size: calc(11.5px * var(--cv-z)); font-weight: 650; }
.conversations-page .conversation-retry-button:hover:not(:disabled) { background: var(--cv-danger-soft); }
.conversations-page .conversation-load-older { display: block; margin: 0 auto 6px; padding: 4px 12px; border: 1px solid var(--cv-line); border-radius: 99px; color: var(--cv-ink-2); background: #fff; font-size: calc(11.5px * var(--cv-z)); font-weight: 650; cursor: pointer; }
.conversations-page .conversation-attachment-image, .conversations-page .conversation-attachment-video, .conversations-page .conversation-attachment-file { margin-top: 2px; }

/* --- Composer --- */
.conversations-page .conversation-composer-wrap { padding: 8px 12px 10px; border-top: 0; background: var(--cv-chat-bg); }
.conversations-page .conversation-composer { display: flex; flex-direction: column; border: 1px solid var(--cv-line); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(44, 45, 11, .05); }
.conversations-page .conversation-composer:focus-within { border-color: #e4e68e; box-shadow: 0 0 0 3px rgba(150, 153, 0, .12); }
.conversations-page .conversation-composer-wrap.is-private .conversation-composer { border-color: #ecd9b2; background: #fffcf4; }
.conversations-page .conversation-composer textarea {
  display: block; width: 100%; min-height: 42px; max-height: 180px; height: auto; field-sizing: content; resize: none; margin: 0; padding: 11px 13px 4px; border: 0; border-radius: 12px 12px 0 0; outline: 0; color: var(--cv-ink); background: transparent; box-shadow: none; font: inherit; font-size: calc(13.5px * var(--cv-z)); line-height: 1.45;
}
.conversations-page .conversation-composer textarea:focus-visible { outline: 0; }
.conversations-page .conversation-composer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 4px 6px 6px 8px; border: 0; background: transparent; }
.conversations-page .conversation-tool-button, .conversations-page .conversation-quick-replies > summary, .conversations-page .conversation-note-toggle {
  display: inline-flex; height: 28px; min-height: 28px; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; color: var(--cv-ink-2); background: transparent; font-size: calc(12px * var(--cv-z)); font-weight: 650; cursor: pointer;
}
.conversations-page .conversation-tool-button:hover:not(:disabled), .conversations-page .conversation-quick-replies > summary:hover, .conversations-page .conversation-note-toggle:hover { border-color: transparent; color: var(--cv-brand-ink); background: #f7f7f1; }
.conversations-page .conversation-tool-button svg { width: 14px; height: 14px; }
.conversations-page .conversation-note-toggle input { appearance: none; position: relative; width: 26px; height: 15px; flex: 0 0 auto; margin: 0; border-radius: 99px; background: #ddddcf; cursor: pointer; transition: background .15s ease; }
.conversations-page .conversation-note-toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease; }
.conversations-page .conversation-note-toggle input:checked { background: #d49a2a; }
.conversations-page .conversation-note-toggle input:checked::after { transform: translateX(11px); }
.conversations-page .conversation-composer-wrap.is-private .conversation-note-toggle { color: #8a5a12; }
.conversations-page .conversation-attachment-status:empty { display: none; }
.conversations-page .conversation-composer-foot { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; justify-content: flex-end; gap: 10px; margin: 0; padding: 0; border: 0; color: #aaaa93; font-size: calc(11px * var(--cv-z)); }
.conversations-page #conversationReplyCount { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.conversations-page .conversation-send-button { display: inline-flex; height: 32px; min-height: 32px; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 8px; color: #fff; background: var(--cv-brand); font-size: calc(12.5px * var(--cv-z)); font-weight: 700; }
.conversations-page .conversation-send-button:hover:not(:disabled) { background: #8b9000; }
.conversations-page .conversation-send-button:disabled { color: #b0af9a; background: #f4f4ee; }
.conversations-page .conversation-send-button svg { width: 14px; height: 14px; }
.conversations-page .conversation-pending-files { padding: 8px 10px 0; }
.conversations-page .conversation-readonly-note { margin: 0 0 6px; padding: 6px 10px; font-size: calc(12px * var(--cv-z)); }
.conversations-page .conversation-reply-error { margin: 0 0 6px; }
.conversations-page .conversation-resolved-hint { margin: 5px 4px 0; font-size: calc(11.5px * var(--cv-z)); }

/* --- Contact details column --- */
.conversations-page .conversation-details-panel { border-left: 1px solid var(--cv-line); }
.conversations-page .conversation-contact-profile { gap: 6px; padding: 16px 14px 12px; }
.conversations-page .conversation-contact-profile .conversation-avatar.is-large { width: 52px; height: 52px; border-radius: 50%; }
.conversations-page .conversation-detail-section { gap: 6px; padding: 11px 14px; border-top: 1px solid var(--cv-line-soft); }
.conversations-page .conversation-detail-section .eyebrow { margin: 0; color: #a2a18a; font-size: calc(10.5px * var(--cv-z)); letter-spacing: .08em; }
.conversations-page .conversation-detail-value { font-size: calc(13px * var(--cv-z)); }
.conversations-page .conversation-detail-muted { font-size: calc(11.5px * var(--cv-z)); line-height: 1.45; }
.conversations-page .conversation-detail-action, .conversations-page .conversation-copy-button, .conversations-page .conversation-notes-button { min-height: 26px; padding: 0 9px; border-radius: 7px; font-size: calc(11.5px * var(--cv-z)); }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .conversations-page .conversation-workspace, .conversations-page .conversation-workspace.has-conversation-details { grid-template-columns: minmax(270px, 310px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .conversations-page .conversation-workspace.has-conversation-details { grid-template-rows: minmax(0, 1fr) auto; }
  .conversations-page .conversation-workspace.has-conversation-details .conversation-details-panel { max-height: 40vh; }
}
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .content:has(> .conversations-page) { padding: 8px; }
  .conversations-page { height: auto; min-height: 0; }
  .conversations-page .conversation-workspace, .conversations-page .conversation-workspace.has-conversation-details { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .conversations-page .conversation-inbox-panel { max-height: 62vh; min-height: 320px; border-right: 0; border-bottom: 1px solid var(--cv-line); }
  .conversations-page .conversation-thread { min-height: 78vh; }
  .conversations-page .conversation-thread-toolbar { padding-left: 14px; }
  .conversations-page .conversation-message-row { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) {
  .conversations-page .conversation-note-toggle input, .conversations-page .conversation-note-toggle input::after { transition: none; }
}

/* --- Fit-and-finish --- */
.conversations-page .conversation-inbox-heading > .conversation-inbox-title { display: flex; align-items: center; gap: 8px; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; text-align: left; }
.conversations-page .conversation-inbox-title .conversation-source-platforms { flex: 0 0 auto; justify-content: flex-start; gap: 4px; margin: 0; }
.conversations-page .conversation-row-shell, .conversations-page .conversation-row-shell.is-active { border: 0; }
.conversations-page .conversation-row-shell .conversation-row, .conversations-page .conversation-row-shell.is-active .conversation-row { border: 0 !important; box-shadow: none !important; background: transparent !important; }
/* Head row: contact on the left, reply number on the right; actions underneath. */
.conversations-page .conversation-thread-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
.conversations-page .conversation-thread-toolbar { display: contents; }
.conversations-page .conversation-thread-top > .conversation-thread-head { grid-column: 1; grid-row: 1; }
.conversations-page .conversation-thread-top .conversation-thread-actions { grid-column: 1 / -1; grid-row: 2; padding: 0 14px 8px; }
.conversations-page .conversation-thread-top .conversation-source-error { grid-column: 1 / -1; padding: 0 14px 6px; }
/* The thread adapts to its own width (the contact column changes it). */
.conversations-page .conversation-thread { container-type: inline-size; container-name: cvthread; }
@container cvthread (max-width: 760px) {
}
@container cvthread (max-width: 470px) {
  #conversationReplyCount { display: none; }
  .conversation-tool-button > span:not(.sr-only) { display: none; }
  .conversation-thread-top { grid-template-columns: minmax(0, 1fr) !important; }
}
.conversations-page .conversation-thread-actions .conversation-control-button, .conversations-page .conversation-thread-actions .conversation-tag-picker > button { padding: 0 9px; }
@container cvthread (max-width: 640px) {
  .conversation-thread-actions .conversation-control-button, .conversation-thread-actions .conversation-tag-picker > button { padding: 0 7px !important; }
  .conversation-assignment-note::before { content: none !important; }
}
.conversations-page .conversation-row-preview-out { display: inline-block; margin-right: 4px; color: #a2a18a; font-weight: 700; }

/* --- Mobile: queue and conversation are separate screens, like a phone chat app --- */
.conversations-page .conversation-thread-back, .conversations-page .conversation-details-mobile-head { display: none; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .content:has(> .conversations-page) { padding: 0; }
  .conversations-page { display: flex; height: calc(100dvh - var(--cv-topbar, 57px)); min-height: 0; flex-direction: column; }
  .conversations-page .conversation-workspace, .conversations-page .conversation-workspace.has-conversation-details { display: block; flex: 1 1 auto; height: auto; min-height: 0; overflow: hidden; border: 0; border-radius: 0; box-shadow: none; }
  .conversations-page .conversation-inbox-panel { height: 100%; max-height: none; min-height: 0; border: 0; }
  .conversations-page .conversation-thread { display: none; }
  .conversations-page .conversation-workspace.has-selected-conversation .conversation-inbox-panel { display: none; }
  .conversations-page .conversation-workspace.has-selected-conversation .conversation-thread { position: fixed; z-index: 60; inset: 0; display: grid; height: var(--cv-vh, 100dvh); min-height: 0; border: 0; border-radius: 0; animation: cv-screen-in .18s ease-out; }
  .conversations-page .conversation-workspace.has-selected-conversation .conversation-details-panel:not([hidden]) { position: fixed; z-index: 61; inset: 0; display: flex; max-height: none; height: var(--cv-vh, 100dvh); padding-bottom: env(safe-area-inset-bottom); border: 0; background: #fff; animation: cv-screen-in .18s ease-out; }
  .conversations-page .conversation-details-mobile-head { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: env(safe-area-inset-top) 12px 0 4px; border-bottom: 1px solid var(--cv-line); background: #fff; font-size: calc(15px * var(--cv-z)); }
  .conversations-page .conversation-thread-back { display: inline-grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #403f1e; cursor: pointer; }
  .conversations-page .conversation-thread-back:active { background: rgba(54, 55, 11, .08); }
  .conversations-page .conversation-thread-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .conversations-page .conversation-workspace .conversation-thread-top { grid-template-columns: auto minmax(0, 1fr) auto !important; padding-top: env(safe-area-inset-top); }
  .conversations-page .conversation-workspace .conversation-thread-top > .conversation-thread-back { grid-column: 1; grid-row: 1; margin-left: 4px; }
  .conversations-page .conversation-workspace .conversation-thread-top > .conversation-thread-head { grid-column: 2; grid-row: 1; padding-left: 2px; }
  .conversations-page .conversation-workspace .conversation-thread-top .conversation-thread-actions { flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
  .conversations-page .conversation-workspace .conversation-thread-top .conversation-thread-actions > * { flex: 0 0 auto; }
  .conversations-page .conversation-composer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  /* Finger-sized, and 16px text so a phone does not zoom in on focus. */
  .conversations-page .conversation-workspace .conversation-thread-actions .conversation-control-button, .conversations-page .conversation-workspace .conversation-thread-actions .conversation-tag-picker > button { min-height: 36px; }
  .conversations-page .conversation-list-footer .table-action { min-width: 38px; min-height: 36px; height: 36px; }
  .conversations-page .conversation-composer textarea, .conversations-page .conversation-search input { font-size: 16px; }
  .conversations-page .conversation-row-shell { -webkit-touch-callout: none; user-select: none; }
  .conversation-context-menu { max-width: calc(100vw - 16px); }
  .conversation-context-menu [role="menuitem"] { min-height: 42px; }
}
/* Where there is no right-click: the row's options button, and no typing hint for a key that is not there. */
.conversations-page .conversation-row-more { display: none; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px), (pointer: coarse) {
  .conversations-page .conversation-row-more { display: inline-grid; flex: 0 0 auto; width: 36px; height: 30px; margin-left: auto; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--cv-ink-2); background: transparent; font: inherit; font-size: 18px; line-height: 1; }
  .conversations-page .conversation-row-more:active { background: rgba(54, 55, 11, .08); }
  .conversations-page .conversation-composer-hint { display: none; }
}
@keyframes cv-screen-in { from { opacity: .4; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .conversations-page .conversation-thread, .conversations-page .conversation-details-panel { animation: none !important; } }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .conversations-page .conversation-workspace .conversation-thread-head { min-width: 0; gap: 8px; }
  .conversations-page .conversation-workspace .conversation-thread-head .conversation-status-pill { display: none; }
  .conversations-page .conversation-workspace .conversation-thread-person { flex: 1 1 auto; min-width: 0; }
  .conversations-page .conversation-workspace .conversation-thread-route { display: none; }
  .conversations-page .conversation-workspace .conversation-thread-person .conversation-contact-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}


.conversations-page .conversation-source-dropup { position: relative; flex: 0 1 auto; min-width: 0; }
.conversations-page .conversation-source-dropup > summary { display: flex; align-items: center; gap: 6px; max-width: 190px; height: 28px; padding: 0 9px; overflow: hidden; border: 1px solid var(--cv-line); border-radius: 7px; color: var(--cv-ink-2); background: #fff; font-size: calc(12px * var(--cv-z)); font-weight: 650; white-space: nowrap; text-overflow: ellipsis; list-style: none; cursor: pointer; }
.conversations-page .conversation-source-dropup > summary::-webkit-details-marker { display: none; }
.conversations-page .conversation-source-dropup > summary::after { flex: none; width: 0; height: 0; margin-top: -4px; border: 4px solid transparent; border-bottom-color: currentColor; content: ''; }
.conversations-page .conversation-source-dropup.is-unset > summary { border-color: #ecd9b2; color: #8a5a12; background: var(--cv-warn-soft); }
.conversations-page .conversation-source-dropup[data-disabled] > summary { opacity: .6; pointer-events: none; }
.conversations-page .conversation-source-dropup > [role="menu"] { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30; display: grid; min-width: 190px; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid var(--cv-line); border-radius: 9px; background: #fff; box-shadow: 0 10px 28px rgba(34, 36, 14, .16); }
.conversations-page .conversation-source-dropup [role="menuitemradio"] { padding: 7px 10px; border: 0; border-radius: 6px; color: var(--cv-ink-2); background: transparent; font: inherit; font-size: calc(12px * var(--cv-z)); text-align: left; white-space: nowrap; cursor: pointer; }
.conversations-page .conversation-source-dropup [role="menuitemradio"]:hover, .conversations-page .conversation-source-dropup [aria-checked="true"] { color: var(--cv-brand-ink); background: #f7f7f1; }
.conversations-page .conversation-source-dropup [aria-checked="true"] { font-weight: 700; }
/* ===== Section tab strips and toolbars: never clipped, compact on phones ===== */
.dashboard-report-tabs { justify-content: safe center; }
.dashboard-report-tab, .automation-workspace-tabs > button, .intelligence-filter { flex: 0 0 auto; white-space: nowrap; }

/* Inteligência: one slim segmented pill, tools share the rest of the row */
.intelligence-controls { align-items: center; flex-wrap: wrap; }
.intelligence-filters { display: inline-flex !important; flex: 0 1 auto; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.intelligence-filters::-webkit-scrollbar { display: none; }
.intelligence-filter { min-height: 34px; padding-inline: 12px; }
.intelligence-tools { flex: 1 1 420px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.intelligence-tools .intelligence-search-wrap { flex: 1 1 180px; width: auto; }
.intelligence-tools .intelligence-select-wrap { flex: 0 0 auto; width: auto; }

@media (max-width: 760px) {
  .dashboard-report-tabs { justify-content: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 8px; }
  .dashboard-report-tabs::-webkit-scrollbar { display: none; }

  .automation-workspace-toolbar { grid-template-columns: auto minmax(0, 1fr) !important; }
  .automation-workspace-toolbar > .automation-workspace-tabs { grid-column: 1 / -1 !important; grid-row: 1 !important; width: fit-content !important; max-width: 100%; justify-self: center !important; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .automation-workspace-toolbar > .automation-workspace-refresh { grid-column: 1 !important; grid-row: 2 !important; }
  .automation-workspace-toolbar > .automation-primary-action, .automation-workspace-toolbar > .automation-view-only { grid-column: 2 !important; grid-row: 2 !important; justify-self: end; }
  .automation-workspace-tabs::-webkit-scrollbar { display: none; }
  .automation-workspace-tabs > button { flex: 0 0 auto; justify-content: center; }

  .intelligence-panel-head { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
  .intelligence-total-count { justify-self: end; text-align: right; }
  .intelligence-panel-leading { grid-column: 1; grid-row: 1; }
  .intelligence-total-count { grid-column: 2; grid-row: 1; }
  .intelligence-panel-actions { grid-row: 2; justify-self: stretch; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .intelligence-panel-actions > * { width: 100%; justify-content: center; }
  .intelligence-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .intelligence-filters { display: flex !important; width: 100%; }
  .intelligence-filter { flex: 1 0 auto; justify-content: center; min-height: 34px; gap: 5px; padding-inline: 8px; font-size: calc(11.5px * var(--portal-text-scale)); }
  .intelligence-tools { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; flex: none; }
  .intelligence-tools .intelligence-search-wrap { grid-column: 1 / -1; width: 100%; }
  .intelligence-tools .intelligence-select-wrap { min-width: 0; padding-inline: 12px 10px; }
  .intelligence-tools .intelligence-select-wrap > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .intelligence-tools .intelligence-select-wrap select { flex: 1; min-width: 0; max-width: none; width: 100%; }
  .intelligence-tools .intelligence-refresh span { display: none; }

  .contact-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .contact-toolbar-actions > * { width: 100%; justify-content: center; }
  .contact-toolbar-actions > .contact-create-button { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar { justify-content: space-between; }
  .topbar-context { flex: 0 1 auto; min-width: 0; overflow: hidden; }
  .topbar-actions { flex: 0 0 auto; }
  #currentSectionLabel { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .topbar-date { flex: 0 0 auto; margin-inline: auto; white-space: nowrap; }
}

/* Inteligência record rows: the title always shares the first row with its icon */
@media (max-width: 1199px) {
  .intelligence-record-toggle { grid-template-columns: 27px minmax(0, 1fr) auto auto auto 8px !important; }
  .intelligence-record-title { grid-column: auto !important; grid-row: auto !important; }
  .intelligence-record-source, .intelligence-record-tag { display: none !important; }
  .intelligence-record-category { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 760px) {
  .intelligence-record-toggle { grid-template-columns: 24px minmax(0, 1fr) auto 8px !important; gap: 8px; }
  .intelligence-record-category, .intelligence-record-date { display: none !important; }
  .intelligence-record-labels { min-width: 0; justify-content: flex-end; }
}

/* Narrow desktop/tablet: keep the breadcrumb and the date on one line */
@media (min-width: 761px) and (max-width: 1180px) {
  #workspaceName, .topbar-context .context-divider { display: none; }
  .topbar-context, .topbar-date { flex: 0 0 auto; white-space: nowrap; }
  .topbar-date-long { display: none; }
  .topbar-date-short { display: inline; }
  .topbar-date { margin-inline: auto; }
  .topbar-actions { margin-left: 0; }
}
@media (max-width: 1199px) {
  .intelligence-record-toggle { grid-template-columns: 27px minmax(120px, 1fr) auto auto 8px !important; }
  .intelligence-record-category { display: none !important; }
  .intelligence-record-labels .intelligence-type-badge { display: none; }
}
@media (max-width: 760px) {
  .intelligence-record-toggle { grid-template-columns: 24px minmax(0, 1fr) auto 8px !important; }
}

.automation-run-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: 6px; }
.automation-run-view { min-height: 32px; padding: 0 12px; border: 1px solid #d8e5de; border-radius: 8px; color: #564e23; background: #f7faf8; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 730; cursor: pointer; }
.automation-run-view:hover { border-color: #b9d4c7; background: #eff7f1; }
.automation-run-delete { min-height: 32px; padding: 0 12px; border: 1px solid #ead8d3; border-radius: 8px; color: #986157; background: #fffaf8; font: inherit; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; }
.automation-run-delete:hover:not(:disabled) { border-color: #d9bdb5; color: #814c43; background: #fff4f0; }
.automation-run-delete:disabled { opacity: .55; cursor: not-allowed; }
.broadcast-detail-footer .automation-run-delete { min-height: 34px; padding: 0 11px; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-run-detail-dialog .automation-run-detail-shell { min-height: 100%; }
.automation-run-detail-dialog .automation-run-detail-metrics { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; padding: 10px 18px; }
.automation-run-channel-metrics { display: grid; gap: 6px; }
.automation-run-channel-metrics h3 { margin: 0; color: #6c817a; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; }
.automation-run-channel-metrics > div { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; }
.automation-run-detail-dialog .automation-run-channel-metrics .broadcast-detail-metric { min-height: 54px; padding: 8px 10px; }
.automation-run-detail-dialog .broadcast-detail-result-note { margin: 0; padding: 4px 20px 12px; }
.automation-run-recipient-section { margin: 0 18px 16px; }
.automation-run-recipient-list { display: grid; max-height: 470px; gap: 9px; overflow: auto; padding: 12px; }
.automation-run-recipient { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #e5ece7; border-radius: 10px; background: #fff; }
.automation-run-recipient > header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.automation-run-recipient > header > span { display: grid; min-width: 0; gap: 3px; }
.automation-run-recipient > header strong { overflow: hidden; color: #5f5e3f; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.automation-run-recipient > header small, .automation-run-recipient > header em { color: #918a84; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-style: normal; }
.automation-run-step { display: grid; gap: 5px; padding: 8px 10px; border-radius: 8px; background: #f7f9f7; }
.automation-run-step > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; color: #71837d; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-run-step > header strong { color: #4f7064; font-weight: 730; }
.automation-run-step > p { margin: 0; color: #71817c; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.automation-run-detail-note { color: #8b9691; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.automation-run-detail-events { color: #5f746e; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-run-detail-events summary { width: fit-content; color: #716352; cursor: pointer; font-weight: 700; }
.automation-run-detail-events > div { display: grid; gap: 5px; margin-top: 5px; padding: 7px 9px; border-radius: 7px; background: #fff; }
.automation-run-detail-events p { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 8px; margin: 0; color: #786d64; line-height: 1.4; }
.automation-run-detail-events p strong { color: #62594b; font-size: inherit; }
.automation-run-detail-events p time, .automation-run-detail-events p small { color: #918a84; font-size: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-run-detail-events p small { grid-column: 1 / -1; overflow-wrap: anywhere; }
.automation-run-recipient > header small { overflow-wrap: anywhere; }
.automation-run-detail-activity { margin: 0 18px 12px; padding: 0 2px 10px; border-bottom: 1px solid #e7eeea; color: #7b7660; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.automation-run-detail-activity summary { width: fit-content; color: #716352; cursor: pointer; font-weight: 700; }
.automation-run-detail-activity > div { display: grid; grid-template-columns: 130px minmax(100px,.6fr) minmax(0,1fr); gap: 8px; padding: 8px 9px; border-bottom: 1px solid #edf1ee; background: #fff; }
.automation-run-detail-activity time, .automation-run-detail-activity span { color: #918a84; }
@media (max-width: 760px) {
  .automation-run-channel-metrics > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .automation-run-recipient-section { margin-inline: 8px; }
  .automation-run-recipient-list { max-height: 420px; padding: 8px; }
  .automation-run-detail-activity { margin-inline: 10px; }
  .automation-run-detail-activity > div { grid-template-columns: minmax(0,1fr); gap: 3px; }
}

/* Composer modals (Disparos · Novo disparo, Automações · Nova automação).
   One visual language for both wizards: identity + progress in the header,
   a single card per step, review in three equal columns with the cost as the summary's last line. */
dialog.broadcast-composer-dialog, dialog.automation-editor-dialog.is-wizard {
  --cm-ink: #38391b; --cm-muted: #84826b; --cm-faint: #a6a493; --cm-line: #ecebe3; --cm-soft: #f9f9f5;
  --cm-brand: var(--brand-blue, #969900); --cm-brand-deep: #6d7008; --cm-brand-soft: #fbfce7;
  --cm-fs-xs: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  --cm-fs-sm: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  --cm-fs-md: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  --cm-fs-base: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  width: min(1060px, calc(100vw - 32px)); height: auto; min-height: 0; max-height: calc(100dvh - 32px); align-self: center;
  border: 1px solid #e6e5d9; border-radius: 18px; color: var(--cm-ink); background: var(--cm-soft);
  box-shadow: 0 32px 90px rgba(29, 30, 4, .32);
}
dialog.automation-editor-dialog.is-wizard[open] { display: flex; flex-direction: column; }
dialog.automation-editor-dialog.is-wizard > form { flex: 0 1 auto; height: auto; min-height: 0; max-height: calc(100dvh - 32px); }
/* Both wizards size to the current step and scroll only when it is taller than the screen. */
dialog.broadcast-composer-dialog .broadcast-composer-scroll, dialog.automation-editor-dialog.is-wizard .automation-editor-scroll { flex: 0 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
dialog.broadcast-composer-dialog .broadcast-composer-form { width: min(1000px, 100%); }

/* Header: identity on the left, progress in the middle, close on the right. */
dialog.broadcast-composer-dialog .broadcast-composer-progress-row,
dialog.automation-editor-dialog.is-wizard .automation-editor-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--cm-line); background: #fff;
}
dialog.broadcast-composer-dialog .broadcast-composer-head-left { display: flex; min-width: 0; align-items: center; gap: 12px; }
dialog.broadcast-composer-dialog .broadcast-composer-close,
dialog.automation-editor-dialog.is-wizard .automation-editor-head > button { justify-self: end; }
.broadcast-composer-identity, .automation-editor-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.broadcast-composer-channel-icon, .automation-editor-icon {
  display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px;
  color: var(--cm-brand-deep); background: var(--cm-brand-soft);
}
.broadcast-composer-channel-icon svg, .automation-editor-icon svg { width: 17px; height: 17px; }
.broadcast-composer-identity > div, .automation-editor-identity > div { display: grid; min-width: 0; gap: 1px; }
.broadcast-composer-identity small, dialog.automation-editor-dialog.is-wizard .automation-editor-head .eyebrow {
  margin: 0; color: var(--cm-faint); font-size: var(--cm-fs-xs); font-weight: 760; letter-spacing: .12em;
}
.broadcast-composer-identity strong, dialog.automation-editor-dialog.is-wizard .automation-editor-head h2 {
  overflow: hidden; margin: 0; color: var(--cm-ink); font-size: var(--cm-fs-base); font-weight: 740; letter-spacing: -.01em;
  text-overflow: ellipsis; white-space: nowrap;
}
dialog.broadcast-composer-dialog .broadcast-template-action { min-height: 32px; padding-inline: 10px; font-size: var(--cm-fs-xs); }

dialog.broadcast-composer-dialog .broadcast-composer-progress,
.automation-editor-progress { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0; border: 0; background: transparent; }
dialog.broadcast-composer-dialog .broadcast-composer-progress > i, .automation-editor-progress > i { width: clamp(14px, 3vw, 38px); height: 2px; border-radius: 2px; background: var(--cm-line); }
dialog.broadcast-composer-dialog .broadcast-composer-progress button, .automation-editor-progress button {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px 5px 5px; border: 0; border-radius: 99px;
  color: var(--cm-faint); background: transparent; font: inherit; cursor: pointer;
}
dialog.broadcast-composer-dialog .broadcast-composer-progress button span, .automation-editor-progress button span {
  display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--cm-line); border-radius: 50%;
  color: var(--cm-faint); background: #fff; font-size: var(--cm-fs-xs); font-weight: 780; box-shadow: none;
}
dialog.broadcast-composer-dialog .broadcast-composer-progress button strong, .automation-editor-progress button strong { font-size: var(--cm-fs-sm); font-weight: 700; white-space: nowrap; }
dialog.broadcast-composer-dialog .broadcast-composer-progress button[aria-current="step"], .automation-editor-progress button[aria-current="step"] { color: var(--cm-ink); background: var(--cm-brand-soft); }
dialog.broadcast-composer-dialog .broadcast-composer-progress button[aria-current="step"] span, .automation-editor-progress button[aria-current="step"] span { border-color: var(--cm-brand); color: #fff; background: var(--cm-brand); box-shadow: none; }
dialog.broadcast-composer-dialog .broadcast-composer-progress button.is-complete span, .automation-editor-progress button.is-complete span { border-color: #f0f1b7; color: var(--cm-brand-deep); background: var(--cm-brand-soft); }
dialog.broadcast-composer-dialog .broadcast-composer-progress button.is-complete, .automation-editor-progress button.is-complete { color: var(--cm-muted); }
dialog.broadcast-composer-dialog .broadcast-composer-progress button:not(:disabled):not([aria-current]):hover, .automation-editor-progress button:not([aria-current]):hover { color: var(--cm-ink); }
dialog.broadcast-composer-dialog .broadcast-composer-close, dialog.automation-editor-dialog.is-wizard .automation-editor-head > button {
  display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--cm-line); border-radius: 10px;
  color: var(--cm-muted); background: #fff; font-size: 18px; cursor: pointer;
}
dialog.broadcast-composer-dialog .broadcast-composer-close:hover, dialog.automation-editor-dialog.is-wizard .automation-editor-head > button:hover { color: var(--cm-ink); background: var(--cm-soft); }

/* Body */
dialog.broadcast-composer-dialog .broadcast-composer-scroll, dialog.automation-editor-dialog.is-wizard .automation-editor-scroll { padding: 22px 24px 28px; background: var(--cm-soft); }
dialog.broadcast-composer-dialog .broadcast-composer-step { padding: 24px 26px; border: 1px solid var(--cm-line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(42, 43, 14, .04), 0 10px 30px rgba(42, 43, 14, .04); }
dialog.broadcast-composer-dialog .broadcast-step-intro { margin-bottom: 20px; }
dialog.broadcast-composer-dialog .broadcast-step-intro h3, .automation-wizard-intro h3 { margin: 0; color: var(--cm-ink); font-size: calc(18px * var(--portal-text-scale)); font-weight: 760; letter-spacing: -.03em; }
dialog.broadcast-composer-dialog .broadcast-step-intro p:last-child, .automation-wizard-intro p { margin: 4px 0 0; color: var(--cm-muted); font-size: var(--cm-fs-sm); line-height: 1.5; }
dialog.broadcast-composer-dialog [data-broadcast-step-panel="3"] .broadcast-step-actions { position: static; background: transparent; }
dialog.broadcast-composer-dialog .broadcast-step-actions {
  position: sticky; bottom: -28px; z-index: 5; margin: 22px -26px -24px; padding: 14px 26px; border-top: 1px solid var(--cm-line);
  border-radius: 0 0 16px 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
}
dialog.broadcast-composer-dialog .broadcast-composer-footer, dialog.automation-editor-dialog.is-wizard .automation-editor-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 20px; border-top: 1px solid var(--cm-line); background: #fff;
}
dialog.broadcast-composer-dialog .broadcast-composer-footer > span, .automation-footer-hint { display: inline-flex; align-items: center; gap: 7px; color: var(--cm-faint); font-size: var(--cm-fs-xs); }

/* Review (step 3 of Disparos): three equal-height columns — summary ending in the cost, content, when to send */
dialog.broadcast-composer-dialog .broadcast-review-layout.is-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
dialog.broadcast-composer-dialog .broadcast-review-panel {
  display: flex; flex-direction: column; gap: 12px; min-width: 0; grid-row: auto; padding: 16px; border: 1px solid var(--cm-line); border-radius: 14px; background: #fff;
}
dialog.broadcast-composer-dialog .broadcast-review-head { display: flex; align-items: center; gap: 12px; padding: 0 0 4px; border: 0; background: transparent; }
dialog.broadcast-composer-dialog .broadcast-review-check { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; color: #fff; background: #1f9d6b; font-size: 15px; }
dialog.broadcast-composer-dialog .broadcast-review-head strong { color: var(--cm-ink); font-size: var(--cm-fs-base); }
dialog.broadcast-composer-dialog .broadcast-review-head p { margin: 2px 0 0; color: var(--cm-muted); font-size: var(--cm-fs-sm); white-space: normal; overflow-wrap: anywhere; }
dialog.broadcast-composer-dialog .broadcast-review-message { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; padding: 0; border: 0; background: transparent; }
dialog.broadcast-composer-dialog .broadcast-review-message > span, dialog.broadcast-composer-dialog .broadcast-review-options > .eyebrow { margin: 0; color: var(--cm-faint); font-size: var(--cm-fs-xs); font-weight: 780; letter-spacing: .1em; }
dialog.broadcast-composer-dialog .broadcast-review-message p {
  width: fit-content; max-width: 100%; padding: 12px 14px; border-radius: 14px 14px 14px 4px;
  color: var(--cm-ink); background: #f5f5ee; font-size: var(--cm-fs-md); line-height: 1.6;
}
dialog.broadcast-composer-dialog .broadcast-review-sms-note { margin-top: auto; color: var(--cm-faint); font-size: var(--cm-fs-xs); }
dialog.broadcast-composer-dialog .broadcast-review-message .broadcast-email-review-frame { flex: 1 1 auto; height: auto; min-height: 340px; border-color: var(--cm-line); }
dialog.broadcast-composer-dialog .broadcast-review-options { gap: 10px; }
dialog.broadcast-composer-dialog .broadcast-review-options .broadcast-schedule-row {
  grid-template-columns: repeat(2, minmax(0, 1fr)); justify-self: center; width: min(100%, 280px);
}
dialog.broadcast-composer-dialog .broadcast-review-options .broadcast-schedule-row label { justify-items: center; text-align: center; }
dialog.broadcast-composer-dialog .broadcast-review-options .broadcast-schedule-row label > input { width: 100%; min-width: 0; text-align: center; }
dialog.broadcast-composer-dialog .broadcast-review-actions { margin-top: auto; }
dialog.broadcast-composer-dialog .broadcast-review-actions:empty { display: none; }
dialog.broadcast-composer-dialog .broadcast-action-feedback:empty { display: none; }
dialog.broadcast-composer-dialog .broadcast-confirm-field, dialog.automation-editor-dialog.is-wizard .broadcast-confirm-field {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border: 1px solid var(--cm-line); border-radius: 10px;
  color: var(--cm-muted); background: var(--cm-soft); font-size: var(--cm-fs-xs); font-weight: 620; line-height: 1.5; cursor: pointer;
}
dialog.broadcast-composer-dialog .broadcast-confirm-field:has(input:checked), dialog.automation-editor-dialog.is-wizard .broadcast-confirm-field:has(input:checked) { border-color: #eef09c; color: var(--cm-ink); background: var(--cm-brand-soft); }
dialog.automation-editor-dialog.is-wizard .broadcast-confirm-field input, dialog.broadcast-composer-dialog .broadcast-confirm-field input { width: 16px; height: 16px; min-height: auto; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--cm-brand); }
dialog.broadcast-composer-dialog .broadcast-review-actions .campaign-action-primary { min-height: 44px; border-color: var(--brand-blue-button, var(--cm-brand)); color: #fff; background: var(--brand-blue-button, var(--cm-brand)); font-weight: 740; }
dialog.broadcast-composer-dialog .broadcast-review-actions .campaign-action-primary:hover:not(:disabled) { border-color: var(--brand-blue-button-hover, var(--brand-blue-hover, #8b9000)); background: var(--brand-blue-button-hover, var(--brand-blue-hover, #8b9000)); }

/* Usage summary lines; the estimated total closes the list (shared by both wizards) */
.send-cost-rows { display: grid; margin: 0; }
.send-cost-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f4f4ed; }
.send-cost-rows dt { color: var(--cm-muted); font-size: var(--cm-fs-sm); }
.send-cost-rows dd { min-width: 0; margin: 0; color: var(--cm-ink); font-size: var(--cm-fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.send-cost-rows > div.is-total { border-top: 1px solid var(--cm-line); border-bottom: 0; margin-top: 2px; padding-top: 10px; }
.send-cost-rows > div.is-total dt { color: var(--cm-ink); font-weight: 720; }
.send-cost-rows > div.is-total dd { color: var(--cm-ink); font-weight: 780; }
.send-cost-note { margin: 0; color: var(--cm-faint); font-size: var(--cm-fs-xs); line-height: 1.5; }

/* Automation wizard */
dialog.automation-editor-dialog.is-wizard .automation-editor-main { display: block; width: min(1000px, 100%); margin: 0 auto; }
.automation-wizard-panel { display: grid; gap: 16px; }
.automation-wizard-panel[hidden] { display: none !important; }
.automation-wizard-intro { padding: 2px 2px 0; }
dialog.automation-editor-dialog.is-wizard .automation-builder-grid.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
dialog.automation-editor-dialog.is-wizard .automation-flow-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
dialog.automation-editor-dialog.is-wizard .automation-builder-section { padding: 20px; border: 1px solid var(--cm-line); border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(42, 43, 14, .04), 0 10px 30px rgba(42, 43, 14, .04); }
dialog.automation-editor-dialog.is-wizard .automation-builder-heading { align-items: center; margin-bottom: 8px; }
dialog.automation-editor-dialog.is-wizard .automation-builder-heading > span { width: 34px; height: 34px; border: 0; border-radius: 10px; color: var(--cm-brand-deep); background: var(--cm-brand-soft); }
dialog.automation-editor-dialog.is-wizard .automation-builder-heading > span svg { width: 16px; height: 16px; }
dialog.automation-editor-dialog.is-wizard .automation-builder-heading h3 { color: var(--cm-ink); font-size: var(--cm-fs-base); }
dialog.automation-editor-dialog.is-wizard .automation-builder-heading p { color: var(--cm-muted); font-size: var(--cm-fs-xs); }
dialog.automation-editor-dialog.is-wizard .automation-editor-fields { gap: 14px; }
dialog.automation-editor-dialog.is-wizard .automation-editor-fields label, dialog.automation-editor-dialog.is-wizard .automation-step-fields label { color: #69664d; font-size: var(--cm-fs-sm); font-weight: 700; }
dialog.automation-editor-dialog.is-wizard .automation-editor-fields :is(input, select),
dialog.automation-editor-dialog.is-wizard .automation-step-fields :is(input, select, textarea) { min-height: 42px; border-color: #e7e7db; border-radius: 10px; color: var(--cm-ink); font-size: var(--cm-fs-base); font-weight: 500; }
dialog.automation-editor-dialog.is-wizard .automation-editor-fields :is(input, select):focus,
dialog.automation-editor-dialog.is-wizard .automation-step-fields :is(input, select, textarea):focus { border-color: var(--cm-brand); outline: 3px solid rgba(150, 153, 0, .15); }

/* Flow: numbered cards joined by a rail */
dialog.automation-editor-dialog.is-wizard .automation-step-list { position: relative; gap: 14px; }
dialog.automation-editor-dialog.is-wizard .automation-step { position: relative; overflow: visible; border-color: var(--cm-line); border-radius: 14px; }
dialog.automation-editor-dialog.is-wizard .automation-step + .automation-step::before { position: absolute; top: -15px; left: 28px; width: 2px; height: 14px; background: #e9eaca; content: ""; }
dialog.automation-editor-dialog.is-wizard .automation-step > header { border-radius: 14px 14px 0 0; border-bottom-color: var(--cm-line); background: var(--cm-soft); }
dialog.automation-editor-dialog.is-wizard .automation-step-type { gap: 9px; color: var(--cm-ink); font-size: var(--cm-fs-sm); }
dialog.automation-editor-dialog.is-wizard .automation-step-type svg { box-sizing: content-box; width: 14px; height: 14px; padding: 6px; border-radius: 8px; color: var(--cm-brand-deep); background: var(--cm-brand-soft); }
dialog.automation-editor-dialog.is-wizard .automation-empty-step { display: grid; gap: 4px; justify-items: center; padding: 30px 16px; border: 1.5px dashed #e3e3d2; border-radius: 14px; color: var(--cm-muted); background: var(--cm-soft); font-size: var(--cm-fs-sm); text-align: center; }
dialog.automation-editor-dialog.is-wizard .automation-empty-step strong { color: var(--cm-ink); font-size: var(--cm-fs-md); }
dialog.automation-editor-dialog.is-wizard .automation-add-step { gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cm-line); }
dialog.automation-editor-dialog.is-wizard .automation-add-step > span { color: var(--cm-faint); font-size: var(--cm-fs-xs); letter-spacing: .08em; text-transform: uppercase; }
dialog.automation-editor-dialog.is-wizard .automation-add-step button { min-height: 38px; padding: 0 13px; border-color: var(--cm-line); border-radius: 99px; color: var(--cm-ink); font-size: var(--cm-fs-sm); }
dialog.automation-editor-dialog.is-wizard .automation-add-step button:not(:disabled):hover { border-color: #eef09c; color: var(--cm-brand-deep); background: var(--cm-brand-soft); }

/* Review (step 4 of Automações): three equal-height columns — summary, flow, audience and cost */
dialog.automation-editor-dialog.is-wizard .automation-editor-aside { position: sticky; top: 0; gap: 12px; }
dialog.automation-editor-dialog.is-wizard .automation-review-card { padding: 16px; border-color: var(--cm-line); border-radius: 14px; background: #fff; }
dialog.automation-editor-dialog.is-wizard .automation-review-card > strong { color: var(--cm-ink); font-size: calc(30px * var(--portal-text-scale)); }
dialog.automation-editor-dialog.is-wizard .automation-review-card > button { min-height: 38px; border-color: var(--cm-line); border-radius: 10px; color: var(--cm-ink); }
.automation-review-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.automation-review-columns > .automation-review-summary { display: contents; }
dialog.automation-editor-dialog.is-wizard .automation-review-columns .automation-builder-section { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border-radius: 14px; }
.automation-review-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.automation-review-panel-head > span, .automation-review-row > span { color: var(--cm-faint); font-size: var(--cm-fs-xs); font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.automation-review-rows { display: grid; }
.automation-review-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid #f4f4ed; }
.automation-review-row:last-child { border-bottom: 0; }
.automation-review-row > span { grid-column: 1; }
.automation-review-row > strong { grid-column: 1; min-width: 0; color: var(--cm-ink); font-size: var(--cm-fs-md); font-weight: 680; overflow-wrap: anywhere; }
.automation-review-row > button { grid-column: 2; grid-row: 1 / span 2; }
.automation-review-row .campaign-panel-link, .automation-review-panel-head .campaign-panel-link { min-height: 28px; padding: 0 9px; font-size: var(--cm-fs-xs); }
.automation-review-flow { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: automation-flow; }
.automation-review-flow li { position: relative; display: grid; gap: 2px; padding: 10px 12px 10px 44px; border: 1px solid var(--cm-line); border-radius: 12px; background: var(--cm-soft); counter-increment: automation-flow; }
.automation-review-flow li::before { position: absolute; top: 50%; left: 11px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: var(--cm-brand-deep); background: var(--cm-brand-soft); content: counter(automation-flow); font-size: var(--cm-fs-xs); font-weight: 780; transform: translateY(-50%); }
.automation-review-flow li strong { color: var(--cm-ink); font-size: var(--cm-fs-sm); }
.automation-review-flow li small { color: var(--cm-muted); font-size: var(--cm-fs-xs); overflow-wrap: anywhere; }
.automation-review-empty { margin: 0; padding: 14px; border-radius: 12px; color: #9b5145; background: #fff2ee; font-size: var(--cm-fs-sm); }
.automation-review-audience { display: flex; align-items: baseline; gap: 8px; }
.automation-review-audience strong { color: var(--cm-ink); font-size: calc(22px * var(--portal-text-scale)); font-weight: 760; font-variant-numeric: tabular-nums; line-height: 1; }
.automation-review-audience span, #automationPreviewBreakdown small { color: var(--cm-muted); font-size: var(--cm-fs-xs); }
#automationCostCard { display: grid; gap: 6px; }
.automation-review-usage-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 4px; }
.automation-review-usage-actions > button { min-height: 38px; border: 1px solid var(--cm-line); border-radius: 10px; color: var(--cm-ink); background: #fff; font-size: var(--cm-fs-sm); font-weight: 700; cursor: pointer; }
.automation-review-usage-actions > button:hover:not(:disabled) { background: var(--cm-soft); }
.automation-review-usage-actions > button:disabled { opacity: .55; cursor: wait; }
dialog.automation-editor-dialog.is-wizard .automation-editor-error { margin: 0; padding: 10px 20px; border: 0; border-top: 1px solid #f0d9d3; border-radius: 0; }
.automation-footer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
dialog.automation-editor-dialog.is-wizard .automation-editor-footer button { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 16px; border-radius: 10px; font-size: var(--cm-fs-sm); font-weight: 700; }
dialog.automation-editor-dialog.is-wizard .automation-editor-footer button[hidden] { display: none; }
dialog.automation-editor-dialog.is-wizard .automation-editor-footer button svg { width: 14px; height: 14px; }
dialog.automation-editor-dialog.is-wizard .automation-editor-footer .contact-cancel-button { border: 0; color: var(--cm-muted); background: transparent; }
dialog.automation-editor-dialog.is-wizard .automation-editor-footer :is(.automation-save-draft, .automation-step-back) { border: 1px solid var(--cm-line); color: var(--cm-ink); background: #fff; }
dialog.automation-editor-dialog.is-wizard .automation-editor-footer .contact-save-button { border: 1px solid var(--brand-blue-button, var(--cm-brand)); color: #fff; background: var(--brand-blue-button, var(--cm-brand)); }
dialog.automation-editor-dialog.is-wizard .automation-editor-footer .contact-save-button:hover:not(:disabled) { border-color: var(--brand-blue-button-hover, var(--brand-blue-hover, #8b9000)); background: var(--brand-blue-button-hover, var(--brand-blue-hover, #8b9000)); }

@media (max-width: 980px) {
  dialog.broadcast-composer-dialog .broadcast-composer-progress-row, dialog.automation-editor-dialog.is-wizard .automation-editor-head { grid-template-columns: minmax(0, 1fr) auto; }
  dialog.broadcast-composer-dialog .broadcast-composer-progress, .automation-editor-progress { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  dialog.broadcast-composer-dialog .broadcast-review-layout.is-columns, .automation-review-columns, dialog.automation-editor-dialog.is-wizard .automation-flow-grid { grid-template-columns: minmax(0, 1fr); }
  dialog.automation-editor-dialog.is-wizard .automation-editor-aside { position: static; }
}
@media (max-width: 640px) {
  dialog.broadcast-composer-dialog, dialog.automation-editor-dialog.is-wizard { width: calc(100vw - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); border-radius: 14px; }
  dialog.broadcast-composer-dialog .broadcast-composer-progress-row, dialog.automation-editor-dialog.is-wizard .automation-editor-head { gap: 10px; padding: 12px 14px; }
  dialog.broadcast-composer-dialog .broadcast-composer-progress button strong, .automation-editor-progress button strong { display: none; }
  dialog.broadcast-composer-dialog .broadcast-composer-progress button[aria-current="step"] strong, .automation-editor-progress button[aria-current="step"] strong { display: inline; }
  dialog.broadcast-composer-dialog .broadcast-composer-scroll, dialog.automation-editor-dialog.is-wizard .automation-editor-scroll { padding: 14px; }
  dialog.broadcast-composer-dialog .broadcast-composer-step { padding: 18px 16px; }
  dialog.broadcast-composer-dialog .broadcast-step-actions { margin: 18px -16px -18px; padding: 12px 16px; }
  dialog.automation-editor-dialog.is-wizard .automation-builder-grid.is-two { grid-template-columns: minmax(0, 1fr); }
  dialog.automation-editor-dialog.is-wizard .automation-editor-footer { flex-direction: column; align-items: stretch; }
  .automation-footer-hint { justify-content: center; }
  .automation-footer-actions > button { flex: 1 1 auto; justify-content: center; }
}

.broadcast-history-row span.is-warning strong, .broadcast-history-row span.is-warning small { color: #b45309; }

/* Make selected recipients visible while preserving the dispatch composer layout. */
.broadcast-selected-contacts {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  margin: 3px 0 2px;
  padding: 10px 11px;
  border: 1px solid #e0dec7;
  border-radius: 10px;
  color: #58592f;
  background: #fafaf3;
}
.broadcast-selected-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.broadcast-selected-heading strong { color: #4a4b22; font-size: max(11px,calc(var(--cm-fs-sm) * var(--portal-text-scale))); font-weight: 740; }
.broadcast-selected-heading > span { flex: 0 0 auto; padding: 3px 8px; border: 1px solid #dddcbf; border-radius: 99px; color: #585827; background: #f4f3e6; font-size: max(10px,calc(var(--cm-fs-xs) * var(--portal-text-scale))); font-weight: 740; font-variant-numeric: tabular-nums; }
.broadcast-selected-empty { margin: 0; color: #858462; font-size: max(11px,calc(var(--cm-fs-xs) * var(--portal-text-scale))); line-height: 1.45; }
.broadcast-selected-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; max-height: 156px; overflow: auto; margin: 0; padding: 0; list-style: none; overscroll-behavior: contain; }
.broadcast-selected-list > li { display: flex; min-width: 0; min-height: 45px; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 7px 6px 10px; border: 1px solid #eae9db; border-radius: 8px; background: #fff; }
.broadcast-selected-identity { display: grid; min-width: 0; gap: 2px; }
.broadcast-selected-identity strong, .broadcast-selected-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.broadcast-selected-identity strong { color: #51522c; font-size: max(11px,calc(var(--cm-fs-xs) * var(--portal-text-scale))); font-weight: 700; }
.broadcast-selected-identity small { color: #838261; font-size: max(10px,calc(var(--cm-fs-xs) * .94 * var(--portal-text-scale))); }
.broadcast-selected-list button { display: inline-flex; min-height: 30px; flex: 0 0 auto; align-items: center; gap: 5px; padding: 0 7px; border: 1px solid #e6e5d6; border-radius: 7px; color: #747353; background: #fcfcf8; font: inherit; font-size: max(10px,calc(var(--cm-fs-xs) * var(--portal-text-scale))); font-weight: 680; cursor: pointer; }
.broadcast-selected-list button:hover { border-color: #eccbc5; color: #9b493f; background: #fff7f5; }
.broadcast-selected-list button:focus-visible { outline: 3px solid #e5e3af; outline-offset: 1px; }
.broadcast-composer-head-actions { display: flex; min-width: 0; align-items: center; justify-self: end; gap: 8px; }
dialog.broadcast-composer-dialog .broadcast-composer-head-actions .broadcast-template-action { position: static; display: inline-flex; width: auto; min-height: 34px; flex: 0 0 auto; align-items: center; gap: 6px; overflow: visible; padding: 0 10px; transform: none; font-size: var(--cm-fs-xs); white-space: nowrap; }
dialog.broadcast-composer-dialog .broadcast-composer-head-actions .broadcast-composer-close { justify-self: auto; }

@media (max-width: 640px) {
  .broadcast-selected-list { grid-template-columns: minmax(0,1fr); max-height: 164px; }
}

/* Conversas → Configurações (3D.23.3): one dialog, a section menu on the left (tabs on top on a
   phone) and the section's pane. Números and Bots draw with the .wa-manager look; Encaminhamento
   keeps its own form, which scrolls inside the pane. */
.cs-dialog { width: min(1120px,calc(100vw - 28px)); height: min(880px,calc(100dvh - 28px)); max-height: calc(100dvh - 28px); overflow: hidden; padding: 0; border: 1px solid #e5e6d9; border-radius: 20px; background: #fff; }
.cs-dialog::backdrop { backdrop-filter: none; }
.cs-shell { position: relative; display: grid; height: 100%; min-height: 0; grid-template-columns: 248px minmax(0,1fr); }
.cs-menu { display: flex; min-height: 0; flex-direction: column; gap: 14px; padding: 20px 12px; border-right: 1px solid #e5ece9; background: #f6f9f8; }
.cs-menu-head { padding: 0 44px 0 8px; }
.cs-menu-head .eyebrow { margin: 0 0 4px; color: #908576; font-size: calc(10px * var(--portal-text-scale)); font-weight: 760; letter-spacing: .13em; }
.cs-menu-head h2 { margin: 0; color: #3a3b1a; font-size: calc(19px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.03em; }
.cs-menu-items { display: grid; gap: 4px; }
.cs-menu-item { display: flex; width: 100%; min-width: 0; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: 11px; color: #5b5b37; background: none; font: inherit; text-align: left; cursor: pointer; transition: background .14s ease, border-color .14s ease; }
.cs-menu-item:hover { background: #edf3f1; }
.cs-menu-item.is-active { border-color: #eaebd2; background: #fff; box-shadow: 0 2px 10px rgba(44, 45, 22, .05); }
.cs-menu-item:focus-visible, .cs-close:focus-visible { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 2px; }
.cs-menu-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; color: #78715d; background: #e8efed; }
.cs-menu-item.is-active .cs-menu-icon { color: var(--brand-blue-ink, #fff); background: var(--brand-blue); }
.cs-menu-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cs-menu-copy { display: grid; min-width: 0; gap: 2px; }
.cs-menu-copy strong { color: #3d3d1c; font-size: calc(13px * var(--portal-text-scale)); font-weight: 720; }
.cs-menu-copy small { color: #938a82; font-size: calc(11px * var(--portal-text-scale)); line-height: 1.4; }
.cs-close { position: absolute; z-index: 2; top: 18px; left: 206px; display: grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid #e1e9e5; border-radius: 9px; color: #78715d; background: #fff; cursor: pointer; }
.cs-close:hover { border-color: #dbdbb0; color: #5c5e11; background: #fafaf2; }
.cs-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cs-pane { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.cs-pane[data-cs-pane="encaminhamento"] { overflow: hidden; background: #fafaf7; }
.cs-pane[data-cs-pane="encaminhamento"] .cs-section-host { height: 100%; }
.cs-section-host .wa-manager { min-height: 100%; align-content: start; }
.ai-bots-moved { margin: 6px 0 0; color: #776d5f; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .cs-dialog { width: calc(100vw - 14px); height: calc(100dvh - 14px); max-height: calc(100dvh - 14px); border-radius: 15px; }
  .cs-shell { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  .cs-menu { gap: 8px; padding: 12px 10px 8px; border-right: 0; border-bottom: 1px solid #e5ece9; }
  .cs-menu-head { padding: 0 44px 0 4px; }
  .cs-menu-items { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .cs-menu-item { width: auto; flex: 0 0 auto; align-items: center; padding: 7px 10px; }
  .cs-menu-copy small { display: none; }
  .cs-menu-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .cs-close { top: 10px; right: 10px; left: auto; }
}
/* Encaminhamento in the settings: its header like the Bots section's (.wa-head). */
.cs-pane .handoff-dialog-header { padding: 18px 22px 12px; border-bottom: 0; background: none; }
.cs-pane .handoff-dialog-title .eyebrow { color: #908576; font-size: var(--wa-t7, 9px); font-weight: 760; }
.cs-pane .handoff-dialog-title h2 { color: #3a3b1a; font-size: calc(19px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; }
.cs-pane .handoff-dialog-title > p:last-child { margin-top: 4px; color: #8f887d; }
/* The queue bar and team hours (handoff-queues.js), row 2 of the handoff form: the "Equipe" picker
   and its actions, a help line, then the queue's parts as tabs like the bot editor's (.bs-tabs). */
.handoff-queue-bar { display: grid; gap: 8px; padding: 0 22px; background: #fff; }
.handoff-queue-pick { display: inline-flex; align-items: center; gap: 8px; }
.handoff-queue-label { color: #908576; font-size: calc(11px * var(--portal-text-scale)); font-weight: 700; }
.handoff-queue-select { min-height: 32px; max-width: 260px; padding: 0 10px; border: 1px solid #dce6e2; border-radius: 8px; color: #40401e; background: #fff; font: inherit; font-size: calc(13px * var(--portal-text-scale)); font-weight: 650; }
.handoff-queue-name { color: #40401e; font-size: calc(13px * var(--portal-text-scale)); }
.handoff-queue-help { margin: 0; color: #8f887d; font-size: calc(12px * var(--portal-text-scale)); }
.handoff-queue-manage svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; }
.handoff-settings-form .handoff-view-tabs .bs-tab { font-size: var(--wa-t8, calc(12px * var(--portal-text-scale))); }
.handoff-queue-select:focus-visible, .handoff-view-tab:focus-visible { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 2px; }
.handoff-settings-note[hidden] { display: none; }
.handoff-alerts-off-note { margin: 10px 0 0; color: #987447; }
.handoff-queue-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.handoff-queue-inline, .handoff-queue-manage, .handoff-queue-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: #6a6649; font-size: calc(12px * var(--portal-text-scale)); }
.handoff-queue-inline input { min-width: 0; min-height: 30px; padding: 0 10px; border: 1px solid #dce6e2; border-radius: 8px; font: inherit; font-size: calc(12px * var(--portal-text-scale)); }
.handoff-queue-inline .conversation-dialog-submit { min-height: 30px; }
.table-action.is-danger { color: #a83a3a; }
.handoff-hours-empty { display: grid; justify-items: start; gap: 6px; padding: 16px; border: 1px dashed #d5e1dc; border-radius: 14px; color: #776d5f; background: #fcfcfb; font-size: calc(12px * var(--portal-text-scale)); }
.handoff-hours-empty strong { color: #40401e; }
.handoff-hours-zone { max-width: 420px; margin: 10px 0; }
.handoff-hours-days { display: grid; gap: 6px; }
.handoff-hours-day { display: grid; grid-template-columns: 130px 110px auto 110px minmax(0,1fr); align-items: center; gap: 8px; color: #676642; font-size: calc(12px * var(--portal-text-scale)); }
.handoff-hours-day input[type="time"] { min-height: 30px; padding: 0 8px; border: 1px solid #dce6e2; border-radius: 8px; font: inherit; }
.handoff-hours-day input[type="time"]:disabled { color: #bfbbb4; background: #f6f8f7; }
.handoff-hours-day-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 680; cursor: pointer; }
.handoff-hours-day.is-closed .handoff-hours-day-name span, .handoff-hours-day small { color: #93a39e; }
.handoff-holidays { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 0; list-style: none; }
.handoff-holidays li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border: 1px solid #e1ebe5; border-radius: 999px; color: #5f5d3c; font-size: calc(12px * var(--portal-text-scale)); }
.handoff-holidays .table-action { min-height: 22px; padding: 0 5px; border: 0; }
.handoff-holidays svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; }
.handoff-holiday-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.handoff-holiday-add input { min-height: 30px; padding: 0 8px; border: 1px solid #dce6e2; border-radius: 8px; font: inherit; }
.handoff-holiday-add svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -2px; }
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .handoff-queue-bar { padding: 0 12px; }
  .handoff-hours-day { grid-template-columns: minmax(0,1fr) auto auto auto; }
  .handoff-hours-day-name { grid-column: 1 / -1; }
  .handoff-hours-day small { display: none; }
}
/* Conversas → Configurações → Bots (bot-studio.js), on top of the .wa-manager look. */
.bs-studio .wa-field textarea { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid #dce6e1; border-radius: 9px; color: #4b4c2e; background: #fff; font: inherit; font-size: var(--wa-t9); font-weight: 500; line-height: 1.5; resize: vertical; }
.bs-studio .wa-field textarea:focus { outline: 2px solid rgba(114, 117, 0, .18); border-color: #adae56; }
.bs-studio .wa-field textarea:disabled { color: #a8a19a; background: #f6f8f7; }
.bs-studio .wa-field small { color: #899894; font-size: var(--wa-t7); font-weight: 500; line-height: 1.45; }
.bs-studio .wa-field .wa-link { font-size: inherit; }
.bs-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.bs-notice-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.bs-switch { border-color: #e3ebe7; }
.bs-switch-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; }
.bs-switch-pick > span { color: var(--muted, #70705d); font-size: 0.9rem; margin-right: 4px; }
.bs-card .wa-avatar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bs-archived { color: #8f867d; font-size: var(--wa-t8); }
.bs-archived summary { cursor: pointer; font-weight: 700; }
.bs-archived ul { margin: 6px 0 0; padding-left: 18px; }
.bs-rename { display: flex; flex-wrap: wrap; gap: 6px; }
.bs-rename input { min-width: 0; min-height: 34px; flex: 1; padding: 6px 10px; border: 1px solid #dce6e1; border-radius: 9px; font: inherit; font-size: var(--wa-t9); }
.bs-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid #e6ece9; }
.bs-tab { flex: 0 0 auto; padding: 8px 11px; border: 0; border-bottom: 2px solid transparent; color: #7a7461; background: none; font: inherit; font-size: var(--wa-t8); font-weight: 700; cursor: pointer; }
.bs-tab:hover { color: #575817; }
.bs-tab.is-active { border-bottom-color: var(--brand-blue); color: #454612; }
.bs-tab:focus-visible { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: -3px; }
.bs-panel { display: grid; align-content: start; gap: 12px; min-height: 220px; }
.bs-choices { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 6px; }
.bs-choice { position: relative; display: flex; min-width: 0; padding: 9px 11px; border: 1px solid #e3ebe7; border-radius: 10px; background: #fcfcfb; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.bs-choice:hover { border-color: #e4e5cc; }
.bs-choice:has(input:checked) { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.bs-choice:has(input:focus-visible) { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 2px; }
.bs-choice input { position: absolute; opacity: 0; pointer-events: none; }
.bs-choice > span { display: grid; gap: 2px; }
.bs-choice strong { color: #4a4a28; font-size: var(--wa-t8); }
.bs-choice small { color: #90877f; font-size: var(--wa-t7); line-height: 1.4; }
.bs-kept { display: flex; gap: 12px; padding: 14px; border: 1px solid #eaebd7; border-radius: 12px; background: #fbfbf4; }
.bs-kept > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; color: #626316; background: #f5f5e0; }
.bs-kept svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bs-kept strong { color: #40401e; font-size: var(--wa-t9); }
.bs-kept p { margin: 3px 0 0; color: #776d5f; font-size: var(--wa-t8); line-height: 1.5; }
.bs-entries, .bs-numbers, .bs-versions, .bs-turns { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bs-entries li, .bs-numbers li, .bs-versions li, .bs-turns li { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 9px 11px; border: 1px solid #e6ece9; border-radius: 10px; background: #fff; }
.bs-entries strong, .bs-numbers strong, .bs-versions strong { color: #4a4a28; font-size: var(--wa-t8); }
.bs-entries small, .bs-numbers small, .bs-versions small, .bs-turns small { color: #84948f; font-size: var(--wa-t7); }
.bs-versions li > div { display: grid; gap: 2px; }
.bs-versions li.is-current { border-color: #e9eaca; background: #fbfbf4; }
.bs-turns li { display: grid; justify-content: stretch; }
.bs-turn-head { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.bs-turn-head strong { color: #4a4a28; font-size: var(--wa-t8); }
.bs-turns p { margin: 0; color: #676642; font-size: var(--wa-t8); line-height: 1.5; overflow-wrap: anywhere; }
.bs-filters { display: grid; grid-template-columns: repeat(2,minmax(0,220px)); gap: 10px; }
.bs-unanswered ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bs-unanswered li { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #676642; font-size: var(--wa-t8); }
.bs-unanswered li span { min-width: 0; overflow-wrap: anywhere; }
.bs-test-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.bs-chat-log { display: flex; min-height: 240px; max-height: min(420px,48dvh); flex-direction: column; gap: 8px; overflow: auto; padding: 12px; border: 1px solid #e6ece9; border-radius: 12px; background: #f6f9f8; }
.bs-chat-log > .wa-empty { margin: auto 0; border: 0; }
.bs-bubble { display: grid; max-width: 78%; gap: 4px; padding: 8px 11px; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(44, 45, 22, .06); }
.bs-bubble p { margin: 0; color: #4a4a28; font-size: var(--wa-t9); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bs-bubble.is-customer { align-self: flex-end; background: #dff3ea; }
.bs-bubble.is-bot { align-self: flex-start; }
.bs-bubble.is-handoff { border: 1px solid #f0dfbd; }
.bs-bubble.is-typing .contact-loader { width: 14px; height: 14px; margin: 0; }
.bs-handoff-tag { color: var(--wa-warning); font-size: var(--wa-t7); font-weight: 720; }
.bs-why { color: #857c6f; font-size: var(--wa-t7); }
.bs-why summary { cursor: pointer; font-weight: 700; }
.bs-why ul { margin: 4px 0 0; padding-left: 16px; line-height: 1.5; }
.bs-chat-form { display: flex; align-items: flex-end; gap: 8px; }
.bs-chat-form textarea { min-width: 0; flex: 1; padding: 8px 10px; border: 1px solid #dce6e1; border-radius: 10px; font: inherit; font-size: var(--wa-t9); resize: vertical; }
.bs-chat-form .wa-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bs-compare { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.bs-compare > div { display: grid; min-width: 0; align-content: start; gap: 6px; }
.bs-compare strong { color: #4a4a28; font-size: var(--wa-t8); }
.bs-compare pre { max-height: 340px; margin: 0; overflow: auto; padding: 10px; border: 1px solid #e6ece9; border-radius: 10px; color: #5b5b37; background: #f8faf9; font-size: var(--wa-t7); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bs-footer { position: sticky; bottom: -18px; z-index: 1; align-items: center; margin: 0 -18px -18px; padding: 10px 18px; border-top: 1px solid #e6ece9; background: rgba(255,255,255,.97); }
.bs-status { margin-right: auto; color: #8f867d; font-size: var(--wa-t8); font-weight: 650; }
.bs-status.is-dirty { color: var(--wa-warning); }
@media (max-width: 760px) {
  .bs-filters, .bs-compare { grid-template-columns: minmax(0,1fr); }
  .bs-bubble { max-width: 92%; }
  .bs-unanswered li { align-items: flex-start; flex-direction: column; }
}
/* Configurações · Conversas spans the page so its four selects sit in one even row. */
.settings-conversation-panel { grid-column: 1 / -1; }
.user-preferences-stack { display: grid; align-content: start; min-width: 0; gap: 12px; }
.settings-conversation-grid, .user-preferences-page.adm .settings-conversation-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.settings-conversation-grid.is-compact, .user-preferences-page.adm .settings-conversation-grid.is-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 980px) {
  .settings-conversation-grid, .user-preferences-page.adm .settings-conversation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .settings-conversation-grid, .settings-conversation-grid.is-compact, .user-preferences-page.adm .settings-conversation-grid, .user-preferences-page.adm .settings-conversation-grid.is-compact { grid-template-columns: minmax(0,1fr); }
}

/* WhatsApp number manager (#conversas gear). */
.wa-manager-dialog { width: min(760px,calc(100vw - 24px)); max-height: min(820px,calc(100dvh - 24px)); }
.wa-manager {
  --wa-t7: calc((7px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  --wa-t8: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  --wa-t9: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  --wa-t11: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale));
  --wa-good: #1f8a5b; --wa-good-soft: #e9f7f0; --wa-warning: #a46d1d; --wa-warning-soft: #fff6e6; --wa-bad: #b44a4a; --wa-bad-soft: #fdf0ef;
  display: grid; gap: 14px; padding: 18px; color: #444426; font-size: var(--wa-t9);
}
.wa-manager[aria-busy="true"] { cursor: progress; }
.wa-head { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #e8eeeb; }
.wa-head-copy { min-width: 0; flex: 1; }
.wa-head-copy .eyebrow { margin: 0 0 4px; color: #908576; font-size: var(--wa-t7); font-weight: 760; letter-spacing: .13em; }
.wa-head-copy h2 { margin: 0; overflow: hidden; color: #3a3b1a; font-size: calc(19px * var(--portal-text-scale)); font-weight: 740; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.wa-head-copy p:not(.eyebrow) { margin: 4px 0 0; color: #8f887d; font-size: var(--wa-t8); }
.wa-head-actions { display: flex; gap: 6px; }
.wa-icon-button { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid #e1e9e5; border-radius: 9px; color: #78715d; background: #fff; cursor: pointer; transition: border-color .14s ease, color .14s ease, background .14s ease; }
.wa-icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wa-head > .wa-icon-button:first-child svg { transform: rotate(180deg); }
.wa-icon-button:hover:not(:disabled) { border-color: #dbdbb0; color: #5c5e11; background: #fafaf2; }
.wa-icon-button:disabled { opacity: .55; cursor: progress; }
.wa-icon-button:focus-visible, .wa-button:focus-visible, .wa-link:focus-visible, .wa-add-card:focus-visible { outline: 3px solid rgba(114, 117, 0, .22); outline-offset: 2px; }
.wa-notice { margin: 0; padding: 9px 11px; border: 1px solid #cfe6d9; border-radius: 9px; color: #22694a; background: var(--wa-good-soft); font-size: var(--wa-t8); line-height: 1.5; }
.wa-notice.is-warning { border-color: #f0dfbd; color: #855a17; background: var(--wa-warning-soft); }
.wa-notice.is-bad { border-color: #efd2cf; color: #9c4038; background: var(--wa-bad-soft); }
.wa-inboxes { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-inbox { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 9px; border: 1px solid #e3ebe7; border-radius: 99px; background: #fafcfb; }
.wa-inbox strong { color: #555532; font-size: var(--wa-t8); font-weight: 700; }
.wa-inbox small { color: #979087; font-size: var(--wa-t7); }
.wa-inbox b { font-weight: 680; }
.wa-inbox b.is-good { color: var(--wa-good); }
.wa-inbox b.is-warning { color: var(--wa-warning); }
.wa-inbox b.is-muted { color: #98918b; }
.wa-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.wa-card { display: flex; min-width: 0; flex-direction: column; gap: 10px; padding: 13px; border: 1px solid #e2eae6; border-radius: 13px; background: #fff; box-shadow: 0 2px 10px rgba(44, 45, 22, .035); transition: border-color .15s ease, box-shadow .15s ease; }
.wa-card:hover { border-color: #e2e0ce; box-shadow: 0 6px 18px rgba(44, 45, 22, .07); }
.wa-card-head { display: flex; min-width: 0; align-items: center; gap: 10px; }
.wa-avatar { position: relative; display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg,#747414,#5c5d0b); font-size: var(--wa-t8); font-weight: 760; letter-spacing: .02em; }
.wa-avatar i { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #9aa9a2; }
.wa-card.is-good .wa-avatar i, .wa-avatar.is-good i { background: #25b36f; }
.wa-card.is-warning .wa-avatar i, .wa-avatar.is-warning i { background: #e0a43c; }
.wa-card.is-bad .wa-avatar i, .wa-avatar.is-bad i { background: #d0574f; }
.wa-card-title { display: grid; min-width: 0; flex: 1; gap: 2px; }
.wa-card-title strong { overflow: hidden; color: #3d3d1c; font-size: var(--wa-t11); font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.wa-card-title small { overflow: hidden; color: #928a81; font-size: var(--wa-t8); text-overflow: ellipsis; white-space: nowrap; }
.wa-status { flex: 0 0 auto; padding: 3px 8px; border-radius: 99px; color: #7e756c; background: #f1f4f2; font-size: var(--wa-t7); font-weight: 720; white-space: nowrap; }
.wa-status.is-good { color: var(--wa-good); background: var(--wa-good-soft); }
.wa-status.is-warning { color: var(--wa-warning); background: var(--wa-warning-soft); }
.wa-status.is-bad { color: var(--wa-bad); background: var(--wa-bad-soft); }
.wa-uses { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wa-uses li { padding: 3px 7px; border: 1px dashed #dbe3e0; border-radius: 6px; color: #afa8a2; font-size: var(--wa-t7); font-weight: 650; }
.wa-uses li.is-on { border: 1px solid #e9eaca; color: #626316; background: #fafaef; }
.wa-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.wa-flag { padding: 3px 7px; border-radius: 6px; font-size: var(--wa-t7); font-weight: 700; }
.wa-flag.is-muted { color: #81786f; background: #f1f4f2; }
.wa-flag.is-warning { color: var(--wa-warning); background: var(--wa-warning-soft); }
.wa-flag.is-bad { color: var(--wa-bad); background: var(--wa-bad-soft); }
.wa-card-foot { display: flex; margin-top: auto; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding-top: 9px; border-top: 1px solid #eef2f0; color: #938a82; font-size: var(--wa-t7); }
.wa-card-foot span { display: inline-flex; min-width: 0; align-items: center; gap: 5px; }
.wa-card-foot svg { width: 12px; height: 12px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.wa-card-actions, .wa-inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-card-actions .wa-button { flex: 1; }
.wa-button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border: 1px solid #d9e4e0; border-radius: 9px; color: #52512c; background: #fff; font: inherit; font-size: var(--wa-t8); font-weight: 700; cursor: pointer; transition: background .14s ease, border-color .14s ease, color .14s ease; }
.wa-button:hover:not(:disabled) { border-color: #d6d6b3; background: #fafaf5; }
.wa-button.is-primary { border-color: var(--brand-blue-button, var(--brand-blue)); color: #fff; background: var(--brand-blue-button, var(--brand-blue)); }
.wa-button.is-primary:hover:not(:disabled) { border-color: var(--brand-blue-button-hover, var(--brand-blue-hover)); color: #fff; background: var(--brand-blue-button-hover, var(--brand-blue-hover)); }
.wa-button.is-danger { border-color: #ecc9c5; color: var(--wa-bad); background: #fff; }
.wa-button.is-danger:hover:not(:disabled) { border-color: var(--wa-bad); color: #fff; background: var(--wa-bad); }
.wa-button:disabled { opacity: .55; cursor: not-allowed; }
.wa-button .contact-loader { width: 12px; height: 12px; margin: 0; }
.wa-link { padding: 0; border: 0; color: #646511; background: none; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.wa-add-card { display: grid; min-height: 150px; place-content: center; justify-items: center; gap: 6px; padding: 16px; border: 1.5px dashed #e0e0c6; border-radius: 13px; color: #626316; background: #fcfcf7; font: inherit; text-align: center; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.wa-add-card:hover { border-color: var(--brand-blue); background: #fafbed; }
.wa-add-card span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: var(--brand-blue); }
.wa-add-card span svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.wa-add-card strong { font-size: var(--wa-t9); }
.wa-add-card small { max-width: 240px; color: #92906d; font-size: var(--wa-t7); line-height: 1.45; }
.wa-empty { display: grid; justify-items: center; gap: 6px; padding: 30px 16px; border: 1px dashed #dde6e2; border-radius: 13px; color: #8f867d; text-align: center; }
.wa-empty strong { color: #575734; font-size: var(--wa-t9); }
.wa-empty p { margin: 0; font-size: var(--wa-t8); }
.wa-empty.is-error strong { color: var(--wa-bad); }
.wa-footnote, .wa-hint { margin: 0; color: #84948f; font-size: var(--wa-t7); line-height: 1.5; }
.wa-form { display: grid; gap: 12px; }
.wa-form[hidden], .wa-fieldset[hidden], .wa-fields[hidden] { display: none; }
.wa-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.wa-tools.is-single { grid-template-columns: minmax(0,1fr); }
.wa-tool { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e8e3df; border-radius: 10px; color: inherit; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.wa-tool:hover { border-color: color-mix(in srgb, var(--brand-primary, #646511) 45%, #e8e3df); background: #fafcfb; }
.wa-tool:focus-visible { outline: 2px solid var(--brand-primary, #646511); outline-offset: 1px; }
.wa-tool-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 8px; color: #7a7061; background: #f3f1ee; }
.wa-tool-icon svg { width: 15px; height: 15px; }
.wa-tool.is-good .wa-tool-icon { color: #24724c; background: #e6f4ec; }
.wa-tool.is-warning .wa-tool-icon { color: #8a5a25; background: #fbf1e0; }
.wa-tool.is-bad .wa-tool-icon { color: #b42318; background: #fdecea; }
.wa-tool-copy { display: grid; min-width: 0; flex: 1; gap: 1px; }
.wa-tool-copy strong { overflow: hidden; font-size: var(--wa-t8); font-weight: 640; text-overflow: ellipsis; white-space: nowrap; }
.wa-tool-copy small { overflow: hidden; color: #86836f; font-size: var(--wa-t7); text-overflow: ellipsis; white-space: nowrap; }
.wa-tool-go { display: grid; flex: 0 0 auto; color: #aba29a; }
.wa-tool-go svg { width: 14px; height: 14px; }
.wa-toggle.is-wide { grid-column: 1 / -1; }
.wa-paused { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid #f1cfca; border-radius: 10px; background: #fdf3f1; }
.wa-paused p { flex: 1 1 240px; margin: 0; color: #912018; font-size: var(--wa-t7); line-height: 1.45; }
.wa-pacing-mode { display: grid; gap: 3px; padding: 10px 11px; border: 1px solid #e8e3df; border-radius: 10px; color: #6f6953; background: #f7faf9; }
.wa-pacing-mode[data-mode="no-delays"] { border-color: #e6d4a8; color: #72521e; background: #fdf8ec; }
.wa-pacing-mode strong { font-size: var(--wa-t8); font-weight: 640; }
.wa-pacing-mode p { margin: 0; font-size: var(--wa-t7); line-height: 1.45; }
.wa-pacing-mode span { color: #8a5a25; font-size: var(--wa-t7); font-weight: 560; }
.wa-pacing-mode span[hidden] { display: none; }
.wa-fieldset:disabled .wa-fields { opacity: .6; }
.wa-url { display: block; overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid #e8e3df; border-radius: 8px; color: #5b553e; background: #f7faf9; font-size: var(--wa-t7); }
.wa-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.wa-choice { position: relative; display: block; min-width: 0; cursor: pointer; }
.wa-choice input { position: absolute; opacity: 0; pointer-events: none; }
.wa-choice > span { display: grid; height: 100%; gap: 2px; padding: 10px 11px; border: 1px solid #e8e3df; border-radius: 10px; }
.wa-choice strong { font-size: var(--wa-t8); font-weight: 640; }
.wa-choice small { color: #86836f; font-size: var(--wa-t7); line-height: 1.4; }
.wa-choice input:checked + span { border-color: var(--brand-primary, #646511); background: color-mix(in srgb, var(--brand-primary, #646511) 6%, #fff); }
.wa-choice input:focus-visible + span { outline: 2px solid var(--brand-primary, #646511); outline-offset: 1px; }
@media (max-width: 640px) { .wa-tools, .wa-choices { grid-template-columns: minmax(0,1fr); } }
.wa-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.wa-field { display: grid; min-width: 0; gap: 5px; color: #6f6953; font-size: var(--wa-t8); font-weight: 680; }
.wa-field[hidden] { display: none; }
.wa-field input, .wa-field select { width: 100%; min-width: 0; min-height: 37px; padding: 8px 10px; border: 1px solid #dce6e1; border-radius: 9px; color: #4b4c2e; background: #fff; font: inherit; font-size: var(--wa-t9); font-weight: 500; }
.wa-field input:focus, .wa-field select:focus { outline: 2px solid rgba(114, 117, 0, .18); border-color: #adae56; }
.wa-field input:disabled { color: #a8a19a; background: #f6f8f7; }
.wa-fieldset { display: grid; gap: 9px; min-width: 0; margin: 0; padding: 11px 12px 12px; border: 1px solid #e6ece9; border-radius: 11px; }
.wa-fieldset legend { padding: 0 5px; color: #877d6f; font-size: var(--wa-t7); font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.wa-toggle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.wa-toggle-grid.is-compact { grid-template-columns: repeat(3,minmax(0,1fr)); }
/* Receiving uses (Conversas, Bot) share the first row; the three sending uses share the second. */
.wa-toggle-grid.is-purposes { grid-template-columns: repeat(6,minmax(0,1fr)); }
.wa-toggle-grid.is-purposes > :nth-child(-n+2) { grid-column: span 3; }
.wa-toggle-grid.is-purposes > :nth-child(n+3) { grid-column: span 2; }
.wa-toggle { position: relative; display: flex; min-width: 0; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #edf1ef; border-radius: 9px; background: #fcfcfb; cursor: pointer; transition: border-color .14s ease, background .14s ease; }
.wa-toggle:hover { border-color: #e6e5d1; background: #fbfbf7; }
.wa-toggle.is-wide { background: #fff; }
.wa-toggle.is-disabled { opacity: .55; cursor: not-allowed; }
.wa-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wa-switch { position: relative; width: 30px; height: 18px; flex: 0 0 30px; margin-top: 1px; border-radius: 99px; background: #d3dcd9; transition: background .16s ease; }
.wa-switch::after { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(34, 36, 9, .25); content: ""; transition: transform .16s ease; }
.wa-toggle input:checked + .wa-switch { background: var(--brand-blue); }
.wa-toggle input:checked + .wa-switch::after { transform: translateX(12px); }
.wa-toggle input:focus-visible + .wa-switch { outline: 3px solid rgba(114, 117, 0, .25); outline-offset: 2px; }
.wa-toggle > span:last-child { display: grid; min-width: 0; gap: 2px; }
.wa-toggle strong { color: #54532f; font-size: var(--wa-t8); font-weight: 720; }
.wa-toggle small { color: #899894; font-size: var(--wa-t7); line-height: 1.4; }
.wa-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.wa-actions .wa-actions-start { margin-right: auto; }
.wa-pair { display: grid; grid-template-columns: 236px minmax(0,1fr); align-items: center; gap: 22px; padding: 6px 2px; }
.wa-pair-visual { display: grid; place-items: center; }
.wa-qr { display: grid; width: 236px; height: 236px; place-content: center; justify-items: center; gap: 8px; padding: 10px; border: 1px solid #e1e9e6; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px rgba(44, 45, 22, .08); image-rendering: pixelated; }
.wa-qr.is-loading small { color: #84948f; font-size: var(--wa-t7); }
.wa-code { display: grid; justify-items: center; gap: 6px; padding: 22px 14px; border: 1px solid #ededd6; border-radius: 16px; background: #fcfcf4; }
.wa-code span, .wa-code small { color: #92906f; font-size: var(--wa-t7); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wa-code strong { color: #4f510f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: calc(30px * var(--portal-text-scale)); letter-spacing: .12em; }
.wa-code-form { display: grid; width: 100%; gap: 10px; }
.wa-pair-copy { display: grid; gap: 12px; }
.wa-pair-copy ol { display: grid; gap: 9px; margin: 0; padding: 0; counter-reset: wa-step; list-style: none; }
.wa-pair-copy li { display: flex; align-items: center; gap: 10px; color: #545431; font-size: var(--wa-t9); counter-increment: wa-step; }
.wa-pair-copy li::before { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; color: #626316; background: #f7f8e7; font-size: var(--wa-t7); font-weight: 760; content: counter(wa-step); }
.wa-pair-status { display: flex; align-items: center; gap: 8px; margin: 0; color: #857c6f; font-size: var(--wa-t8); }
.wa-pulse { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #e0a43c; animation: wa-pulse 1.4s ease-in-out infinite; }
@keyframes wa-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 164, 60, .45); } 50% { box-shadow: 0 0 0 6px rgba(224, 164, 60, 0); } }
.wa-pair-copy .wa-link { justify-self: start; font-size: var(--wa-t8); }
.wa-success { display: grid; justify-items: center; gap: 8px; padding: 10px 6px 2px; text-align: center; }
.wa-success-mark { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; color: #fff; background: #25b36f; box-shadow: 0 8px 22px rgba(37, 179, 111, .3); }
.wa-success-mark svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; }
.wa-success > strong { color: #3a3b1a; font-size: calc(17px * var(--portal-text-scale)); }
.wa-success > p { margin: 0; color: #857c6f; font-size: var(--wa-t9); }
.wa-success ul { display: grid; gap: 6px; margin: 6px 0; padding: 12px 14px; border: 1px solid #e3ece8; border-radius: 11px; background: #fafcfb; color: #676642; font-size: var(--wa-t8); text-align: left; list-style: none; }
.wa-success li::before { margin-right: 7px; color: #25b36f; font-weight: 800; content: "\2713"; }
.wa-success .wa-actions { justify-content: center; }
.wa-detail-top { display: flex; align-items: center; gap: 11px; }
.wa-detail-top > div { display: grid; min-width: 0; flex: 1; gap: 2px; }
.wa-detail-top strong { color: #3d3d1c; font-size: var(--wa-t11); font-weight: 740; }
.wa-detail-top small { overflow: hidden; color: #84948f; font-size: var(--wa-t7); text-overflow: ellipsis; white-space: nowrap; }
.wa-health-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.wa-health { display: grid; min-width: 0; gap: 3px; padding: 9px 11px; border: 1px solid #e3ebe7; border-left-width: 3px; border-radius: 10px; background: #fff; }
.wa-health.is-good { border-left-color: #25b36f; }
.wa-health.is-warning { border-left-color: #e0a43c; }
.wa-health.is-bad { border-left-color: #d0574f; }
.wa-health span { color: #84948f; font-size: var(--wa-t7); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.wa-health strong { overflow: hidden; color: #4e4e2b; font-size: var(--wa-t8); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wa-confirm-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border: 1px solid #efd2cf; border-radius: 10px; color: #9c4038; background: var(--wa-bad-soft); font-size: var(--wa-t8); font-weight: 650; }
.wa-danger { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #f0d9d6; border-radius: 11px; background: #fffafa; }
.wa-danger strong { color: #8f3b34; font-size: var(--wa-t8); }
.wa-danger small, .wa-danger p { margin: 0; color: #9b7470; font-size: var(--wa-t7); line-height: 1.5; }
.wa-danger.is-open { display: grid; justify-content: stretch; gap: 9px; }
.wa-danger ul { margin: 0; padding-left: 18px; color: #8f3b34; font-size: var(--wa-t7); line-height: 1.5; }
@media (max-width: 680px) {
  .wa-manager { padding: 14px; }
  .wa-grid, .wa-fields, .wa-toggle-grid, .wa-toggle-grid.is-compact, .wa-toggle-grid.is-purposes, .wa-health-grid { grid-template-columns: minmax(0,1fr); }
  .wa-toggle-grid.is-purposes > * { grid-column: auto !important; }
  .wa-pair { grid-template-columns: minmax(0,1fr); justify-items: center; gap: 14px; }
  .wa-danger { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .wa-pulse { animation: none; } }

/* Caixas (whatsapp-inboxes.js): who sees each number's conversations. */
.wa-inbox.is-manage { border-style: dashed; color: inherit; font: inherit; cursor: pointer; }
.wa-inbox.is-manage:hover { border-color: #b9cfc6; background: #f2f8f5; }
.wa-inbox-list { display: grid; gap: 10px; }
.wa-inbox-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: start; padding: 14px 16px; border: 1px solid #e3ebe7; border-radius: 12px; background: #fff; }
.wa-inbox-card.is-editing { grid-template-columns: minmax(0, 1fr); }
.wa-inbox-card-copy { display: grid; gap: 3px; min-width: 0; }
.wa-inbox-card-copy strong { color: #41411f; font-size: var(--wa-t9); }
.wa-inbox-card-copy small { color: #81786f; font-size: var(--wa-t7); overflow-wrap: anywhere; }
.wa-inbox-card-actions { display: flex; gap: 6px; }
.wa-inbox-confirm { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fff6f4; color: #7a3328; font-size: var(--wa-t8); }
.wa-inbox-confirm p { margin: 0; }
.wa-inbox-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; }
.wa-check { display: flex; align-items: center; gap: 8px; color: #555532; font-size: var(--wa-t8); }
.wa-inbox-add { min-height: 0; margin-top: 10px; width: 100%; }
/* Admin → Backups: health summary, schedule and destination cards. */
.adm .backup-admin-panel { gap: 14px; }
.adm .backup-admin-panel [hidden] { display: none !important; }
.adm .backup-retention { grid-column: span 2; }
.adm .backup-header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.adm .backup-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.adm .backup-summary-card { display: grid; gap: 4px; min-width: 0; padding: 12px 14px; border: 1px solid var(--adm-line); border-left-width: 4px; border-radius: var(--adm-radius); background: var(--adm-surface); box-shadow: var(--adm-shadow); }
.adm .backup-summary-card small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.adm .backup-summary-card strong { color: var(--adm-ink); font-size: calc(17px * var(--adm-z)); font-weight: 720; }
.adm .backup-summary-card span { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.4; overflow-wrap: anywhere; }
.adm .backup-summary-card.is-good { border-left-color: var(--adm-good); }
.adm .backup-summary-card.is-warn { border-left-color: var(--adm-warn); background: var(--adm-warn-soft); }
.adm .backup-summary-card.is-error { border-left-color: var(--adm-danger); background: var(--adm-danger-soft); }
.adm .backup-section-title { margin: 6px 0 0; color: var(--adm-ink-2); font-size: calc(14px * var(--adm-z)); font-weight: 720; }
.adm .backup-section-note { margin: -4px 0 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.5; }
.adm #adminBackupsForm { display: grid; gap: 12px; }
.adm .backup-job > header, .adm .backup-destination > header { justify-content: space-between; }
.adm .backup-destination > header > div { display: grid; gap: 5px; justify-items: start; }
.adm .backup-destination > header small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); }
.adm .backup-destination .admin-setting-fields + .admin-setting-fields { margin-top: 10px; }
.adm .backup-check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); }
.adm .backup-check-row strong { min-width: 78px; color: var(--adm-muted); font-weight: 650; }
.adm .backup-check-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.adm .backup-secret textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: calc(12px * var(--adm-z)); }
.adm .backup-secret .ai-clear-choice { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.adm .backup-row-title { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 8px; color: var(--adm-ink-2) !important; }
.adm .backup-destination details { margin-top: 10px; }
.adm .backup-destination details > div, .adm .backup-destination details > .admin-setting-fields { margin-top: 10px; }
.adm .backup-destination-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.adm .backup-snapshot-list { display: grid; gap: 4px; max-height: 260px; margin: 10px 0 0; padding: 0; overflow: auto; list-style: none; }
.adm .backup-snapshot-list li { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--adm-line); border-radius: var(--adm-control-radius); background: var(--adm-surface-2); font-size: calc(12px * var(--adm-z)); }
.adm .backup-snapshot-list span { color: var(--adm-muted); }
.adm .backup-snapshot-list code { color: var(--adm-ink-2); font-size: calc(11px * var(--adm-z)); }
.adm .backup-snapshots-note { margin: 10px 0 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .backup-snapshots-note.is-error { color: var(--adm-danger); }
.adm .backup-google-connect { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 20px; padding: 14px 16px; border: 1px solid var(--adm-line); border-radius: var(--adm-card-radius); background: var(--adm-surface-2); }
.adm .backup-google-connect > div { display: grid; gap: 4px; }
.adm .backup-google-connect small, .adm .backup-staging-status { color: var(--adm-muted); }
.adm .backup-staging-status { margin: 12px 0; }
.adm .backup-add-destination { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 14px; border: 1px dashed var(--adm-line-strong); border-radius: var(--adm-radius); }
.adm .backup-add-destination label { display: grid; gap: 6px; color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); font-weight: 650; }
.adm .backup-add-destination select { min-height: 38px; padding: 6px 10px; border: 1px solid var(--adm-line-strong); border-radius: var(--adm-control-radius); background: var(--adm-surface); font: inherit; }
.adm .backup-errors { margin: 0 0 6px; padding-left: 18px; color: var(--adm-danger); font-size: calc(12px * var(--adm-z)); }
@media (max-width: 760px) {
  .adm .backup-summary { grid-template-columns: minmax(0,1fr); }
  .adm .backup-header-actions { justify-content: flex-start; }
  .adm .backup-snapshot-list li { grid-template-columns: minmax(0,1fr); }
  .adm .backup-google-connect { align-items: stretch; flex-direction: column; }
}

/* Admin → Vendas */
.sales-table-wrap { overflow-x: auto; margin-top: 12px; border-top: 1px solid #f2f2e8; }
.sales-table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; }
.sales-table thead { background: #fafbf6; }
.sales-table th, .sales-table td { padding: 9px 12px; border-bottom: 1px solid #f4f4ed; color: #757751; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 520; line-height: 1.45; vertical-align: middle; }
.sales-table thead th { color: #959573; font-size: calc((8px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.sales-table tbody tr.is-muted td { color: #adad93; }
.sales-danger-zone { margin-top: 14px; }
.sales-table td small { display: block; color: #a8a88a; font-weight: 500; }
.sales-deliveries-row td { background: #fcfcf9; }
.sales-deliveries-editor { display: grid; gap: 10px; padding: 6px 0; }
.sales-delivery-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr) auto; gap: 10px; align-items: end; }
.sales-delivery-row label { display: grid; gap: 4px; color: #757751; font-weight: 650; }
.sales-delivery-row input { min-height: 38px; padding: 7px 10px; border: 1px solid #d7e3dc; border-radius: 8px; font: inherit; }
.sales-delivery-file { display: inline-flex; gap: 6px; align-items: center; color: #62613c; }
.sales-delivery-file svg { width: 15px; height: 15px; }
.sales-delivery-upload { cursor: pointer; }
.sales-area { display: grid; gap: 16px; }
.sales-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 14px; border: 1px solid #e1ebe4; border-radius: 12px; background: #fff; }
.sales-filters label { display: grid; gap: 4px; color: #757751; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.sales-filters input, .sales-filters select { min-height: 38px; padding: 7px 10px; border: 1px solid #d7e3dc; border-radius: 8px; color: #494a2d; background: #fff; font: inherit; }
.sales-filter-search { flex: 1 1 220px; }
.sales-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sales-totals div { display: grid; gap: 4px; padding: 14px; border: 1px solid #e1ebe4; border-radius: 12px; background: linear-gradient(135deg,#fbfbf7,#fff); }
.sales-totals span { color: #959573; font-size: calc((9px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.sales-totals strong { color: #3e3c24; font-size: calc((18px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.sales-totals small { color: #a8a88a; }
.sales-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #959573; }
.sales-pager div { display: flex; gap: 8px; }
.contact-purchases { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.contact-purchases li { display: grid; gap: 2px; }
.contact-purchases span { color: #959573; }
/* Admin → Vendas → Produtos e entregas and Contatos → Compras (PLAN.md 3D item 22) */
.sales-subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; border-bottom: 1px solid #e1e8e4; }
.sales-subnav button { padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; color: #807f68; background: none; font: inherit; font-weight: 680; cursor: pointer; }
.sales-subnav button.is-active { color: #63640c; border-bottom-color: #63640c; }
.sales-subnav .source-badge { margin-left: 4px; }
.sales-delivery-alert { margin-bottom: 12px; }
.sales-sequence-summary { display: grid; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.sales-sequence-summary li { display: grid; gap: 2px; padding: 9px 12px; border: 1px solid #e1e8e4; border-radius: 10px; background: #f9fbfa; }
.sales-sequence-summary span { color: #807f68; }
.sales-delivery-head { display: grid; gap: 4px; margin-bottom: 10px; }
.sales-delivery-head h3 { margin: 0; color: #2c2c12; }
.sales-delivery-head > p { margin: 0; color: #807f68; }
.sales-delivery-head .campaign-panel-link { justify-self: start; }
.sales-publish-note { display: grid; gap: 4px; flex: 1 1 220px; color: #6f6b52; font-weight: 680; }
.sales-publish-note input { min-height: 38px; padding: 7px 10px; border: 1px solid #d8e3dd; border-radius: 9px; font: inherit; }
.sales-delivery-split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.sales-delivery-preview { position: sticky; top: 12px; display: grid; gap: 10px; padding: 14px; border: 1px solid #e1e8e4; border-radius: 12px; background: #f6f9f8; }
.sales-preview-step { display: grid; gap: 6px; }
.sales-preview-subject { margin: 0; color: #2c2c12; font-weight: 700; }
.sales-preview-frame { width: 100%; height: 340px; border: 1px solid #e1e8e4; border-radius: 10px; background: #fff; }
.sales-preview-frame.is-page { height: 420px; }
.sales-preview-bubble { justify-self: start; max-width: 92%; padding: 9px 12px; border-radius: 10px 10px 10px 2px; color: #2c2c12; background: #dcf3e4; white-space: pre-wrap; overflow-wrap: anywhere; }
.sales-seq-editor { display: grid; gap: 10px; }
.sales-seq-step { display: grid; gap: 10px; padding: 12px; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; }
.sales-seq-step > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; color: #2c2c12; }
.sales-seq-step > header span { display: flex; gap: 6px; }
.sales-seq-step .automation-step-wide, .sales-delivery-item .automation-step-wide { grid-column: 1 / -1; }
.sales-seq-after { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(110px, 1.2fr); gap: 6px; }
.sales-variables { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.sales-variables code { padding: 2px 6px; border-radius: 6px; color: #63640c; background: #f9f9ed; font-size: 12px; }
.sales-delivery-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; margin-bottom: 8px; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; }
.sales-delivery-item > div { display: grid; gap: 8px; min-width: 0; }
.sales-delivery-item.is-soon { align-items: center; opacity: .75; }
.sales-delivery-item.is-soon small { color: #807f68; }
.sales-delivery-kind { display: grid; place-items: center; height: 36px; border-radius: 9px; color: #63640c; background: #f9f9ed; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.sales-delivery-warning { margin: 0; padding: 8px 10px; border-radius: 9px; color: #6b4d2a; background: #f8f1e7; }
.sales-delivery-warning button { margin-left: 6px; }
.sales-delivery-mode { display: grid; gap: 6px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #d7e3dc; border-radius: 10px; }
.sales-delivery-mode legend { padding: 0 6px; color: #706b52; font-weight: 700; }
.sales-delivery-mode label { display: flex; gap: 8px; align-items: flex-start; }
.sales-event { display: grid; gap: 6px; padding: 12px; margin-bottom: 8px; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; }
.sales-event > header { display: flex; gap: 8px; align-items: center; color: #2c2c12; }
.sales-period { display: inline-flex; gap: 0; margin-bottom: 12px; border: 1px solid #d7e3dc; border-radius: 9px; overflow: hidden; }
.sales-period button { padding: 7px 12px; border: 0; color: #6f6b52; background: #fff; font: inherit; font-weight: 680; cursor: pointer; }
.sales-period button.is-active { color: #fff; background: #63640c; }
.sales-delivery-tiles { margin-bottom: 14px; }
.sales-funnel { display: grid; gap: 8px; margin-bottom: 14px; padding: 14px; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; }
.sales-funnel-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px; gap: 10px; align-items: center; color: #2c2c12; }
.sales-funnel-row span { color: #807f68; font-weight: 650; }
.sales-funnel-row strong { font-variant-numeric: tabular-nums; font-weight: 650; }
.sales-funnel-track { height: 14px; border-radius: 4px; background: #eef3f1; overflow: hidden; }
.sales-funnel-track i { display: block; height: 100%; border-radius: 4px; background: #63640c; }
.sales-migration-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sales-migration-compare pre { margin: 0; padding: 10px 12px; border: 1px solid #e1e8e4; border-radius: 10px; color: #2c2c12; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.contact-delivery { display: grid; gap: 6px; padding: 12px; margin: 10px 0; border: 1px solid #e1e8e4; border-radius: 12px; background: #fff; }
.contact-delivery > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; color: #2c2c12; }
.contact-delivery p, .contact-delivery ul { margin: 0; color: #807f68; }
.contact-delivery ul { padding-left: 18px; }
.contact-delivery-log { display: grid; gap: 3px; margin: 4px 0 0; padding: 0 0 0 14px; border-left: 2px solid #e1e8e4; list-style: none; color: #2c2c12; }
.contact-delivery-log time { color: #807f68; font-variant-numeric: tabular-nums; }
.contact-delivery-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-top: 4px; }
.contact-delivery-actions label { display: grid; gap: 4px; color: #6f6b52; font-weight: 650; }
.contact-delivery-actions select, .contact-delivery-actions input { min-height: 36px; padding: 6px 9px; border: 1px solid #d8e3dd; border-radius: 8px; font: inherit; }
.contact-delivery-actions a.table-action { text-decoration: none; }
.contact-delivery-grant { margin-top: 10px; }
.contact-delivery-grant summary { cursor: pointer; color: #63640c; font-weight: 680; }
.contact-delivery-grant small { display: block; margin-top: 6px; color: #807f68; }
.contact-delivery-feedback { margin: 0; }
.contact-delivery-feedback.is-good { color: #1d6b48; }
.contact-delivery-feedback.is-error { color: #a1463f; }
@media (max-width: 900px) {
  .sales-delivery-split, .sales-migration-compare { grid-template-columns: minmax(0, 1fr); }
  .sales-delivery-preview { position: static; }
  .sales-delivery-item { grid-template-columns: 36px minmax(0, 1fr); }
  .sales-delivery-item > button { grid-column: 2; justify-self: start; }
}
.automation-step-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 520 !important; }
.automation-step-check input { width: auto !important; min-height: 0 !important; margin-top: 3px; }
.automation-sale-events, .automation-sale-products { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 10px 12px; border: 1px solid #d7e3dc; border-radius: 10px; }
.automation-sale-events legend, .automation-sale-products legend { padding: 0 6px; color: #706b52; font-weight: 700; }
.automation-sale-events label, .automation-sale-products label { display: inline-flex !important; gap: 6px; align-items: center; font-weight: 560 !important; }
.automation-sale-events input, .automation-sale-products input { width: auto !important; min-height: 0 !important; }
.automation-run-filter { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: #757751; }
.sales-danger-zone summary { cursor: pointer; color: #a1463f; font-weight: 650; }

/* Admin → Segurança: the edge summary (lib/edge-security.js). */
.admin-edge-kinds { margin: 10px 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.admin-edge-recent { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12.5px; }
.admin-edge-recent th, .admin-edge-recent td { padding: 6px 8px; border-bottom: 1px solid #e0e9e3; text-align: left; }
.admin-edge-recent th { font-weight: 600; color: #5c6b66; }
/* Admin → Equipe e acessos (3B.1 pass 4): tiles, the team table, a person's page and the permissions dialog. */
.adm .team-access .staff-admin-heading h2, .adm .team-person-head h2 { margin: 0; color: var(--adm-ink); font-size: calc(22px * var(--adm-z)); letter-spacing: -.03em; }
.adm .team-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.adm .team-tile { display: grid; gap: 3px; min-width: 0; padding: 12px 14px; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: var(--adm-surface); box-shadow: var(--adm-shadow); }
.adm .team-tile small { color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.adm .team-tile strong { color: var(--adm-ink); font-size: calc(20px * var(--adm-z)); font-weight: 720; }
.adm .team-tile span { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); line-height: 1.4; }
.adm .team-table-wrap { overflow-x: auto; border: 1px solid var(--adm-line); border-radius: var(--adm-radius); background: var(--adm-surface); box-shadow: var(--adm-shadow); }
.adm :is(.team-table, .team-rows) { width: 100%; border-collapse: collapse; color: var(--adm-ink); font-size: calc(12.5px * var(--adm-z)); }
.adm .team-table th { padding: 9px 12px; border-bottom: 1px solid var(--adm-line); color: var(--adm-muted); font-size: calc(11px * var(--adm-z)); font-weight: 650; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.adm :is(.team-table, .team-rows) td { padding: 10px 12px; border-bottom: 1px solid var(--adm-line); vertical-align: top; }
.adm .team-rows td { padding: 8px 4px; }
.adm :is(.team-table, .team-rows) tr:last-child td { border-bottom: 0; }
.adm :is(.team-table, .team-rows) small { color: var(--adm-muted); font-size: calc(11.5px * var(--adm-z)); }
.adm :is(.team-table, .team-rows) td:last-child { text-align: right; white-space: nowrap; }
.adm :is(.team-table, .team-rows) td:last-child .table-action + .table-action { margin-left: 6px; }
.adm .team-chip { display: inline-flex; margin: 0 4px 3px 0; padding: 2px 8px; border: 1px solid var(--adm-line); border-radius: 99px; color: var(--adm-muted); background: var(--adm-surface); font-size: calc(11px * var(--adm-z)); font-weight: 600; white-space: nowrap; vertical-align: middle; }
.adm .team-chip.is-ok { border-color: #bfe5d3; color: var(--adm-good); background: var(--adm-good-soft); }
.adm .team-chip.is-warn { border-color: #efdcb9; color: var(--adm-warn); background: var(--adm-warn-soft); }
.adm .team-chip.is-vendor, .adm .team-chip.is-owner { border-color: var(--adm-brand-line); color: var(--adm-brand-ink); background: var(--adm-brand-soft); }
.adm .team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.adm .team-grid > div { display: grid; gap: 12px; min-width: 0; }
.adm .team-back { justify-self: start; padding: 0; border: 0; color: var(--adm-brand-ink); background: none; font-size: calc(12px * var(--adm-z)); font-weight: 650; cursor: pointer; }
.adm .team-back:hover, .adm .team-link:hover { text-decoration: underline; }
.adm .team-person { display: grid; gap: 14px; }
.adm .team-person-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.adm .team-person-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .team-person-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adm .team-toggles { display: grid; gap: 8px; }
.adm .team-toggle { display: flex; align-items: center; gap: 8px; color: var(--adm-ink); font-size: calc(12.5px * var(--adm-z)); cursor: pointer; }
.adm .team-toggle:has(input:disabled) { color: var(--adm-muted); cursor: default; }
.adm .team-code { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 10px; }
.adm .team-code label { display: grid; flex: 1 1 220px; gap: 5px; color: var(--adm-ink-2); font-size: calc(12px * var(--adm-z)); font-weight: 600; }
.adm .team-log { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.adm .team-log li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; color: var(--adm-ink); font-size: calc(12px * var(--adm-z)); line-height: 1.45; }
.adm .team-log time { color: var(--adm-muted); white-space: nowrap; }
.adm .team-pick { display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border: 1px solid var(--adm-line-strong); border-radius: var(--adm-control-radius); color: var(--adm-ink); background: var(--adm-surface); font: inherit; cursor: pointer; }
.adm .team-pick span:last-child, .adm .team-link { color: var(--adm-brand-ink); font-weight: 650; }
.adm .team-link { padding: 0; border: 0; background: none; font-size: calc(11.5px * var(--adm-z)); cursor: pointer; }
.adm .team-permissions-dialog { width: min(720px, calc(100vw - 32px)); }
.adm .team-permissions-dialog .staff-capability-scope { display: grid; gap: 10px; }
.adm .team-perm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.adm .team-perm-foot { align-items: center; }
.adm .team-perm-foot > span:first-child { color: var(--adm-muted); font-size: calc(12px * var(--adm-z)); }
.adm .team-perm-space { flex: 1; }
@media (max-width: 900px) { .adm .team-grid { grid-template-columns: 1fr; } }

/* The vendor in this panel as Suporte (3E.1 pass 5): the same purple as the vendor's own bar. */
.team-support { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid #c4b5fd; background: #f5f3ff; color: #3b1d8f; }
.team-support > div { display: flex; flex-direction: column; gap: 2px; }
.team-support span { font-size: 13px; }

/* One line per person: the chips drop the topbar chip's height and nothing wraps; the wrap scrolls when the panel is narrow. */
.adm .team-chip { min-height: 0; gap: 0; line-height: 1.45; white-space: nowrap; }
.adm .team-table td { vertical-align: middle; white-space: nowrap; }
.adm .team-table .team-chip { margin: 0; }
.adm .team-table td br + small { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.adm .team-apps { color: var(--adm-muted); }
/* #conversas composer: the drop target for a dragged file (public/app/conversation-composer.js). */
.conversation-composer-wrap.is-file-drop .conversation-composer { outline: 2px dashed var(--cv-brand, #969900); outline-offset: 2px; }
.conversation-composer-wrap.is-file-drop::after {
  content: 'Solte para anexar'; position: absolute; inset: 8px 12px 10px; z-index: 8; display: grid; place-items: center;
  border-radius: 12px; background: color-mix(in srgb, var(--cv-brand-soft, #fbfce7) 92%, transparent);
  color: var(--cv-brand-ink, #6e7107); font-weight: 700; font-size: calc(14px * var(--cv-z, 1)); pointer-events: none;
}
/* #disparos → Contatos selecionados (public/app/broadcast-contact-picker.js): the list and the
   people picked side by side. [hidden] still wins: every display rule here skips it. */
.broadcast-contact-picker:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); gap: 12px; align-items: stretch; padding: 12px; }
.broadcast-contact-picker:not([hidden]):not(:has(> .broadcast-selected-contacts:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.broadcast-picker-pane { display: grid; align-content: start; gap: 8px; min-width: 0; }
.broadcast-picker-pane > small:not([hidden]) { color: #7c7b5d; font-size: max(11px, calc(11.5px * var(--portal-text-scale, 1))); }
.broadcast-picker-search { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 11px; border: 1px solid #e5e5d4; border-radius: 9px; color: #8a896f; background: #fff; }
.broadcast-picker-search:focus-within { border-color: #c1c265; box-shadow: 0 0 0 3px rgba(95, 97, 23, .12); }
.broadcast-picker-search svg { width: 16px; height: 16px; flex: 0 0 auto; }
.broadcast-picker-search input { flex: 1; min-width: 0; min-height: 38px; padding: 0; border: 0; outline: 0; box-shadow: none; color: #444524; background: transparent; font: inherit; font-size: max(12px, calc(13px * var(--portal-text-scale, 1))); }
.broadcast-contact-picker .broadcast-contact-results:not([hidden]) { display: grid; align-content: start; height: clamp(240px, 44vh, 440px); max-height: none; margin: 0; overflow: auto; overscroll-behavior: contain; }
.broadcast-picker-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 5px 11px; border-bottom: 1px solid #e6ece7; color: #7c7b5d; background: #fbfbf7; font-size: max(11px, calc(11.5px * var(--portal-text-scale, 1))); font-weight: 650; }
.broadcast-picker-bar button, .broadcast-picker-more, .broadcast-selected-clear { min-height: 26px; padding: 0 10px; border: 1px solid #e5e5cc; border-radius: 99px; color: #5f6117; background: #fff; font: inherit; font-size: max(11px, calc(11.5px * var(--portal-text-scale, 1))); font-weight: 650; cursor: pointer; }
.broadcast-picker-bar button:hover, .broadcast-picker-more:hover:not(:disabled), .broadcast-selected-clear:hover { border-color: #cfcf8b; background: #fbfbef; }
.broadcast-picker-more { justify-self: center; min-height: 32px; margin: 10px; padding: 0 18px; }
.broadcast-picker-more:disabled { cursor: default; opacity: .6; }
/* Rows: the composer's generic field rule (.broadcast-settings-grid input: 43px tall, full width) also
   caught these checkboxes and pushed every row's content down; here they are plain 16px boxes, centred. */
.broadcast-contact-picker .broadcast-contact-result { grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; min-height: 46px; padding-block: 6px; cursor: pointer; }
.broadcast-contact-picker .broadcast-contact-result > input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; align-self: center; }
.broadcast-contact-picker .broadcast-contact-result > span { align-content: center; align-self: center; }
.broadcast-contact-picker .broadcast-contact-result > em { align-self: center; line-height: 1.3; }
.broadcast-contact-picker .broadcast-contact-result:hover:not(.is-disabled) { background: #fbfbf4; }
.broadcast-contact-picker .broadcast-contact-result em { max-width: 160px; }
.broadcast-contact-picker .broadcast-contact-result em.is-ok { color: #1c8f62; }
/* The panel takes the list's height and scrolls inside it (contain: size keeps 50 names from stretching the row).
   grid-column: auto undoes the older full-row rule (conversation-settings.css), which dropped it under the list,
   left the right column empty and, with contain: size, collapsed it to nothing. */
.broadcast-contact-picker > .broadcast-selected-contacts:not([hidden]) { grid-column: auto; display: grid; grid-template-rows: auto minmax(0, 1fr); align-content: stretch; align-items: stretch; gap: 8px; min-width: 0; min-height: 0; margin: 0; padding: 10px; border: 1px solid #edeee3; border-radius: 9px; background: #fff; contain: size; }
.broadcast-contact-picker .broadcast-selected-heading { justify-content: flex-start; gap: 8px; }
.broadcast-contact-picker .broadcast-selected-clear { margin-left: auto; }
.broadcast-contact-picker .broadcast-selected-list { grid-template-columns: minmax(0, 1fr); align-content: start; max-height: none; min-height: 0; overflow: auto; }
.broadcast-contact-picker .broadcast-selected-list > li { min-height: 40px; }
.broadcast-contact-picker .broadcast-selected-list button { min-width: 30px; justify-content: center; padding: 0 8px; font-size: 15px; }
.broadcast-contact-picker .broadcast-selected-empty { align-self: center; text-align: center; }
@media (max-width: 760px) {
  .broadcast-contact-picker:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
  .broadcast-contact-picker .broadcast-contact-results:not([hidden]) { height: clamp(220px, 38vh, 360px); }
  .broadcast-contact-picker > .broadcast-selected-contacts:not([hidden]) { max-height: 260px; min-height: 120px; contain: none; }
}
/* E-mail editor (public/app/email-editor.js): the toolbar above the e-mail, the bubble over a
   selection and the panels. Glyphs are spans, not b/i/strong/small, so the host boxes' tag rules
   (.template-email-inbox b, i, small...) never reach them. [hidden] always wins. */
.template-email-inbox, .broadcast-email-canvas, .template-preview-content, .email-rich-editor { position: relative; }
.email-ed-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 6px 8px; border-top: 1px solid #e7efec; border-bottom: 1px solid #e7efec; background: linear-gradient(180deg,#fbfdfc 0%,#f8f6f4 100%); font-size: max(11px, calc(12px * var(--portal-text-scale, 1))); }
.email-ed-toolbar[hidden], .email-ed-bubble[hidden], .email-ed-pop[hidden] { display: none !important; }
.email-ed-toolbar button, .email-ed-bubble button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 30px; height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: 7px; color: #565633; background: transparent; font: inherit; font-weight: 650; line-height: 1; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.email-ed-toolbar button:hover:not(:disabled), .email-ed-bubble button:hover { border-color: #e1dbd3; color: #51480f; background: #fff; }
.email-ed-toolbar button:focus-visible, .email-ed-bubble button:focus-visible, .email-ed-pop button:focus-visible, .email-ed-pop input:focus-visible { outline: 2px solid #7c5e0088; outline-offset: 1px; }
.email-ed-toolbar button[aria-pressed="true"], .email-ed-bubble button[aria-pressed="true"], .email-ed-toolbar button[aria-expanded="true"] { border-color: #d4cbb5; color: #4f460c; background: #f1ece2; }
.email-ed-toolbar button:disabled { cursor: default; opacity: .38; }
.email-ed-toolbar .email-ed-menu.is-wide { justify-content: space-between; min-width: 92px; padding: 0 6px 0 9px; border-color: #dbe6e3; background: #fff; }
.email-ed-value { overflow: hidden; max-width: 104px; text-overflow: ellipsis; white-space: nowrap; }
.email-ed-icon { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.email-ed-icon circle { fill: currentColor; stroke: none; }
.email-ed-menu .email-ed-icon:last-child:not(:first-child) { width: 12px; height: 12px; opacity: .6; }
.email-ed-sep { flex: 0 0 auto; width: 1px; height: 20px; margin: 0 3px; background: #dbe5e2; }
.email-ed-size { display: inline-flex; align-items: center; border: 1px solid #dbe6e3; border-radius: 7px; background: #fff; }
.email-ed-size button { min-width: 24px; height: 28px; border: 0 !important; border-radius: 6px; }
.email-ed-size .email-ed-menu { min-width: 34px; font-variant-numeric: tabular-nums; }
.email-ed-glyph { font-size: 1.12em; }
.email-ed-glyph.is-bold { font-weight: 850; }
.email-ed-glyph.is-italic { font-family: Georgia, serif; font-style: italic; }
.email-ed-glyph.is-underline { text-decoration: underline; }
.email-ed-glyph.is-strike { text-decoration: line-through; }
.email-ed-color-a { display: inline-grid; justify-items: center; font-weight: 800; line-height: 1; }
.email-ed-color-a > span { width: 15px; height: 3px; margin-top: 1px; border-radius: 2px; background: #3c3922; }
.email-ed-toolbar .message-variable-picker { margin-left: auto; }
.email-ed-toolbar .message-variable-options { right: 0; left: auto; width: min(340px,calc(100vw - 44px)); max-height: min(240px,40vh); box-shadow: 0 5px 15px rgba(41, 41, 9,.1); }
.email-ed-toolbar [data-email-source-toggle] { margin-left: auto; border-color: #dbe6e3 !important; background: #fff; }
.email-ed-bubble { position: absolute; z-index: 30; display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid #3b391b; border-radius: 9px; background: #3b391b; box-shadow: 0 8px 22px rgba(41, 41, 9,.28); font-size: max(11px, calc(12px * var(--portal-text-scale, 1))); }
.email-ed-bubble button { min-width: 28px; height: 28px; color: #f4eee8; }
.email-ed-bubble button:hover { border-color: transparent; color: #fff; background: #514e29; }
.email-ed-bubble button[aria-pressed="true"] { border-color: transparent; color: #fff; background: #635d33; }
.email-ed-bubble .email-ed-color-a > span { outline: 1px solid #ffffff55; }
.email-ed-bubble .email-ed-size { border-color: #5f5c37; background: transparent; }
.email-ed-bubble .email-ed-size button { min-width: 24px; }
.email-ed-pop { position: absolute; z-index: 31; width: max-content; min-width: 180px; max-width: min(340px, calc(100% - 12px)); max-height: min(440px, 72vh); overflow: auto; padding: 8px; border: 1px solid #e2dcd6; border-radius: 11px; color: #4a492a; background: #fff; box-shadow: 0 12px 32px rgba(41, 41, 9,.18); font-size: max(11px, calc(12.5px * var(--portal-text-scale, 1))); animation: email-ed-pop .12s ease-out; }
@keyframes email-ed-pop { from { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .email-ed-pop { animation: none; } }
.email-ed-pop-body { display: grid; gap: 6px; }
.email-ed-pop-title { padding: 2px 4px 4px; color: #434223; font-weight: 800; }
.email-ed-hint { color: #8d8a75; font-size: .9em; font-weight: 500; }
.email-ed-upload { position: relative; display: inline-flex; align-self: flex-start; }
.email-ed-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.email-ed-upload span { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 1px solid #cfdcd8; border-radius: 7px; color: #4b4a27; background: #faf8f6; font-weight: 600; }
.email-ed-upload input:focus-visible + span { outline: 2px solid #636e21; outline-offset: 2px; }
.email-ed-upload svg { width: 15px; height: 15px; }
.email-ed-list button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 32px; padding: 5px 10px; border: 0; border-radius: 7px; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.email-ed-list button:hover, .email-ed-list button[aria-checked="true"] { background: #f6f3ee; }
.email-ed-list button[aria-checked="true"] { color: #4f460c; font-weight: 700; }
.email-ed-list.is-blocks .is-h1 { font-size: 1.5em; font-weight: 800; }
.email-ed-list.is-blocks .is-h2 { font-size: 1.3em; font-weight: 800; }
.email-ed-list.is-blocks .is-h3 { font-size: 1.12em; font-weight: 750; }
.email-ed-list.is-blocks .is-blockquote { border-left: 3px solid #dad9c9; border-radius: 0 7px 7px 0; color: #63624a; font-style: italic; }
.email-ed-list.is-insert button > span { display: grid; gap: 1px; }
.email-ed-list.is-insert .email-ed-icon { width: 18px; height: 18px; color: #59501f; }
.email-ed-item-title { font-weight: 700; }
.email-ed-sizes { display: grid; grid-template-columns: repeat(5, 44px); gap: 4px; }
.email-ed-size-custom input { flex: 0 1 76px; font-family: inherit; font-variant-numeric: tabular-nums; }
.email-ed-size-custom input[aria-invalid="true"] { border-color: #d64545; }
.email-ed-sizes button { height: 32px; border: 1px solid #eae5e1; border-radius: 7px; color: inherit; background: #fff; font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.email-ed-sizes button:hover, .email-ed-sizes button[aria-checked="true"] { border-color: #ccc1a4; color: #4f460c; background: #f6f3ee; font-weight: 750; }
/* Ten 20px swatches + nine 5px gaps = 245px: the panel is that wide, not narrower than its grid. */
.email-ed-colors { width: 245px; }
.email-ed-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.email-ed-swatches > .email-ed-hint { width: 100%; }
.email-ed-swatches.is-grid { display: grid; grid-template-columns: repeat(10, 20px); }
.email-ed-swatch { width: 20px; height: 20px; padding: 0; border: 1px solid #00000022; border-radius: 6px; cursor: pointer; transition: transform .1s; }
.email-ed-swatch:hover { transform: scale(1.15); }
.email-ed-hex { display: flex; align-items: center; gap: 6px; padding-top: 4px; }
.email-ed-hex-preview { width: 26px; height: 26px; flex: 0 0 auto; border: 1px solid #e2dcd6; border-radius: 7px; background: repeating-conic-gradient(#f2f0ee 0 25%, #fff 0 50%) 0 0/10px 10px; }
.email-ed-hex input { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid #e2dcd6; border-radius: 7px; font: inherit; font-family: ui-monospace, Consolas, monospace; }
.email-ed-hex input[aria-invalid="true"] { border-color: #d64545; }
.email-ed-hex button, .email-ed-reset, .email-ed-form-actions button, .email-ed-block-actions button { height: 30px; padding: 0 11px; border: 1px solid #e2dcd6; border-radius: 7px; color: #4a492a; background: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.email-ed-hex button:hover, .email-ed-reset:hover, .email-ed-form-actions button:hover, .email-ed-block-actions button:hover { border-color: #ccc1a4; background: #f8f5f2; }
.email-ed-form { width: min(318px, 100%); gap: 9px; }
.email-ed-field { display: grid; gap: 4px; }
.email-ed-field > span { color: #737155; font-size: .92em; font-weight: 700; }
.email-ed-field input { height: 34px; padding: 0 10px; border: 1px solid #e2dcd6; border-radius: 8px; color: #3c3922; background: #fff; font: inherit; }
.email-ed-field input:focus { border-color: #c1c265; outline: 0; box-shadow: 0 0 0 3px rgba(95, 97, 23,.12); }
.email-ed-hint.is-ok { color: #1c8f62; }
.email-ed-hint.is-bad, .email-ed-error { color: #b42318; }
.email-ed-error { margin: 0; font-size: .92em; }
.email-ed-choice { display: flex; flex-wrap: wrap; gap: 4px; }
.email-ed-choice label { position: relative; cursor: pointer; }
.email-ed-choice input { position: absolute; opacity: 0; pointer-events: none; }
.email-ed-choice span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid #e2dcd6; border-radius: 99px; font-weight: 650; }
.email-ed-choice input:checked + span { border-color: #59501f; color: #4f460c; background: #f1ece2; }
.email-ed-choice input:focus-visible + span { outline: 2px solid #7c5e0088; outline-offset: 1px; }
.email-ed-choice.is-colors span { width: 24px; height: 24px; padding: 0; border-radius: 50%; border-color: #00000022; }
.email-ed-choice.is-colors input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #59501f; }
.email-ed-block-actions { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 7px; border-top: 1px solid #f2f0ed; }
.email-ed-block-actions .is-danger { margin-left: auto; color: #b42318; }
.email-ed-form-actions { display: flex; align-items: center; gap: 6px; }
.email-ed-form-actions > span { flex: 1; }
.email-ed-form-actions .is-primary { border-color: #5b5211; color: #fff; background: #5b5211; }
.email-ed-form-actions .is-primary:hover { border-color: #4f470e; background: #4f470e; }
.email-ed-open { color: #5b5211; font-weight: 650; text-decoration: none; }
@media (max-width: 760px) {
  .email-ed-toolbar { gap: 2px; padding: 5px; }
  .email-ed-toolbar .email-ed-menu.is-wide { min-width: 0; }
  .email-ed-value { max-width: 62px; }
}
/* The fresh sign-in window over the page, and the renewal notice (public/app/fresh-signin.js). */
body.signin-confirm-open { overflow: hidden; }
.signin-confirm-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(27, 37, 13, .55); }
.signin-confirm-frame { width: min(440px, 100%); height: 420px; max-height: calc(100vh - 32px); border: 0; border-radius: 14px; background: var(--white, #fff); box-shadow: 0 24px 60px rgba(27, 37, 13, .35); }
.signin-renew { position: fixed; right: 16px; bottom: 16px; z-index: 900; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border: 1px solid var(--line, #e2e7d7); border-radius: 12px; background: var(--white, #fff); color: var(--text, #2d341d); box-shadow: 0 10px 30px rgba(27, 37, 13, .18); }
.signin-renew-action { padding: 6px 12px; border: 0; border-radius: 8px; background: var(--brand-blue, #7bc312); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.signin-renew-close { padding: 2px 8px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 1.2em; line-height: 1; cursor: pointer; }
.signin-renew-action:focus-visible, .signin-renew-close:focus-visible { outline: 2px solid var(--brand-blue, #7bc312); outline-offset: 2px; }
/* The vendor's Suporte session (3E.1 pass 5): above every screen, Conversas included. */
.support-bar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 14px; padding: 6px 16px; background: #5b21b6; color: #fff; font-size: 13px; line-height: 1.4; }
.support-bar span { flex: 1; min-width: 0; }
.support-bar a { padding: 3px 10px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 7px; color: #fff; text-decoration: none; white-space: nowrap; }
.support-bar a:hover, .support-bar a:focus-visible { background: rgba(255, 255, 255, .16); outline: none; }
/* The status box's bell and its notification panel (public/app/notifications.js). */
.status-title { flex: 1; min-width: 0; }
.status-bell { position: relative; display: inline-grid; width: 26px; height: 26px; flex: 0 0 auto; margin: -5px -5px -5px auto; place-items: center; padding: 0; border: 0; border-radius: 8px; color: #acaa91; background: transparent; cursor: pointer; transition: background .15s ease, color .15s ease; }
.status-bell svg { width: 15px; height: 15px; }
.status-bell:hover, .status-bell[aria-expanded="true"] { color: #f5f5ed; background: rgba(255,255,255,.08); }
.status-bell:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.status-bell.has-unseen { color: #f5f5ed; }
.status-bell.has-unseen svg { animation: status-bell-ring 1.4s ease 1; transform-origin: 50% 15%; }
.status-bell-count { position: absolute; top: 1px; right: 0; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; color: #fff; background: #e27171; box-shadow: 0 0 0 2px var(--night); font-size: 9px; font-weight: 750; line-height: 14px; text-align: center; }
.status-bell-count[hidden] { display: none; }
.status-seen-button[hidden], #refreshStatus[hidden] { display: none; }
@keyframes status-bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .status-bell.has-unseen svg { animation: none; } }

.notification-panel { position: fixed; z-index: 50; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; color: #f2f2ea; background: var(--night-2); box-shadow: 0 22px 54px rgba(17, 19, 4,.42), 0 4px 14px rgba(17, 19, 4,.22); animation: notification-panel-in .16s ease; }
.notification-panel[hidden] { display: none; }
.notification-panel:focus { outline: none; }
@keyframes notification-panel-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .notification-panel { animation: none; } }
.notification-panel-head { display: flex; align-items: center; gap: 8px; padding: 13px 12px 11px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.notification-panel-head strong { flex: 1; font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; }
.notification-clear, .notification-undo button { padding: 4px 8px; border: 0; border-radius: 7px; color: #e2e18e; background: transparent; font: inherit; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.notification-clear:hover, .notification-undo button:hover { background: rgba(255,255,255,.07); }
.notification-clear[hidden] { display: none; }
.notification-close, .notification-remove { display: inline-grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 8px; color: #acaa91; background: transparent; cursor: pointer; }
.notification-close svg, .notification-remove svg { width: 13px; height: 13px; }
.notification-close:hover, .notification-remove:hover { color: #f5f5ed; background: rgba(255,255,255,.08); }
.notification-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; overscroll-behavior: contain; }
.notification-group h3 { margin: 10px 8px 4px; color: #9c9b7f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.notification-item { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 10px 6px 10px 10px; border-radius: 10px; transition: background .15s ease; }
.notification-item:hover { background: rgba(255,255,255,.045); }
.notification-item.is-unseen { background: rgba(226, 225, 142,.06); }
.notification-item.is-unseen::before { content: ""; position: absolute; top: 50%; left: 2px; width: 4px; height: 4px; border-radius: 50%; background: #e2e18e; transform: translateY(-50%); }
.notification-icon { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #e0a84d; background: rgba(224,168,77,.13); }
.notification-icon svg { width: 15px; height: 15px; }
.is-bad > .notification-icon { color: #ef8c8c; background: rgba(226,113,113,.14); }
.is-good > .notification-icon, .notification-icon.is-good { color: #5fd1a6; background: rgba(67,197,148,.13); }
.notification-body { display: grid; flex: 1; min-width: 0; gap: 2px; }
.notification-body strong { font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.notification-body > span { overflow: hidden; color: #c8c4b7; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.notification-body small { display: flex; align-items: center; gap: 6px; color: #9c9b7f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.notification-body em { padding: 0 6px; border-radius: 6px; color: #e2e18e; background: rgba(226, 225, 142,.12); font-style: normal; font-weight: 700; }
.notification-remove { opacity: 0; transition: opacity .15s ease; }
.notification-item:hover .notification-remove, .notification-remove:focus-visible { opacity: 1; }
@media (hover: none) { .notification-remove { opacity: 1; } }
.notification-undo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 2px 2px; padding: 7px 6px 7px 12px; border-radius: 10px; color: #c8c4b7; background: rgba(255,255,255,.06); font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.notification-empty { display: grid; justify-items: center; gap: 6px; padding: 34px 16px 30px; text-align: center; }
.notification-empty .notification-icon { width: 38px; height: 38px; margin-bottom: 4px; }
.notification-empty strong { font-size: calc((13px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.notification-empty small { color: #9c9b7f; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.notification-panel-foot { padding: 9px 16px 11px; border-top: 1px solid rgba(255,255,255,.07); color: #8c8b6f; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
/* #agenda: the approved 3A.1 screens, every rule under .agenda-app so the panel's names stay its own. */
.agenda-app {
    --bg: #f4f6f4; --surface: #fff; --surface-2: #f8faf9; --surface-3: #eff3f1;
  --line: #e4eae7; --line-2: #d6dfdb; --ink: #282912; --ink-2: #727256; --ink-3: #999884;
  --accent: var(--brand); --accent-ink: var(--brand-ink); --soft: color-mix(in oklab, var(--brand) 9%, #fff);
  --soft-2: color-mix(in oklab, var(--brand) 16%, #fff); --ring: color-mix(in oklab, var(--brand) 32%, transparent);
    
  --now: #939207; --ok: #1b9266; --warn: #b5760f; --warn-soft: #fbf3e4; --warn-line: #efdcb9; --bad: #cf3f3f; --bad-soft: #fcefef; --bad-line: #f2cfcf;
  --s1: #7fa21f; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --shadow-1: 0 1px 2px rgba(40, 41, 18,.05), 0 2px 8px rgba(40, 41, 18,.04);
  --shadow-2: 0 2px 6px rgba(40, 41, 18,.06), 0 12px 32px rgba(40, 41, 18,.1);
  --shadow-3: 0 8px 18px rgba(40, 41, 18,.1), 0 28px 64px rgba(40, 41, 18,.18);
  --ev-mix: 13%; --ev-line: 28%; --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] .agenda-app {
  --bg: #191a0d; --surface: #222414; --surface-2: #2a2b19; --surface-3: #32341f;
  --line: #373823; --line-2: #45462e; --ink: #f1f1e9; --ink-2: #bdbca9; --ink-3: #919178;
  --accent: color-mix(in oklab, var(--brand) 62%, #fff); --accent-ink: #181906;
  --soft: color-mix(in oklab, var(--accent) 13%, #222414); --soft-2: color-mix(in oklab, var(--accent) 22%, #222414);
  --ring: color-mix(in oklab, var(--accent) 38%, transparent);
   --now: #e4de11; --ok: #43c495; --warn: #e3a845; --warn-soft: #2b2415; --warn-line: #4c3d1e; --bad: #ef6b6b; --bad-soft: #2f1a1c; --bad-line: #57292c;
  --s1: #9dcc1b; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #3f9a3f;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3); --shadow-2: 0 2px 6px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.34); --shadow-3: 0 8px 18px rgba(0,0,0,.35), 0 28px 64px rgba(0,0,0,.5);
  --ev-mix: 24%; --ev-line: 46%; color-scheme: dark;
}
.agenda-app .ag-rep-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.agenda-app .ag-rep-list { margin-top: 10px; }
.agenda-app .ag-rep-table { margin-top: 8px; }
.agenda-app .ag-rep-none { padding: 16px 0; font-size: 12.5px; }
@media (max-width: 1100px) { .agenda-app .tiles { grid-template-columns: repeat(3,minmax(0,1fr)); } .agenda-app .grid3, .agenda-app .grid2 { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 640px) { .agenda-app .tiles { grid-template-columns: repeat(2,minmax(0,1fr)); } .agenda-app .page { padding: 12px; } .agenda-app .heat i { min-height: 12px; } }
.agenda-app .top-search { display: flex; align-items: center; gap: 8px; width: 216px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink-3); font-size: 12px; }
.agenda-app .top-search kbd { margin-left: auto; }
.agenda-app .ibtn { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); transition: all .15s; }
.agenda-app .ibtn:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-2); }
.agenda-app .ibtn.on { color: var(--accent); border-color: var(--ring); background: var(--soft); }
.agenda-app .ibtn.ghost { border-color: transparent; background: none; }
.agenda-app .today-btn { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); transition: all .15s; }
.agenda-app .today-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.agenda-app .today-btn.on { border-color: var(--ring); background: var(--soft); }
.agenda-app .today-btn b { font-weight: 650; font-size: 12.5px; }
.agenda-app .today-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.agenda-app .avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--soft); color: var(--accent); font-size: 11px; font-weight: 600; }
.agenda-app .avatar.s { width: 24px; height: 24px; border-radius: 8px; font-size: 10px; }
.agenda-app .avatar.l { width: 42px; height: 42px; border-radius: 13px; font-size: 14px; }
.agenda-app .content { min-height: 0; min-width: 0; overflow: hidden; }
.agenda-app .scroll { height: 100%; overflow: auto; }
.agenda-app .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12.5px; white-space: nowrap; transition: all .15s; }
.agenda-app .btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.agenda-app .btn.pri { border-color: transparent; background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 6px 14px color-mix(in oklab, var(--accent) 24%, transparent); }
.agenda-app .btn.pri:hover { filter: brightness(1.08); }
.agenda-app .btn.soft { border-color: transparent; background: var(--soft); color: var(--accent); }
.agenda-app .btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.agenda-app .btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.agenda-app .btn.danger { color: var(--bad); border-color: var(--bad-line); }
.agenda-app .btn.danger:hover { background: var(--bad-soft); }
.agenda-app .btn.sm { min-height: 28px; padding: 0 9px; border-radius: 8px; font-size: 11.5px; }
.agenda-app .btn:disabled { opacity: .5; cursor: not-allowed; }
.agenda-app .field { display: grid; gap: 5px; font-size: 11.5px; color: var(--ink-2); min-width: 0; }
.agenda-app .inp { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12.5px; transition: border .15s, box-shadow .15s; }
.agenda-app .inp:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.agenda-app textarea.inp { min-height: 70px; resize: vertical; }
.agenda-app .inp.tiny { width: 66px; min-height: 28px; padding: 3px 7px; text-align: center; display: inline-block; border-radius: 8px; }
.agenda-app .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-3); }
.agenda-app .seg button { min-height: 28px; padding: 0 11px; border-radius: 8px; color: var(--ink-2); font-size: 12px; white-space: nowrap; transition: all .15s; }
.agenda-app .seg button:hover { color: var(--ink); }
.agenda-app .seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.agenda-app .switch { position: relative; flex: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); transition: background .15s; }
.agenda-app .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.agenda-app .switch.on { background: var(--accent); }
.agenda-app .switch.on::after { transform: translateX(14px); }
.agenda-app .chip { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.agenda-app .chip.ok { background: color-mix(in oklab, var(--ok) 13%, var(--surface)); color: var(--ok); }
.agenda-app .chip.warn { background: var(--warn-soft); color: var(--warn); }
.agenda-app .chip.bad { background: var(--bad); color: #fff; }
.agenda-app .chip.acc { background: var(--soft); color: var(--accent); }
.agenda-app .chip svg.i { width: 12px; height: 12px; }
.agenda-app .card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.agenda-app .card-title { font-size: 13.5px; color: var(--ink); }
.agenda-app .card-sub { margin-top: 2px; color: var(--ink-2); font-size: 12px; }
.agenda-app .empty-note { display: grid; place-items: center; align-content: center; gap: 6px; padding: 26px 12px; color: var(--ink-3); text-align: center; }
.agenda-app .ag { display: grid; grid-template-rows: 54px minmax(0,1fr); height: 100%; min-height: 0; }
.agenda-app .ag-head { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.agenda-app .ag-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 15.5px; letter-spacing: -.012em; white-space: nowrap; }
.agenda-app .ag-title small { font-size: 11.5px; color: var(--ink-3); letter-spacing: 0; }
.agenda-app .ag-body { display: grid; grid-template-columns: 226px minmax(0,1fr) 0; min-height: 0; transition: grid-template-columns .22s cubic-bezier(.2,.8,.2,1); }
.agenda-app .ag-body.rail-off { grid-template-columns: 0 minmax(0,1fr) 0; }
.agenda-app .ag-body.drawer-on { grid-template-columns: 226px minmax(0,1fr) 396px; }
.agenda-app .ag-body.rail-off.drawer-on { grid-template-columns: 0 minmax(0,1fr) 396px; }
.agenda-app .rail { min-height: 0; overflow: hidden auto; padding: 12px 12px 18px; border-right: 1px solid var(--line); background: var(--surface); }
.agenda-app .ag-body.rail-off .rail { padding: 0; border: 0; overflow: hidden; }
.agenda-app .rail h4 { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 6px; font-size: 11px; letter-spacing: .03em; color: var(--ink-3); }
.agenda-app .mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 12.5px; }
.agenda-app .mini { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.agenda-app .mini span { display: grid; place-items: center; height: 18px; font-size: 10px; color: var(--ink-3); text-transform: uppercase; }
.agenda-app .mini button { position: relative; aspect-ratio: 1; border-radius: 8px; font-size: 11.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.agenda-app .mini button:hover { background: var(--surface-3); }
.agenda-app .mini button.out { color: var(--ink-3); }
.agenda-app .mini button.wk { background: var(--soft); border-radius: 0; }
.agenda-app .mini button.wk.st { border-radius: 8px 0 0 8px; }
.agenda-app .mini button.wk.en { border-radius: 0 8px 8px 0; }
.agenda-app .mini button.sel { background: var(--soft-2); }
.agenda-app .mini button.tod { background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-weight: 600; }
.agenda-app .mini button i { position: absolute; left: 50%; bottom: 3px; width: 10px; height: 2px; margin-left: -5px; border-radius: 2px; background: var(--ink-3); opacity: var(--load, 0); }
.agenda-app .mini button.tod i { background: var(--accent-ink); }
.agenda-app .pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 0 6px; border-radius: 8px; text-align: left; font-size: 12.5px; color: var(--ink); transition: background .12s; }
.agenda-app .pick:hover { background: var(--surface-3); }
.agenda-app .pick .box { display: grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid var(--c, var(--ink-3)); color: #fff; }
.agenda-app .pick.on .box { background: var(--c, var(--accent)); }
.agenda-app .pick .box svg { width: 10px; height: 10px; stroke-width: 2.6; opacity: 0; }
.agenda-app .pick.on .box svg { opacity: 1; }
.agenda-app .pick small { margin-left: auto; color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.agenda-app .pick .tag { font-size: 10px; color: var(--ink-3); }
.agenda-app .cal-area { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); overflow: hidden; background: var(--surface); }
.agenda-app .bar-bulk { display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--soft); }
.agenda-app .tg { height: 100%; min-height: 0; }
.agenda-app .tg-head { position: sticky; top: 0; display: grid; grid-template-columns: 52px minmax(0,1fr); width: max-content; min-width: 100%; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 2px 6px rgba(40, 41, 18,.03); z-index: 7; }
.agenda-app .tg-head > div:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.agenda-app .tg-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(var(--min,0),1fr)); }
.agenda-app .tg-dh { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 4px; border-left: 1px solid var(--line); color: var(--ink-2); font-size: 12px; }
.agenda-app .tg-dh b { display: grid; place-items: center; min-width: 27px; height: 27px; padding: 0 3px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.agenda-app .tg-dh.tod b { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.agenda-app .tg-dh.tod { color: var(--accent); }
.agenda-app .tg-dh em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.agenda-app .rh { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 5px 9px; border-left: 1px solid var(--line); min-width: 0; }
.agenda-app .rh > div { min-width: 0; flex: 1; }
.agenda-app .rh strong { display: block; font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .rh small { display: block; color: var(--ink-3); font-size: 10.5px; }
.agenda-app .meter { height: 3px; margin-top: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.agenda-app .meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.agenda-app .tg-allday { grid-column: 1/-1; display: grid; grid-template-columns: 52px minmax(0,1fr); border-top: 1px solid var(--line); }
.agenda-app .tg-scroll { position: relative; overflow: auto; height: 100%; min-height: 0; }
.agenda-app .tg-grid { display: grid; grid-template-columns: 52px minmax(0,1fr); position: relative; width: max-content; min-width: 100%; }
.agenda-app .tg-hours { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.agenda-app .tg-hours span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--ink-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.agenda-app .tg-body { display: grid; grid-template-columns: repeat(var(--n), minmax(var(--min,0),1fr)); position: relative; }
.agenda-app .col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(color-mix(in oklab, var(--line) 50%, transparent) 1px, transparent 1px); background-size: 100% var(--px), 100% calc(var(--px) / 2); cursor: cell; touch-action: pan-y; }
.agenda-app .col.today-col { background-color: color-mix(in oklab, var(--accent) 2.5%, transparent); }
.agenda-app .col.drop { background-color: var(--soft); }
.agenda-app .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in oklab, var(--ink-3) 8%, transparent) 5px 6px), color-mix(in oklab, var(--surface-3) 62%, transparent); pointer-events: none; }
.agenda-app .off.brk span { position: absolute; left: 6px; top: 2px; font-size: 10px; color: var(--ink-3); }
.agenda-app .hint { position: absolute; left: 3px; right: 5px; height: calc(var(--px) / 4); min-height: 16px; display: none; align-items: center; padding: 0 6px; border-radius: 7px; background: var(--soft); color: var(--accent); font-size: 10.5px; pointer-events: none; z-index: 1; }
.agenda-app .now { position: absolute; left: -1px; right: 0; height: 0; border-top: 2px solid var(--now); z-index: 0; pointer-events: none; }
.agenda-app .now::before { content: ""; position: absolute; left: -4px; top: -4.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 3px color-mix(in oklab, var(--now) 24%, transparent); }
.agenda-app .now.nodot::before { display: none; }
.agenda-app .now-time { position: absolute; left: 0; width: 52px; text-align: right; padding-right: 6px; transform: translateY(-50%); color: var(--now); font-size: 10.5px; font-weight: 600; z-index: 5; background: var(--surface); font-variant-numeric: tabular-nums; }
.agenda-app .ev { position: absolute; display: flex; flex-direction: column; overflow: hidden; padding: 3px 7px 3px 8px; border: 1px solid color-mix(in oklab, var(--c) var(--ev-line), var(--surface)); border-left: 3px solid var(--c); border-radius: 8px; background: color-mix(in oklab, var(--c) var(--ev-mix), var(--surface)); color: var(--ink); font-size: 11.5px; line-height: 1.28; text-align: left; cursor: grab; touch-action: none; box-shadow: 0 1px 1px rgba(40, 41, 18,.03); transition: box-shadow .14s, transform .14s; z-index: 1; user-select: none; }
.agenda-app .ev:hover { z-index: 3; box-shadow: var(--shadow-2); }
.agenda-app .ev.sel { z-index: 3; box-shadow: 0 0 0 2px var(--accent), var(--shadow-2); }
.agenda-app .ev .t { font-size: 10.5px; color: var(--ink-2); display: flex; gap: 4px; align-items: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.agenda-app .ev .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.agenda-app .ev .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); font-size: 10.5px; }
.agenda-app .ev.tiny { flex-direction: row; align-items: center; gap: 6px; padding-block: 0; }
.agenda-app .ev.tiny .t { flex: none; }
.agenda-app .ev.tiny .n { flex: 1; min-width: 0; }
.agenda-app .ev.tiny .mk { flex: none; display: inline-flex; align-items: center; color: var(--ink-2); font-size: 10.5px; }
.agenda-app .ev svg.i { width: 11px; height: 11px; }
.agenda-app .ev .rz { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.agenda-app .ev .rz::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: var(--ink-3); opacity: 0; transition: opacity .12s; }
.agenda-app .ev:hover .rz::after { opacity: .7; }
.agenda-app .ev.pending { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--c) 7%, var(--surface)) 0 6px, color-mix(in oklab, var(--c) 15%, var(--surface)) 6px 12px); border-style: dashed; border-left-style: solid; }
.agenda-app .ev.done { opacity: .62; }
.agenda-app .ev.done .n { text-decoration: none; }
.agenda-app .ev.arrived { background: color-mix(in oklab, var(--c) calc(var(--ev-mix) + 14%), var(--surface)); }
.agenda-app .ev.no_show { background: var(--bad-soft); border-color: var(--bad-line); border-left-color: var(--bad); }
.agenda-app .ev.cancelled { opacity: .5; }
.agenda-app .ev.cancelled .n { text-decoration: line-through; }
.agenda-app .ev.conflict { box-shadow: 0 0 0 1.5px var(--bad); }
.agenda-app .ev.hold { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, transparent 6px 12px); background-size: 200% 200%; animation: ag-holdmove 2.4s linear infinite; }
.agenda-app .ev.busy { --c: var(--ink-3); background: repeating-linear-gradient(135deg, var(--surface-3) 0 5px, var(--surface-2) 5px 10px); color: var(--ink-2); cursor: default; }
.agenda-app .ev.chip-ev { position: relative; }
@keyframes ag-holdmove { to { background-position: 34px 0; } }
.agenda-app .dragh { position: absolute; left: 3px; right: 5px; padding: 3px 8px; border: 1.5px dashed var(--accent); border-radius: 8px; background: color-mix(in oklab, var(--accent) 14%, var(--surface)); color: var(--ink); font-size: 11px; z-index: 6; pointer-events: none; box-shadow: var(--shadow-2); }
.agenda-app .dragh.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.agenda-app .dragh b { font-weight: 600; font-variant-numeric: tabular-nums; }
.agenda-app .allday-wrap { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0,1fr)); min-height: 24px; }
.agenda-app .ad { margin: 2px; padding: 0 7px; border-radius: 6px; background: color-mix(in oklab, var(--c) var(--ev-mix), var(--surface)); border-left: 3px solid var(--c); font-size: 11px; line-height: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.agenda-app .tl { display: grid; grid-template-rows: auto minmax(0,1fr); height: 100%; min-height: 0; }
.agenda-app .tl-scroll { overflow: auto; height: 100%; }
.agenda-app .tl-grid { display: grid; grid-template-columns: 196px repeat(var(--n), 46px); grid-template-rows: auto repeat(var(--rows), minmax(62px, 96px)); width: max-content; min-width: 100%; height: 100%; align-content: start; }
.agenda-app .tl-corner, .agenda-app .tl-d { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.agenda-app .tl-corner { left: 0; z-index: 5; padding: 10px; color: var(--ink-3); font-size: 11px; border-right: 1px solid var(--line); }
.agenda-app .tl-d { display: grid; place-items: center; min-height: 48px; border-left: 1px solid var(--line); font-size: 10.5px; color: var(--ink-3); }
.agenda-app .tl-d b { font-weight: 500; font-size: 13px; color: var(--ink); }
.agenda-app .tl-d.tod { background: var(--soft); color: var(--accent); }
.agenda-app .tl-d.tod b { color: var(--accent); font-weight: 600; }
.agenda-app .tl-d.we { background: var(--surface-2); }
.agenda-app .tl-r { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 8px; min-height: 62px; padding: 8px 10px; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.agenda-app .tl-r strong { display: block; font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .tl-r small { color: var(--ink-3); font-size: 10.5px; }
.agenda-app .tl-row { position: relative; grid-column: 2/-1; display: grid; grid-template-columns: repeat(var(--n), 46px); border-bottom: 1px solid var(--line); }
.agenda-app .tl-row > span { border-left: 1px solid var(--line); cursor: cell; }
.agenda-app .tl-row > span.we { background: var(--surface-2); }
.agenda-app .tl-row > span.tod { background: var(--soft); }
.agenda-app .tl-row > span.drop { background: var(--soft-2); }
.agenda-app .tl-bar { position: absolute; top: 9px; bottom: 9px; left: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 8px; border: 1px solid color-mix(in oklab, var(--c) var(--ev-line), var(--surface)); border-left: 3px solid var(--c); border-radius: 9px; background: color-mix(in oklab, var(--c) var(--ev-mix), var(--surface)); font-size: 11.5px; line-height: 1.25; text-align: left; overflow: hidden; white-space: nowrap; cursor: grab; touch-action: none; }
.agenda-app .tl-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-app .tl-bar small { white-space: nowrap; color: var(--ink-2); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .tl-bar.pending { border-style: dashed; border-left-style: solid; background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--c) 7%, var(--surface)) 0 6px, color-mix(in oklab, var(--c) 15%, var(--surface)) 6px 12px); }
.agenda-app .tl-bar.sel { box-shadow: 0 0 0 2px var(--accent); }
.agenda-app .tl-buffer { position: absolute; top: 18px; bottom: 18px; border-radius: 0 7px 7px 0; background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, transparent 4px 8px); pointer-events: none; }
.agenda-app .mo { display: grid; grid-template-rows: auto minmax(0,1fr); height: 100%; min-height: 0; }
.agenda-app .mo-head { display: grid; grid-template-columns: repeat(7,1fr); border-bottom: 1px solid var(--line); }
.agenda-app .mo-head span { padding: 8px; font-size: 11px; color: var(--ink-3); border-left: 1px solid var(--line); }
.agenda-app .mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); grid-auto-rows: minmax(0,1fr); min-height: 0; overflow: auto; }
.agenda-app .mo-day { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 94px; padding: 5px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; cursor: cell; background: color-mix(in oklab, var(--accent) calc(var(--load) * 8%), transparent); transition: background .12s; }
.agenda-app .mo-day.out { opacity: .5; }
.agenda-app .mo-day.drop { background: var(--soft-2); }
.agenda-app .mo-num { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.agenda-app .mo-num b { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; font-weight: 500; }
.agenda-app .mo-num small { font-size: 10px; color: var(--ink-3); }
.agenda-app .mo-day.tod .mo-num b { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.agenda-app .pill { display: flex; align-items: center; gap: 5px; flex: none; min-height: 19px; padding: 0 5px; border-radius: 5px; font-size: 10.5px; color: var(--ink); text-align: left; cursor: grab; white-space: nowrap; overflow: hidden; background: color-mix(in oklab, var(--c) calc(var(--ev-mix) - 3%), var(--surface)); touch-action: none; }
.agenda-app .pill i { flex: none; width: 3px; height: 11px; border-radius: 2px; background: var(--c); }
.agenda-app .pill em { font-style: normal; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.agenda-app .pill.pending { background: none; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 46%, transparent); }
.agenda-app .pill-more { font-size: 10.5px; color: var(--ink-2); text-align: left; padding: 0 5px; }
.agenda-app .ls { height: 100%; overflow: auto; padding: 0 14px 20px; }
.agenda-app .ls-day { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px 2px 6px; background: var(--surface); font-size: 12.5px; }
.agenda-app .ls-day small { color: var(--ink-3); text-transform: none; }
.agenda-app .ls-row { display: grid; grid-template-columns: 22px 92px minmax(0,1.3fr) minmax(0,1fr) minmax(0,.9fr) 118px 26px; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px; border: 1px solid transparent; border-bottom-color: var(--line); border-radius: 0; cursor: pointer; transition: background .1s; width: 100%; text-align: left; }
.agenda-app .ls-row:hover { background: var(--surface-2); }
.agenda-app .ls-row.sel { background: var(--soft); }
.agenda-app .ls-time { font-variant-numeric: tabular-nums; font-size: 12px; }
.agenda-app .ls-time small { display: block; color: var(--ink-3); font-size: 10.5px; }
.agenda-app .ls-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.agenda-app .ls-who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .ls-svc { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink-2); }
.agenda-app .ls-svc i { flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.agenda-app .ls-svc span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .check { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-2); color: #fff; }
.agenda-app .check.on { background: var(--accent); border-color: var(--accent); }
.agenda-app .check svg { width: 10px; height: 10px; stroke-width: 2.6; opacity: 0; }
.agenda-app .check.on svg { opacity: 1; }
.agenda-app .stat { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); }
.agenda-app .stat i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.agenda-app .stat.confirmed i { background: var(--ok); }
.agenda-app .stat.arrived i { background: var(--now); box-shadow: 0 0 6px var(--now); }
.agenda-app .stat.pending i { background: none; box-shadow: inset 0 0 0 1.5px var(--warn); }
.agenda-app .stat.no_show i { background: var(--bad); }
.agenda-app .stat.no_show { color: var(--bad); }
.agenda-app .drawer { position: relative; z-index: 8; min-width: 0; min-height: 0; overflow: hidden; border-left: 1px solid var(--line); background: var(--surface); box-shadow: -8px 0 24px rgba(40, 41, 18,.05); }
.agenda-app .dw { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; width: 396px; height: 100%; }
.agenda-app .dw-top { position: relative; padding: 14px 16px 12px; background: linear-gradient(180deg, color-mix(in oklab, var(--c) 13%, var(--surface)), var(--surface)); }
.agenda-app .dw-actions-top { position: absolute; top: 9px; right: 9px; display: flex; gap: 2px; }
.agenda-app .dw-top h2 { font-size: 17px; letter-spacing: -.012em; margin-top: 7px; padding-right: 72px; }
.agenda-app .dw-top p { color: var(--ink-2); font-size: 12.5px; margin-top: 1px; }
.agenda-app .dw-when { display: grid; grid-template-columns: 20px 1fr; gap: 4px 7px; margin-top: 10px; color: var(--ink); font-size: 12.5px; align-items: center; }
.agenda-app .dw-when svg { color: var(--ink-3); }
.agenda-app .dw-steps { display: flex; gap: 6px; padding: 0 16px 12px; background: var(--surface); flex-wrap: wrap; }
.agenda-app .tabs { display: flex; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.agenda-app .tabs button { padding: 7px 0 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-size: 12px; }
.agenda-app .tabs button.on { color: var(--ink); border-color: var(--accent); }
.agenda-app .dw-body { overflow: auto; padding: 12px 16px 18px; }
.agenda-app .dw-sec { margin-bottom: 14px; }
.agenda-app .dw-sec > h4 { margin-bottom: 6px; font-size: 11px; letter-spacing: .03em; color: var(--ink-3); }
.agenda-app .who { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.agenda-app .who strong { display: block; font-weight: 500; }
.agenda-app .who small { color: var(--ink-2); font-size: 11.5px; }
.agenda-app .facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.agenda-app .facts div { padding: 8px 10px; background: var(--surface); text-align: center; }
.agenda-app .facts b { display: block; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.agenda-app .facts span { color: var(--ink-3); font-size: 10.5px; }
.agenda-app .tline { position: relative; padding-left: 16px; }
.agenda-app .tline::before { content: ""; position: absolute; left: 3.5px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.agenda-app .tline div { position: relative; padding-bottom: 9px; font-size: 12px; }
.agenda-app .tline div::before { content: ""; position: absolute; left: -16px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--ink-3); }
.agenda-app .tline div.on::before { background: var(--ok); border-color: var(--ok); }
.agenda-app .tline div.next::before { border-color: var(--accent); }
.agenda-app .tline small { display: block; color: var(--ink-3); font-size: 11px; }
.agenda-app .dw-foot { display: flex; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.agenda-app .sugg { display: flex; flex-wrap: wrap; gap: 5px; }
.agenda-app .sugg button { min-height: 28px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 11.5px; font-variant-numeric: tabular-nums; transition: all .12s; background: var(--surface); }
.agenda-app .sugg button:hover { border-color: var(--accent); color: var(--accent); background: var(--soft); }
.agenda-app .sugg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.agenda-app #agLayer { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.agenda-app #agLayer > * { pointer-events: auto; }
.agenda-app .pop { position: fixed; width: 366px; max-height: calc(100vh - 66px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-3); animation: ag-popin .16s cubic-bezier(.2,.9,.3,1.1); }
@keyframes ag-popin { from { opacity: 0; transform: translateY(-5px) scale(.985); } }
.agenda-app .pop-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 6px; }
.agenda-app .pop-body { padding: 8px 14px 14px; display: grid; gap: 10px; }
.agenda-app .pop-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 16px 16px; position: sticky; bottom: 0; }
.agenda-app .scrim { position: fixed; inset: 0; background: rgba(22, 23, 9,.4); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: ag-fade .16s; }
@keyframes ag-fade { from { opacity: 0; } }
.agenda-app .modal { width: min(560px,100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-3); animation: ag-popin .18s; }
.agenda-app .kbd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; padding: 4px 18px 18px; }
.agenda-app .kbd-grid div { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.agenda-app .results { display: grid; margin-top: 3px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.agenda-app .results button { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 3px 9px; text-align: left; border-bottom: 1px solid var(--line); }
.agenda-app .results button:last-child { border: 0; }
.agenda-app .results button:hover, .agenda-app .results button.on { background: var(--soft); }
.agenda-app .results small { display: block; color: var(--ink-3); font-size: 11px; }
.agenda-app .svc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.agenda-app .svc-chips button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 11.5px; transition: all .12s; background: var(--surface); }
.agenda-app .svc-chips i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.agenda-app .svc-chips button.on { border-color: var(--c); background: color-mix(in oklab, var(--c) var(--ev-mix), var(--surface)); }
.agenda-app .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.agenda-app .row { display: flex; align-items: center; gap: 8px; }
.agenda-app .row.between { justify-content: space-between; }
.agenda-app .qp-hero { padding: 14px; background: linear-gradient(180deg, var(--soft), var(--surface)); border-radius: 16px 16px 0 0; }
.agenda-app .qp-top { display: flex; align-items: center; justify-content: space-between; }
.agenda-app .qp-day { font-size: 14px; }
.agenda-app .qp-ring { --v: 0; width: 38px; height: 38px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.agenda-app .qp-ring span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.agenda-app .qp-next { margin-top: 10px; padding: 11px; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); text-align: left; width: 100%; display: block; }
.agenda-app .qp-next .in { color: var(--accent); font-size: 11.5px; }
.agenda-app .qp-next strong { display: block; font-size: 14px; font-weight: 500; margin-top: 1px; }
.agenda-app .qp-sec { padding: 8px 14px 2px; font-size: 11px; color: var(--ink-3); letter-spacing: .03em; }
.agenda-app .qp-row { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 3px 14px; text-align: left; transition: background .1s; }
.agenda-app .qp-row:hover { background: var(--surface-2); }
.agenda-app .qp-row time { width: 40px; flex: none; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.agenda-app .qp-row i { width: 3px; height: 24px; flex: none; border-radius: 2px; background: var(--c); }
.agenda-app .qp-row small { display: block; color: var(--ink-3); font-size: 11px; }
.agenda-app #agToasts { position: fixed; left: 50%; bottom: 22px; z-index: 60; display: grid; gap: 8px; transform: translateX(-50%); justify-items: center; pointer-events: none; }
.agenda-app .toast { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 8px 6px 14px; border-radius: 13px; background: #1f200f; color: #f3f2ea; font-size: 12.5px; box-shadow: var(--shadow-3); animation: ag-toastin .24s cubic-bezier(.2,.9,.3,1.1); pointer-events: auto; white-space: nowrap; }
.agenda-app .toast.bad { background: var(--bad); color: #fff; }
.agenda-app .toast button { min-height: 28px; padding: 0 9px; border-radius: 8px; color: #fbff7c; }
.agenda-app .toast button:hover { background: rgba(255,255,255,.1); }
.agenda-app .toast.bad button { color: #fff; }
@keyframes ag-toastin { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.agenda-app .page { max-width: 1180px; margin: 0 auto; padding: 16px 18px 40px; }
.agenda-app .tiles { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.agenda-app .tile { padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); text-align: center; }
.agenda-app .tile span { display: block; font-size: 11.5px; color: var(--ink-2); }
.agenda-app .tile b { display: block; margin: 2px 0; font-size: 23px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.agenda-app .tile small { color: var(--ink-3); font-size: 11px; }
.agenda-app .tile small.dl { color: var(--ink-2); }
.agenda-app .tile small.dl i { margin-right: 4px; font-style: normal; font-size: 8px; vertical-align: 1px; }
.agenda-app .tile small.dl i.up { color: var(--ok); }
.agenda-app .tile small.dl i.dn { color: var(--bad); }
.agenda-app .grid2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-bottom: 12px; }
.agenda-app .grid3 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; margin-bottom: 12px; }
.agenda-app .heat { display: grid; grid-template-columns: 40px repeat(var(--cols), minmax(0,1fr)); gap: 3px; margin-top: 12px; font-size: 10.5px; color: var(--ink-3); }
.agenda-app .heat-key { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 10.5px; color: var(--ink-3); }
.agenda-app .heat-key i { flex: 0 0 110px; height: 7px; border-radius: 7px; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 10%, var(--surface-3)), var(--accent)); }
.agenda-app .heat > span { align-self: center; }
.agenda-app .heat b { font-weight: 400; text-align: center; font-variant-numeric: tabular-nums; }
.agenda-app .heat i { aspect-ratio: 1.5; min-height: 18px; border-radius: 5px; background: color-mix(in oklab, var(--accent) calc(var(--v) * 1%), var(--surface-3)); cursor: default; transition: transform .1s; }
.agenda-app .heat i:hover { transform: scale(1.14); box-shadow: var(--shadow-2); }
.agenda-app .grid3 > .card { display: flex; flex-direction: column; }
.agenda-app .bars { flex: 1; display: flex; align-items: stretch; gap: 8px; min-height: 164px; margin-top: 14px; border-bottom: 1px solid var(--line); }
.agenda-app .bars div { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.agenda-app .bars b { position: absolute; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 500; color: var(--ink); }
.agenda-app .bars i { display: block; width: 100%; max-width: 22px; margin: 0 auto; border-radius: 4px 4px 0 0; background: var(--c, var(--accent)); min-height: 2px; }
.agenda-app .bars-x { display: flex; gap: 8px; margin-top: 5px; font-size: 10.5px; color: var(--ink-3); text-align: center; }
.agenda-app .bars-x span { flex: 1; }
.agenda-app .tip { position: fixed; z-index: 70; padding: 6px 9px; border-radius: 9px; background: #1f200f; color: #f3f2ea; font-size: 11.5px; pointer-events: none; box-shadow: var(--shadow-2); white-space: pre; }
.agenda-app .hb { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,2fr) 44px; gap: 10px; align-items: center; min-height: 28px; font-size: 12px; }
.agenda-app .hb > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .hb .track { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.agenda-app .hb .track.plain { background: none; }
.agenda-app .hb .track i { display: block; height: 100%; border-radius: 8px; background: var(--c, var(--accent)); }
.agenda-app .hb b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.agenda-app .legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--ink-2); }
.agenda-app .legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 3px; background: var(--c); }
.agenda-app table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.agenda-app table.t th { padding: 8px 10px; text-align: left; font-weight: 400; font-size: 11px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.agenda-app table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.agenda-app table.t td.r, .agenda-app table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.agenda-app table.t tr:last-child td { border-bottom: 0; }
.agenda-app .set { display: grid; grid-template-columns: 196px minmax(0,1fr); gap: 16px; align-items: start; max-width: 1180px; margin: 0 auto; padding: 16px 18px 40px; }
.agenda-app .set-nav { position: sticky; top: 16px; display: grid; gap: 2px; }
.agenda-app .set-nav button { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); font-size: 12.5px; text-align: left; transition: all .12s; }
.agenda-app .set-nav button:hover { background: var(--surface-3); color: var(--ink); }
.agenda-app .set-nav button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.agenda-app .set-nav button small { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.agenda-app .set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.agenda-app .set-head h2 { font-size: 17px; letter-spacing: -.012em; }
.agenda-app .set-head p { color: var(--ink-2); font-size: 12.5px; margin-top: 1px; }
.agenda-app .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px,1fr)); gap: 10px; }
.agenda-app .rcard { padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); text-align: left; transition: all .15s; display: block; width: 100%; }
.agenda-app .rcard:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.agenda-app .rcard strong { display: block; font-weight: 500; font-size: 13.5px; }
.agenda-app .rcard small { color: var(--ink-2); font-size: 11.5px; }
.agenda-app .svc-row { display: grid; grid-template-columns: 10px minmax(0,1.2fr) minmax(0,1.5fr) 88px 86px 76px; align-items: center; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.agenda-app .svc-row:last-child { border: 0; }
.agenda-app .svc-row:hover { background: var(--surface-2); }
.agenda-app .svc-row > i { width: 10px; height: 28px; border-radius: 4px; background: var(--c); }
.agenda-app .svc-row strong { display: block; font-weight: 500; }
.agenda-app .svc-row small { color: var(--ink-3); font-size: 11px; }
.agenda-app .dur { display: flex; height: 16px; border-radius: 5px; overflow: hidden; font-size: 9.5px; line-height: 16px; text-align: center; color: var(--ink-2); }
.agenda-app .dur span { background: var(--surface-3); min-width: 3px; }
.agenda-app .dur b { font-weight: 500; background: color-mix(in oklab, var(--c) var(--ev-mix), var(--surface)); color: var(--ink); }
.agenda-app .wk-ed { display: grid; grid-template-columns: 56px minmax(0,1fr) 34px; gap: 6px 10px; align-items: center; }
.agenda-app .wk-ed > span { font-size: 12px; color: var(--ink-2); }
.agenda-app .wk-track { position: relative; height: 32px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.agenda-app .wk-track i { position: absolute; top: 3px; bottom: 3px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--soft-2); box-shadow: inset 0 0 0 1px var(--ring); color: var(--ink); font-style: normal; font-size: 10.5px; cursor: ew-resize; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.agenda-app .wk-scale { display: flex; justify-content: space-between; grid-column: 2; color: var(--ink-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.agenda-app .sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.agenda-app .sentence:last-child { border: 0; }
.agenda-app .sentence .grow { min-width: 200px; }
.agenda-app .bot-lock { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-size: 12px; color: var(--ink); margin-top: 8px; }
.agenda-app .bot-lock svg { color: var(--accent); margin-top: 1px; }
.agenda-app .setup { display: flex; flex-direction: column; justify-content: flex-start; min-height: 100%; max-width: 920px; margin: 0 auto; padding: 11vh 20px 34px; text-align: center; }
.agenda-app .setup h1 { font-size: 24px; letter-spacing: -.02em; }
.agenda-app .setup > p { color: var(--ink-2); margin: 5px 0 20px; }
.agenda-app .setup-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; text-align: left; }
.agenda-app .setup-card { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); transition: all .16s; width: 100%; text-align: left; }
.agenda-app .setup-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.agenda-app .setup-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.agenda-app .setup-card strong { display: block; font-weight: 500; font-size: 14px; margin-top: 9px; }
.agenda-app .setup-card small { color: var(--ink-2); font-size: 12px; }
.agenda-app .setup-card .tic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--soft); color: var(--accent); }
.agenda-app .skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 300% 100%; animation: ag-sk 1.3s linear infinite; }
@keyframes ag-sk { to { background-position: -300% 0; } }
.agenda-app .m { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; height: 100vh; height: 100dvh; background: var(--surface); }
.agenda-app .m-top { display: flex; align-items: center; gap: 9px; padding: 13px 14px 6px; }
.agenda-app .m-top h1 { font-size: 19px; letter-spacing: -.02em; }
.agenda-app .m-top small { display: block; color: var(--ink-3); font-size: 11.5px; }
.agenda-app .m-week { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; padding: 4px 10px 9px; border-bottom: 1px solid var(--line); }
.agenda-app .m-week button { display: grid; gap: 1px; place-items: center; min-height: 54px; border-radius: 13px; color: var(--ink-2); font-size: 10.5px; }
.agenda-app .m-week b { font-size: 15px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.agenda-app .m-week i { width: 14px; height: 3px; border-radius: 3px; background: var(--accent); opacity: var(--load); }
.agenda-app .m-week button.on { background: var(--accent); color: var(--accent-ink); }
.agenda-app .m-week button.on b { color: var(--accent-ink); font-weight: 600; }
.agenda-app .m-week button.on i { background: var(--accent-ink); }
.agenda-app .m-list { overflow: auto; padding: 10px 12px 90px; }
.agenda-app .m-card { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 66px; padding: 9px 11px; margin-bottom: 7px; border: 1px solid color-mix(in oklab, var(--c) var(--ev-line), var(--surface)); border-left: 3px solid var(--c); border-radius: 13px; background: color-mix(in oklab, var(--c) calc(var(--ev-mix) - 5%), var(--surface)); text-align: left; }
.agenda-app .m-card time { font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.agenda-app .m-card time small { display: block; color: var(--ink-3); font-weight: 400; font-size: 11px; }
.agenda-app .m-card strong { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .m-card span { display: block; color: var(--ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .m-card.done { opacity: .6; }
.agenda-app .m-now { display: flex; align-items: center; gap: 7px; margin: 3px 0 9px; color: var(--now); font-size: 11px; font-weight: 600; }
.agenda-app .m-now::after { content: ""; flex: 1; height: 1.5px; background: var(--now); }
.agenda-app .m-fab { position: fixed; right: 16px; bottom: 76px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-3); z-index: 5; }
.agenda-app .m-fab svg { width: 21px; height: 21px; }
.agenda-app .sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow: auto; border-radius: 22px 22px 0 0; background: var(--surface); box-shadow: var(--shadow-3); animation: ag-sheet .24s cubic-bezier(.2,.9,.3,1); }
.agenda-app .sheet::before { content: ""; display: block; width: 38px; height: 4px; margin: 8px auto 2px; border-radius: 4px; background: var(--line-2); }
@keyframes ag-sheet { from { transform: translateY(40%); opacity: .4; } }
.agenda-app .sheet .dw { width: 100%; height: auto; }
@media (max-width: 1180px) {
.agenda-app .tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
.agenda-app .top-search span { display: none; }
.agenda-app .top-search { width: 40px; justify-content: center; }
.agenda-app .top-search kbd { display: none; }
}
@media (max-width: 980px) {
.agenda-app .ag-body.drawer-on, .agenda-app .ag-body { grid-template-columns: 0 minmax(0,1fr) 0; }
.agenda-app .rail { padding: 0; border: 0; }
.agenda-app .drawer { position: fixed; top: 92px; right: 0; bottom: 0; width: 0; z-index: 20; }
.agenda-app .ag-body.drawer-on .drawer { width: 396px; }
}
@media (prefers-reduced-motion: reduce) {
.agenda-app * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.content:has(> .agenda-app) { width: 100%; max-width: none; min-height: 0; height: calc(100vh - 65px); padding: 0; overflow: hidden; }
.main-shell:has(.agenda-app) .page-foot { display: none; }
.agenda-app { position: relative; height: 100%; background: var(--bg); color: var(--ink); font-size: 13px; line-height: 1.4; }
.agenda-app .ag-screen { height: 100%; min-height: 0; }
.agenda-app .ag-title { flex: 0 1 auto; overflow: hidden; }
.agenda-app .ag-head > * { flex-shrink: 0; }
.agenda-app .ag-head > .ag-title { flex-shrink: 1; }
.agenda-app .ag-head > .ag-search { flex: 0 1 178px; min-width: 96px; }
.agenda-app .tl-sum { position: absolute; top: 50%; translate: 0 -50%; height: 42px; display: grid; place-items: center; align-content: center; gap: 1px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--ink); cursor: pointer; padding: 0; }
.agenda-app .tl-sum b { font-size: 13px; font-weight: 600; }
.agenda-app .tl-sum small { font-size: 9.5px; color: var(--ink-3); }
.agenda-app .tl-sum:hover { border-color: var(--accent); }
.agenda-app .ag { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px 54px minmax(0, 1fr); min-height: 0; }
.agenda-app .ag-screen { min-width: 0; }
.agenda-app .fab { bottom: 88px; }
.agenda-app .ag:has(> .scroll) { grid-template-rows: 48px minmax(0, 1fr); }
.agenda-app .scroll { overflow: auto; min-height: 0; }
.agenda-app .ag-nav { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.agenda-app .ag-cal { position: relative; min-height: 0; height: 100%; }
.agenda-app .ag-search { width: 178px; background: var(--surface); }
.agenda-app .ag-search input { border: 0; outline: 0; background: none; width: 100%; font-size: 12px; color: var(--ink); }
.agenda-app .ag-cut { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-app .ag-min { min-width: 0; }
.agenda-app .ag-end { margin-left: auto; display: inline-flex; font-weight: 500; color: var(--ink); }
.agenda-app .ag-bad { color: var(--bad); }
.agenda-app .ag-live { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.agenda-app .ag-seat-meter { background: color-mix(in oklab, var(--c) 18%, transparent); }
.agenda-app .ag-seat-meter i { background: var(--c); }
.agenda-app .ag-over { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.agenda-app .ag-over .card { pointer-events: auto; text-align: center; max-width: 320px; box-shadow: var(--shadow-2); }
.agenda-app .ag-over .card-sub { margin: 4px 0 10px; }
.agenda-app .ag-fill { height: 100%; }
.agenda-app .ag-narrow { max-width: 380px; }
.agenda-app .ag-warn { color: var(--bad); border-color: var(--bad-line); background: var(--bad-soft); }
.agenda-app .ag-skel { padding: 14px; display: grid; gap: 10px; height: 100%; grid-template-rows: 40px 1fr; overflow: hidden; }
.agenda-app .ag-skel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.agenda-app .ag-skel-col { display: grid; gap: 8px; align-content: start; overflow: hidden; }
.agenda-app .ag-skel-line { height: 60px; margin: 12px; }
.agenda-app .tiny-btn { width: 26px; height: 26px; }
.agenda-app .ag-gap { gap: 5px; }
.agenda-app .ag-stat-pill { padding: 2px 8px; border-radius: 99px; background: var(--surface); }
.agenda-app .ag-wide { width: 100%; margin-bottom: 5px; padding: 7px 9px; text-align: left; }
.agenda-app .ag-space { margin-bottom: 8px; }
.agenda-app .ag-round { width: 30px; height: 30px; }
.agenda-app .ag-note { margin: 0; color: var(--ink-2); white-space: pre-wrap; }
.agenda-app .ag-small { font-size: 11.5px; }
.agenda-app .ag-who { padding: 7px 9px; }
.agenda-app .ag-count { min-width: 20px; text-align: center; font-weight: 600; }
.agenda-app .ag-warn-box { background: var(--warn-soft); }
.agenda-app .ag-warn-box svg { color: var(--warn); }
.agenda-app .ag-top { margin-top: 7px; }
.agenda-app .ag-top2 { margin-top: 12px; }
.agenda-app .ag-left { margin-top: 14px; text-align: left; }
.agenda-app .ag-preview { margin: 10px 0 12px; }
.agenda-app .ag-wrap { flex-wrap: wrap; gap: 4px; }
.agenda-app .ag-off { opacity: .55; }
.agenda-app .ag-flush { padding: 0; overflow: hidden; }
.agenda-app .ag-svc { grid-template-columns: 4px minmax(150px, 1fr) minmax(160px, 1.3fr) 76px; }
.agenda-app .ag-hours { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.agenda-app .ag-range { gap: 4px; }
.agenda-app .ag-range .inp.tiny { width: 116px; }
.agenda-app .dw { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
@media (max-width: 1380px) {
  .agenda-app .ag-title small { display: none; }
  .agenda-app .ag-head > .ag-search { flex: 0 0 36px; min-width: 36px; padding-inline: 10px; transition: flex-basis .18s ease; }
  .agenda-app .ag-head > .ag-search:focus-within { flex-basis: 178px; }
}
.agenda-app .ag-select { width: auto; }
.agenda-app .ag-exc { margin: 10px 0; gap: 6px; }
.agenda-app .ag-rules { padding: 4px 16px; }
.agenda-app .ag-modal-head { padding: 16px 18px 10px; }
.agenda-app .ag-modal-body { max-height: calc(100vh - 190px); overflow: auto; }
.agenda-app .ag-colors { display: flex; gap: 8px; }
.agenda-app .ag-colors button { width: 26px; height: 26px; border-radius: 50%; background: var(--c); }
.agenda-app .ag-colors button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.agenda-app .ag-sheet-scrim { place-items: end stretch; padding: 0; }
.agenda-app #agGhost { z-index: 5; }
.agenda-app .m { height: 100%; position: relative; grid-template-rows: auto auto minmax(0, 1fr); }
.agenda-app .m-fab { position: absolute; bottom: 18px; }
.agenda-app .sheet { z-index: 70; }
.agenda-app .ag-jump { gap: 4px; padding-right: 8px; }
.agenda-app .ag-jump .i { width: 14px; height: 14px; }
.agenda-app .jump-pop { width: 264px; }
.agenda-app .jump-list { display: grid; gap: 1px; padding: 6px; }
.agenda-app .jump-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.agenda-app .jump-item small { color: var(--ink-3); font-size: 11.5px; }
.agenda-app .jump-item:hover, .agenda-app .jump-item:focus-visible { background: var(--soft); outline: none; }
.agenda-app .jump-item.on { background: var(--soft); color: var(--accent); }
.agenda-app .jump-date { display: grid; gap: 5px; padding: 9px 12px 12px; border-top: 1px solid var(--line); }
.agenda-app .sheet .jump-item { min-height: 46px; font-size: 14px; }
.agenda-app .ag-tpl { display: grid; gap: 12px; margin-top: 14px; }
.agenda-app .ag-tpl .ag-preview { margin: 0; }
.agenda-app .ag-tpl-off { gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.agenda-app .ag-tpl-off strong { display: block; font-weight: 500; font-size: 13px; }
.agenda-app .ag-tpl-off small { display: block; margin-top: 2px; font-size: 12px; }
.agenda-app .ag-tpl > .btn { justify-self: end; }
.agenda-app .m:has(> .m-tabs) { grid-template-rows: auto auto auto minmax(0, 1fr); }
.agenda-app .m-tabs { padding: 8px 12px 0; }
.agenda-app .m-tabs .seg, .agenda-app .ag-nav .seg { max-width: 100%; overflow-x: auto; }
.agenda-app .m-tabs .seg { display: flex; }
.agenda-app .m-tabs .seg button { flex: 1; }
@media (max-width: 720px) { .agenda-app .setup-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .agenda-app .ag-tpl > .btn { justify-self: stretch; } .agenda-app .ag-rep-bar { flex-wrap: wrap; } .agenda-app .ag-nav { padding: 0 12px; } }
@media (max-width: 720px) { .agenda-app .set { display: block; } .agenda-app .set-nav { display: flex; overflow: auto; margin-bottom: 10px; } .agenda-app .ag-svc { grid-template-columns: 4px minmax(0, 1fr); } .agenda-app .ag-svc .dur, .agenda-app .ag-svc > .num { display: none; } }
@media print {
  .main-shell .topbar, .main-nav, .agenda-app .rail, .agenda-app .ag-nav, .agenda-app .ag-head .btn, .agenda-app .ag-head .seg, .agenda-app .ag-head .ibtn, .agenda-app .ag-search, .agenda-app .drawer, .agenda-app #agToasts, .agenda-app #agLayer, .agenda-app .now, .agenda-app .now-time { display: none !important; }
  .content:has(> .agenda-app), .agenda-app, .agenda-app .ag, .agenda-app .ag-body, .agenda-app .cal-area, .agenda-app .ag-cal, .agenda-app .tg, .agenda-app .tg-scroll { display: block; height: auto !important; overflow: visible !important; }
  .agenda-app .ev { break-inside: avoid; }
}

/* Last in the file: these answer to the screen width, so they have to come after the base rules. */
.agenda-app .ag-search { flex: 0 1 216px; width: auto; min-width: 36px; overflow: hidden; transition: flex-basis .15s ease; }
.agenda-app .ag-search > .i { flex: none; }
.agenda-app .ag-search input { flex: 1 1 auto; min-width: 0; }
.agenda-app .ag-search:focus-within { flex: 0 0 216px; }
@media (max-width: 1100px) {
  .agenda-app .tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .agenda-app .grid3, .agenda-app .grid2 { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 720px) {
  .agenda-app .set-nav { flex-wrap: wrap; gap: 4px; overflow: visible; }
  .agenda-app .set-nav button { width: auto; flex: 0 0 auto; }
  .agenda-app .set-nav .grow { flex: 0 1 auto; }
}
@media (max-width: 640px) {
  .agenda-app .tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .agenda-app .tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .agenda-app .page { padding: 12px; }
  .agenda-app .heat b:nth-of-type(even) { visibility: hidden; }
  .agenda-app .bars-x { overflow: hidden; }
  .agenda-app .bars-x span { flex: 1 1 0; min-width: 0; white-space: nowrap; font-size: 10px; }
  .agenda-app .bars-x span:nth-child(even) { visibility: hidden; }
  .agenda-app .sheet input, .agenda-app .sheet select, .agenda-app .sheet textarea { font-size: 16px; }
}
@media (max-width: 760px) { body:has(.agenda-app .sheet) .assistant { display: none; } }
/* Admin → API (public/app/api-keys.js): the token shown once, the new-key form. */
#apiKeysRoot .ak-token { border-color: var(--brand, currentColor); }
#apiKeysRoot .ak-token-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#apiKeysRoot .ak-token-row code { flex: 1 1 320px; overflow-wrap: anywhere; padding: 8px 10px; border-radius: 8px; background: var(--surface-2, rgba(127, 127, 127, 0.12)); user-select: all; }
#apiKeysRoot .ak-form h4 { margin: 16px 0 4px; }
#apiKeysRoot .sh-tag { white-space: nowrap; }
/* The panel's floating AI (public/app/assistant.js): the corner button, its chat, the guide
   reader and the support form, plus the scope switch and the card in Admin › IA. Colours come
   from the tenant's brand (--brand-blue*), so it wears each tenant's look. */
.assistant { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.assistant[hidden] { display: none; }
/* Conversas keeps its send button in the bottom-right corner: the assistant steps up out of its way. */
.assistant[data-section="conversas"] { bottom: 92px; }
/* On a phone or tablet every row and the reply box reach the corner; Help is still in the top bar. */
@media (max-width: 1024px), (max-height: 500px) { .assistant[data-section="conversas"] { display: none; } }
.assistant > * { pointer-events: auto; }

.assistant-launcher { position: relative; display: grid; width: 52px; height: 52px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #fff; background: var(--brand-blue-button, var(--brand-blue)); box-shadow: 0 10px 28px rgba(32, 33, 4, .26), 0 2px 6px rgba(32, 33, 4, .14); cursor: pointer; transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s ease; }
.assistant-launcher::before { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(145deg, rgba(255, 255, 255, .28), transparent 60%); content: ""; }
.assistant-launcher:hover { box-shadow: 0 14px 34px rgba(32, 33, 4, .3), 0 3px 8px rgba(32, 33, 4, .16); transform: translateY(-2px) scale(1.03); }
.assistant-launcher:active { transform: scale(.96); }
.assistant-launcher svg { position: absolute; width: 22px; height: 22px; transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1); }
.assistant-launcher-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.assistant.is-open .assistant-launcher-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.assistant.is-open .assistant-launcher-close { opacity: 1; transform: none; }
.assistant-launcher:focus-visible, .assistant-icon-button:focus-visible, .assistant-send:focus-visible, .assistant-support:focus-visible,
.assistant-source-actions button:focus-visible, .assistant-source-link:focus-visible, .assistant-chips button:focus-visible, .assistant-view-back:focus-visible,
.assistant-primary:focus-visible, .assistant-ghost:focus-visible, .assistant-reader-body a:focus-visible { outline: 3px solid rgba(114, 117, 0, .32); outline-offset: 2px; }

.assistant-panel { display: flex; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 110px)); flex-direction: column; overflow: hidden; border: 1px solid #dce5e1; border-radius: 18px; color: var(--text); background: #fcfcfb; box-shadow: 0 24px 70px rgba(32, 33, 4, .24), 0 4px 14px rgba(32, 33, 4, .1); transform-origin: bottom right; animation: assistant-in .24s cubic-bezier(.2, .8, .2, 1); }
.assistant-panel[hidden] { display: none; }
@keyframes assistant-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }

.assistant-head { display: flex; align-items: center; gap: 11px; padding: 14px 10px 14px 16px; border-bottom: 1px solid #e6ecea; background: linear-gradient(135deg, var(--brand-blue-soft), #fff 72%); }
.assistant-mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--brand-blue-ink); background: var(--brand-blue); box-shadow: 0 6px 16px rgba(32, 33, 4, .16); }
.assistant-mark svg { width: 18px; height: 18px; }
.assistant-head-text { flex: 1; min-width: 0; }
.assistant-head h2 { margin: 0; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: -.01em; }
.assistant-head p { margin: 1px 0 0; overflow: hidden; color: var(--muted); font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.assistant-icon-button { display: inline-grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 9px; color: #78765f; background: transparent; cursor: pointer; }
.assistant-icon-button svg { width: 15px; height: 15px; }
.assistant-icon-button:hover { color: var(--text); background: rgba(32, 33, 4, .06); }

.assistant-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px; overscroll-behavior: contain; scroll-behavior: smooth; }
.assistant-log { display: grid; gap: 12px; }
.assistant-turn { max-width: 92%; font-size: calc((12.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; animation: assistant-turn-in .2s ease; }
@keyframes assistant-turn-in { from { opacity: 0; transform: translateY(6px); } }
.assistant-turn p { margin: 0; }
.assistant-turn.is-user { justify-self: end; padding: 9px 13px; border-radius: 16px 16px 4px 16px; color: var(--brand-blue-ink); background: var(--brand-blue); white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-turn.is-assistant { justify-self: start; padding: 11px 13px; border: 1px solid #e3eae7; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: 0 2px 8px rgba(32, 33, 4, .04); }
.assistant-answer p + p, .assistant-answer p + ol, .assistant-answer p + ul, .assistant-answer ol + p, .assistant-answer ul + p { margin-top: 8px; }
.assistant-answer ol, .assistant-answer ul { margin: 6px 0 0; padding-left: 20px; }
.assistant-answer li + li { margin-top: 3px; }
.assistant-note { margin-top: 8px !important; color: #7b7a64; font-size: .86em; }
.assistant-turn .is-bad { color: #a8322b; }
.assistant-turn .is-good { display: flex; align-items: flex-start; gap: 7px; color: #1d6b48; }
.assistant-turn .is-good svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 3px; }
.assistant-turn.is-thinking { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.assistant-dots { display: inline-flex; gap: 3px; }
.assistant-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-blue); animation: assistant-dot 1s infinite ease-in-out; }
.assistant-dots i:nth-child(2) { animation-delay: .15s; }
.assistant-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes assistant-dot { 0%, 80%, 100% { opacity: .3; transform: scale(.75); } 40% { opacity: 1; transform: none; } }

.assistant-sources { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e0e7e4; }
.assistant-sources h3, .assistant-chips h3, .assistant-tickets h3 { margin: 0 0 7px; color: #7b7a64; font-size: .78em; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.assistant-sources ul, .assistant-chips ul, .assistant-tickets ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.assistant-source { padding: 9px 10px; border: 1px solid #e6ecea; border-radius: 11px; background: #fbfbfa; }
.assistant-source-text { display: grid; gap: 1px; }
.assistant-source-text strong { font-weight: 680; }
.assistant-source-text small { color: var(--muted); font-size: .88em; line-height: 1.4; }
.assistant-source-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.assistant-source-actions button, .assistant-source-link { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border: 1px solid #dbe5e1; border-radius: 8px; color: var(--brand-blue); background: #fff; font: inherit; font-size: .88em; font-weight: 650; text-decoration: none; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.assistant-source-actions button:hover, .assistant-source-link:hover { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.assistant-source-actions svg { width: 13px; height: 13px; }
.assistant-source-actions.is-reader { margin-top: 18px; padding-top: 12px; border-top: 1px solid #e6ecea; }

.assistant-welcome { display: grid; justify-items: center; gap: 6px; padding: 18px 6px 4px; text-align: center; }
.assistant-welcome-mark { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 4px; border-radius: 17px; color: var(--brand-blue-ink); background: var(--brand-blue); box-shadow: 0 12px 26px rgba(32, 33, 4, .18); }
.assistant-welcome-mark svg { width: 26px; height: 26px; }
.assistant-welcome h3 { margin: 0; font-size: calc((17px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: -.01em; }
.assistant-welcome .assistant-chips h3 { margin: 0 0 5px; text-align: center; }
.assistant-welcome > p { max-width: 300px; margin: 0; color: var(--muted); font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; }
.assistant-chips { width: 100%; margin-top: 16px; text-align: left; }
.assistant-chips button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #e3eae7; border-radius: 12px; color: inherit; background: #fff; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 620; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.assistant-chips button:hover { border-color: #e1e1be; box-shadow: 0 6px 16px rgba(32, 33, 4, .07); transform: translateY(-1px); }
.assistant-chips svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--brand-blue); }

.assistant-compose { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 7px 7px 7px 13px; border: 1px solid #dfe7e3; border-radius: 14px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.assistant-compose[hidden] { display: none; }
.assistant-compose:focus-within { border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.assistant-compose textarea { flex: 1; min-width: 0; max-height: 120px; padding: 6px 0; border: 0; outline: 0; resize: none; color: var(--text); background: transparent; font: inherit; font-size: calc((12.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.assistant-compose textarea[aria-invalid="true"]::placeholder { color: #a8322b; }
.assistant-send { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 10px; color: #fff; background: var(--brand-blue-button, var(--brand-blue)); cursor: pointer; transition: opacity .15s ease, transform .15s ease; }
.assistant-send:hover { transform: translateY(-1px); }
.assistant-send:disabled { opacity: .5; cursor: progress; transform: none; }
.assistant-send svg { width: 15px; height: 15px; }
.assistant-foot { display: flex; justify-content: center; min-height: 12px; padding: 8px 12px 10px; }
.assistant-support { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 0; border-radius: 8px; color: #69674f; background: transparent; font: inherit; font-size: calc((11.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; cursor: pointer; }
.assistant-support:hover { color: var(--brand-blue); background: var(--brand-blue-soft); }
.assistant-support svg { width: 14px; height: 14px; }

.assistant-view { display: grid; gap: 10px; }
.assistant-view-back { display: inline-flex; justify-self: start; align-items: center; gap: 6px; padding: 5px 9px 5px 6px; border: 0; border-radius: 8px; color: var(--brand-blue); background: transparent; font: inherit; font-size: calc((11.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.assistant-view-back:hover { background: var(--brand-blue-soft); }
.assistant-view-back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.assistant-view > .is-bad { margin: 0; color: #a8322b; }
.assistant-reader h3 { margin: 4px 0 0; font-size: calc((17px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: -.01em; line-height: 1.3; }
.assistant-reader-meta { margin: -6px 0 0; color: var(--muted); font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.assistant-reader-body { font-size: calc((12.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.62; overflow-wrap: anywhere; }
.assistant-reader-body .shot { margin: 14px 0 18px; }
.assistant-reader-body .shot-frame { display: block; overflow: hidden; border: 1px solid #dce7e2; border-radius: 10px; background: #f5f8f6; cursor: zoom-in; transition: border-color .15s ease, box-shadow .15s ease; }
.assistant-reader-body .shot-frame:hover { border-color: var(--brand-blue); box-shadow: 0 4px 14px rgba(33, 32, 8, .12); }
.assistant-reader-body .shot-frame.is-lifted img { visibility: hidden; }
.assistant-reader-body .shot img { display: block; width: 100%; height: auto; }
.assistant-reader-body figcaption { margin-top: 5px; color: #52645d; font-size: .9em; }
.assistant-reader-body h1 { display: none; }
.assistant-reader-body h2 { margin: 18px 0 6px; font-size: 1.12em; font-weight: 720; }
.assistant-reader-body h3 { margin: 14px 0 4px; font-size: 1em; font-weight: 700; }
.assistant-reader-body p, .assistant-reader-body ul, .assistant-reader-body ol { margin: 0 0 9px; }
.assistant-reader-body ul, .assistant-reader-body ol { padding-left: 20px; }
.assistant-reader-body a { color: var(--brand-blue); font-weight: 600; }
.assistant-reader-body code, .assistant-reader-body kbd { padding: 1px 5px; border: 1px solid #e0e7e4; border-radius: 5px; background: #f3f6f5; font-size: .92em; }
.assistant-reader-body blockquote, .assistant-reader-body .callout { margin: 10px 0; padding: 9px 12px; border-left: 3px solid var(--brand-blue); border-radius: 0 9px 9px 0; background: var(--brand-blue-soft); }
.assistant-reader-body table { width: 100%; margin: 8px 0; border-collapse: collapse; font-size: .92em; }
.assistant-reader-body th, .assistant-reader-body td { padding: 5px 7px; border-bottom: 1px solid #e6ecea; text-align: left; }
.assistant-skeleton { display: grid; gap: 9px; padding-top: 6px; }
.assistant-skeleton i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #edf2f0, #f7f9f8, #edf2f0); background-size: 200% 100%; animation: assistant-shimmer 1.2s infinite linear; }
.assistant-skeleton i:first-child { width: 70%; height: 18px; }
.assistant-skeleton i:last-child { width: 55%; }
@keyframes assistant-shimmer { to { background-position: -200% 0; } }

.assistant-ticket { display: grid; gap: 10px; }
.assistant-ticket h3 { margin: 2px 0 0; font-size: calc((15px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; }
.assistant-ticket > p { margin: -4px 0 2px; color: var(--muted); font-size: calc((11.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.assistant-ticket label:not(.assistant-check) { display: grid; gap: 4px; font-size: calc((11.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 650; }
.assistant-ticket input:not([type="checkbox"]), .assistant-ticket textarea { width: 100%; padding: 8px 10px; border: 1px solid #dbe4e0; border-radius: 10px; color: var(--text); background: #fff; font: inherit; font-weight: 400; }
.assistant-ticket textarea { resize: vertical; }
.assistant-ticket input:focus-visible, .assistant-ticket textarea:focus-visible { border-color: var(--brand-blue); outline: 0; box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.assistant-check { display: flex; align-items: center; gap: 8px; font-size: calc((11.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.assistant-check input { width: 16px; height: 16px; accent-color: var(--brand-blue); }
.assistant-ticket-feedback { min-height: 1em; margin: 0; font-size: calc((11.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.assistant-ticket-feedback.is-bad { color: #a8322b; }
.assistant-ticket-actions { display: flex; justify-content: flex-end; gap: 8px; }
.assistant-primary, .assistant-ghost { min-height: 34px; padding: 0 14px; border-radius: 10px; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; cursor: pointer; }
.assistant-primary { border: 0; color: #fff; background: var(--brand-blue-button, var(--brand-blue)); }
.assistant-primary:disabled { opacity: .6; cursor: progress; }
.assistant-ghost { border: 1px solid #dbe4e0; color: inherit; background: #fff; }
.assistant-tickets { margin-top: 18px; }
.assistant-tickets li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 3px 9px; padding: 8px 10px; border: 1px solid #e6ecea; border-radius: 10px; background: #fff; font-size: calc((11.5px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.assistant-ticket-id { color: #7b7a64; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.assistant-ticket-subject { overflow: hidden; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.assistant-ticket-status { padding: 1px 8px; border-radius: 99px; color: #1d6b48; background: #e4f4ec; font-size: .88em; font-weight: 680; }
.assistant-ticket-status.is-open { color: #7a5200; background: #fdf1d8; }
.assistant-ticket-reply { flex-basis: 100%; margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-tickets time { grid-column: 2 / 4; color: #7b7a64; font-size: .9em; }

/* Admin › IA */
.admin-ai-scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; border: 0; }
.admin-ai-scope-choice { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid #dfe7e3; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.admin-ai-scope-choice input { position: absolute; opacity: 0; pointer-events: none; }
.admin-ai-scope-choice:hover { border-color: #e1e1be; }
.admin-ai-scope-choice:has(input:checked) { border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.admin-ai-scope-choice:has(input:focus-visible) { outline: 3px solid rgba(114, 117, 0, .32); outline-offset: 2px; }
.admin-ai-scope-mark, .assistant-admin-mark { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--brand-blue); background: var(--brand-blue-soft); }
.admin-ai-scope-choice:has(input:checked) .admin-ai-scope-mark { color: var(--brand-blue-ink); background: var(--brand-blue); }
.admin-ai-scope-mark svg, .assistant-admin-mark svg { width: 18px; height: 18px; }
.admin-ai-scope-choice > span:last-child { display: grid; gap: 1px; }
.admin-ai-scope-choice strong { font-weight: 700; }
.admin-ai-scope-choice small { color: var(--muted); }
.assistant-admin-card { display: grid; gap: 12px; }
.assistant-admin-card header { display: flex; align-items: flex-start; gap: 12px; }
.assistant-admin-card header h3 { margin: 0; }
.assistant-admin-card header p { margin: 2px 0 0; color: var(--muted); }
.assistant-admin-source legend { margin-bottom: 6px; font-weight: 700; }
.assistant-admin-providers { margin: 22px 0 10px; font-size: calc((14px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; }

@media (max-width: 560px) {
  .assistant { right: 12px; bottom: 12px; }
  .assistant[data-section="conversas"] { bottom: 84px; }
  .assistant.is-open { inset: 0; right: 0; bottom: 0; gap: 0; }
  .assistant.is-open .assistant-panel { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .assistant.is-open .assistant-launcher { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .assistant *, .assistant *::before, .assistant *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* A guide's picture over the panel. The dialog fills the screen; the picture and its controls sit
   on the dimmed page, and the controls fade in once the picture has started to grow. */
.shot-lightbox[open] { position: fixed; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; color: #fff; background: transparent; }
.shot-lightbox::backdrop { background: rgba(15, 17, 7, 0); transition: background .22s ease, backdrop-filter .22s ease; }
.shot-lightbox.is-open::backdrop { background: rgba(15, 17, 7, .78); backdrop-filter: blur(6px); }
.shot-lightbox-stage { display: grid; min-height: 0; place-items: center; padding: 56px 76px 12px; }
.shot-lightbox-stage img { display: block; max-width: calc(100vw - 152px); max-height: calc(100dvh - 124px); border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .45); cursor: zoom-in; transform-origin: top left; }
.shot-lightbox.is-full .shot-lightbox-stage { display: block; overflow: auto; }
.shot-lightbox.is-full .shot-lightbox-stage img { max-width: none; max-height: none; margin: 0 auto; cursor: zoom-out; }
.shot-lightbox-foot { display: flex; justify-content: center; align-items: baseline; gap: 12px; min-height: 44px; padding: 8px 24px 14px; font-size: 13px; line-height: 1.4; text-align: center; opacity: 0; transition: opacity .2s ease; }
.shot-lightbox-caption { max-width: 72ch; color: rgba(255, 255, 255, .92); }
.shot-lightbox-count { flex: none; color: rgba(255, 255, 255, .62); font-variant-numeric: tabular-nums; }
.shot-lightbox-arrow, .shot-lightbox-close { position: absolute; display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .1); cursor: pointer; opacity: 0; transition: opacity .2s ease, background .15s ease, transform .15s ease; }
.shot-lightbox-arrow svg, .shot-lightbox-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.shot-lightbox-arrow { top: 50%; margin-top: -20px; }
.shot-lightbox-arrow.is-prev { left: 18px; }
.shot-lightbox-arrow.is-next { right: 18px; }
.shot-lightbox-close { top: 12px; right: 18px; }
.shot-lightbox.is-open .shot-lightbox-foot, .shot-lightbox.is-open .shot-lightbox-arrow, .shot-lightbox.is-open .shot-lightbox-close { opacity: 1; }
.shot-lightbox-arrow:hover, .shot-lightbox-close:hover { background: rgba(255, 255, 255, .22); }
.shot-lightbox-arrow:active, .shot-lightbox-close:active { transform: scale(.94); }
.shot-lightbox-arrow:focus-visible, .shot-lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.shot-lightbox.is-single .shot-lightbox-arrow { display: none; }
@media (max-width: 640px) {
  .shot-lightbox-stage { padding: 58px 10px 8px; }
  .shot-lightbox-stage img { max-width: calc(100vw - 20px); max-height: calc(100dvh - 130px); }
  .shot-lightbox-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .shot-lightbox::backdrop, .shot-lightbox-foot, .shot-lightbox-arrow, .shot-lightbox-close { transition: none; }
}
/* The buying journey in a person's view (contact-site-journey.js, 6.3). */
.contact-site-journey { margin: 0 0 14px; }
.contact-site-journey-skel { height: 140px; border-radius: var(--radius); }
.contact-site-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.contact-site-steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.contact-site-steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.contact-site-steps li + li::before { content: ""; position: absolute; left: 13px; top: -10px; height: 16px; border-left: 2px solid var(--line); }
.contact-site-steps .kit-grow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-site-step-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.contact-site-step-icon .kit-i { width: 14px; height: 14px; }
.contact-site-steps li.is-paid .contact-site-step-icon, .contact-site-steps li.is-access .contact-site-step-icon { background: var(--ok-soft); color: var(--ok); }
.contact-site-steps li.is-refunded .contact-site-step-icon, .contact-site-steps li.is-access_revoked .contact-site-step-icon { background: var(--bad-soft); color: var(--bad); }
.contact-site-steps li.is-left .contact-site-step-icon { background: var(--warn-soft); color: var(--warn); }
.contact-site-steps li.is-touch .contact-site-step-icon, .contact-site-steps li.is-quiz .contact-site-step-icon { background: var(--soft); color: var(--accent); }
.contact-site-steps time { flex: none; }
/* Contatos → Clientes (contacts-customers.js, 6.3). Builds on kit.css and site-area.css. */
.contacts-view-switch { display: flex; margin: 0 0 12px; }
.contacts-view-switch .site-seg button { display: inline-flex; align-items: center; gap: 6px; }
.contacts-view-switch .kit-i { width: 14px; height: 14px; }
.contact-customers { display: grid; gap: 14px; }
.contact-customers[hidden] { display: none; }
.contact-customers-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contact-customers-search { position: relative; flex: 1 1 260px; min-width: 0; }
.contact-customers-search .kit-i { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.contact-customers-search input { width: 100%; min-height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.contact-customers-search input:focus-visible, .contact-customers-sort select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact-customers-sort { display: inline-flex; align-items: center; gap: 8px; }
.contact-customers-sort select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.contact-customers-count { margin-left: auto; }
.contact-customers-skel { height: 320px; border-radius: var(--radius); }
.contact-customers-table th[scope="row"] { font-weight: inherit; text-align: left; min-width: 200px; }
.contact-customers-table td { vertical-align: top; }
.contact-customers-table td > span { display: block; }
.contact-customers-name { display: grid; gap: 1px; max-width: 280px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.contact-customers-name { cursor: pointer; border-radius: 6px; }
button.contact-customers-name strong { color: var(--accent); }
button.contact-customers-name:hover strong { text-decoration: underline; }
button.contact-customers-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-customers-badges, .contact-customers-products { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.contact-customers-products { margin-top: 0; max-width: 340px; }
.contact-customers-pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
@media (max-width: 720px) {
  .contact-customers-count { margin-left: 0; width: 100%; }
  .contact-customers-table th[scope="row"] { min-width: 160px; }
}
/* Visão geral's Site row (dashboard-site.js, 6.3). Builds on kit.css and site-area.css. */
.dashboard-site { display: grid; gap: 14px; margin: 0 0 20px; }
.dashboard-site[hidden] { display: none; }
.dashboard-site-head { margin-bottom: 0; }
.dashboard-site-head h2 { font-size: 1.24em; }
.dashboard-site-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.dashboard-site .site-kpi.is-accent { border-color: color-mix(in oklab, var(--ok) 40%, var(--line)); background: linear-gradient(180deg, var(--ok-soft), var(--surface) 70%); }
.dashboard-site-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dashboard-site-skel { height: 280px; border-radius: var(--radius); }
.dashboard-site-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.dashboard-site-note .kit-i { width: 13px; height: 13px; }
.dashboard-site .site-bars + .dashboard-site-note { margin-top: 12px; }

.dashboard-site-alerts { list-style: none; margin: 0; padding: 0; display: grid; }
.dashboard-site-alerts li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dashboard-site-alerts li:first-child { border-top: 0; padding-top: 2px; }
.dashboard-site-alerts strong { display: block; line-height: 1.35; }
.dashboard-site-alerts p { margin: 2px 0 0; line-height: 1.45; }
.dashboard-site-alerts .kit-btn { flex: none; align-self: center; }
.dashboard-site-alert-icon, .dashboard-site-clear-icon, .dashboard-site-funnel-mark, .dashboard-site-summary-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; }
.dashboard-site-alert-icon { background: var(--warn-soft); color: var(--warn); }
.dashboard-site-alerts li.is-bad .dashboard-site-alert-icon { background: var(--bad-soft); color: var(--bad); }
.dashboard-site-alert-icon .kit-i, .dashboard-site-clear-icon .kit-i, .dashboard-site-funnel-mark .kit-i, .dashboard-site-summary-mark .kit-i { width: 16px; height: 16px; }
.dashboard-site-clear { display: flex; align-items: center; gap: 12px; padding: 6px 0 4px; }
.dashboard-site-clear p { margin: 2px 0 0; }
.dashboard-site-clear-icon { background: var(--ok-soft); color: var(--ok); }

.dashboard-site-funnels { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dashboard-site-funnels li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.dashboard-site-funnels li + li { border-top: 1px solid var(--line); }
.dashboard-site-funnels strong.kit-ell { display: block; }
.dashboard-site-funnel-mark { background: var(--soft); color: var(--accent); }
.dashboard-site-funnel-rate { font-size: 1.08em; }

.dashboard-site-summary { border-color: color-mix(in oklab, var(--accent) 30%, var(--line)); background: linear-gradient(180deg, var(--soft), var(--surface) 80%); }
.dashboard-site-summary-mark { background: var(--accent); color: var(--accent-ink); }
.dashboard-site-summary .kit-card-body p { margin: 0 0 8px; line-height: 1.55; }
.dashboard-site-summary .kit-card-body p:last-child { margin-bottom: 0; }

@media (max-width: 960px) {
  .dashboard-site-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .dashboard-site-alerts li { flex-wrap: wrap; }
  .dashboard-site-alerts .kit-btn { margin-left: 42px; }
}
.deals-app{;; --bg: #f6f5f4; --surface: #fff; --surface-2: #faf9f8; --surface-3: #f3f3ee;
  --line: #ebebe3; --line-2: #e0e0d4; --ink: #282912; --ink-2: #6f6e55; --ink-3: #96967f;
  --accent: var(--brand); --accent-ink: var(--brand-ink);
  --soft: color-mix(in oklab, var(--brand) 9%, #fff); --soft-2: color-mix(in oklab, var(--brand) 16%, #fff);
  --ring: color-mix(in oklab, var(--brand) 32%, transparent);
  --flow: linear-gradient(90deg, #7fa21f, #8b7e07);
  --side: color-mix(in oklab, var(--brand) 22%, #151507); --side-2: rgba(255,255,255,.07); --side-line: rgba(255,255,255,.1);
  --ok: #1b8a60; --ok-soft: #e6f4ee; --warn: #a66a08; --warn-soft: #fbf3e4; --warn-line: #efdcb9; --bad: #c93636; --bad-soft: #fcefef; --bad-line: #f2cfcf;
  --s-meta: #7fa21f; --s-google: #eb6834; --s-whatsapp: #1baf7a; --s-email: #eda100; --s-organic: #e87ba4; --s-none: #b8b8a6;
  --shadow-1: 0 1px 2px rgba(40, 41, 18,.05), 0 2px 8px rgba(40, 41, 18,.04);
  --shadow-2: 0 2px 6px rgba(40, 41, 18,.06), 0 12px 32px rgba(40, 41, 18,.1);
  --shadow-3: 0 8px 18px rgba(40, 41, 18,.1), 0 28px 64px rgba(40, 41, 18,.18);
  --radius: 14px; color-scheme: light;}
[data-theme="dark"] .deals-app{--bg: #191a0d; --surface: #222414; --surface-2: #2a2b19; --surface-3: #32341f;
  --line: #373823; --line-2: #45462e; --ink: #f1f1e9; --ink-2: #bdbca9; --ink-3: #96967d;
  --accent: color-mix(in oklab, var(--brand) 48%, #fbff9c); --accent-ink: #181906;
  --soft: color-mix(in oklab, var(--accent) 13%, #222414); --soft-2: color-mix(in oklab, var(--accent) 22%, #222414);
  --ring: color-mix(in oklab, var(--accent) 38%, transparent);
  --flow: linear-gradient(90deg, #bcec22, #c4b218);
  --side: color-mix(in oklab, var(--brand) 14%, #121407);
  --ok: #43c495; --ok-soft: #2a1e12; --warn: #e3a845; --warn-soft: #2b2415; --warn-line: #4c3d1e; --bad: #ef6b6b; --bad-soft: #2f1a1c; --bad-line: #57292c;
  --s-meta: #9dcc1b; --s-google: #d95926; --s-whatsapp: #199e70; --s-email: #c98500; --s-organic: #d55181; --s-none: #76765d;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3); --shadow-2: 0 2px 6px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.34); --shadow-3: 0 8px 18px rgba(0,0,0,.35), 0 28px 64px rgba(0,0,0,.5);
  color-scheme: dark;}
.deals-app button, .deals-app input, .deals-app select, .deals-app textarea{font: inherit; color: inherit;}
.deals-app button{cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit;}
.deals-app svg.i{width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;}
.deals-app :focus-visible{outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;}
.deals-app h1, .deals-app h2, .deals-app h3, .deals-app h4, .deals-app p{margin: 0; font-weight: 500;}
.deals-app code{font: 400 11.5px/1.5 "Cascadia Mono", ui-monospace, Consolas, monospace;}
.deals-app kbd{display: inline-block; min-width: 18px; padding: 0 5px; text-align: center; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--ink-2); font: 500 10.5px/16px Inter, "Segoe UI", sans-serif;}
.deals-app .num{font-variant-numeric: tabular-nums;}
.deals-app .grow{flex: 1; min-width: 0;}
.deals-app .muted{color: var(--ink-2);}
.deals-app .faint{color: var(--ink-3);}
.deals-app .small{font-size: 11.5px;}
.deals-app .row{display: flex; align-items: center; gap: 8px; min-width: 0;}
.deals-app .row.top{align-items: flex-start;}
.deals-app .row.wrap{flex-wrap: wrap;}
.deals-app .stack{display: grid; gap: 12px; min-width: 0; align-content: start;}
.deals-app .ell{overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.deals-app #mock{height: 38px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: #13130b; color: #dad9cd; font-size: 11.5px; overflow-x: auto; scrollbar-width: none;}
.deals-app #mock b{font-weight: 600; color: #fff; letter-spacing: .02em; white-space: nowrap;}
.deals-app #mock .grp{display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 8px; background: rgba(255,255,255,.07);}
.deals-app #mock .grp button{padding: 3px 8px; border-radius: 6px; color: #c6c6b6; white-space: nowrap;}
.deals-app #mock .grp button:hover{color: #fff;}
.deals-app #mock .grp button.on{background: #fff; color: #13130b;}
.deals-app #mock small{color: #92927c; white-space: nowrap;}
.deals-app .mark{display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 1px rgba(255,255,255,.16) inset; font-weight: 600;}
.deals-app .top-search{display: flex; align-items: center; gap: 8px; width: 240px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--ink-3); font-size: 12px; transition: border .15s;}
.deals-app .top-search:hover{border-color: var(--line-2);}
.deals-app .top-search kbd{margin-left: auto;}
.deals-app .avatar{display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--soft); color: var(--accent); font-size: 11px; font-weight: 600;}
.deals-app .avatar.s{width: 24px; height: 24px; border-radius: 8px; font-size: 10px;}
.deals-app .avatar.l{width: 46px; height: 46px; border-radius: 14px; font-size: 15px;}
.deals-app .scroll{height: 100%; overflow: auto;}
.deals-app .page{max-width: 1320px; margin: 0 auto; padding: 22px 24px 40px; display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; animation: rise .22s ease both;}
@keyframes rise{ from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.deals-app .head{display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;}
.deals-app .head h1{font-size: 21px; line-height: 1.2; letter-spacing: -.012em;}
.deals-app .head p{color: var(--ink-2); margin-top: 3px; font-weight: 400; max-width: 104ch;}
.deals-app .head .acts{margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;}
.deals-app .btn{display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12.5px; white-space: nowrap; transition: all .15s;}
.deals-app .btn:hover{border-color: var(--line-2); background: var(--surface-2);}
.deals-app .btn.pri{border-color: transparent; background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 6px 14px color-mix(in oklab, var(--accent) 24%, transparent);}
.deals-app .btn.pri:hover{filter: brightness(1.08);}
.deals-app .btn.soft{border-color: transparent; background: var(--soft); color: var(--accent);}
.deals-app .btn.ghost{border-color: transparent; background: none; color: var(--ink-2);}
.deals-app .btn.ghost:hover{background: var(--surface-3); color: var(--ink);}
.deals-app .btn.danger{color: var(--bad); border-color: var(--bad-line);}
.deals-app .btn.danger:hover{background: var(--bad-soft);}
.deals-app .btn.sm{min-height: 28px; padding: 0 9px; border-radius: 8px; font-size: 11.5px;}
.deals-app .btn:disabled{opacity: .5; cursor: not-allowed;}
.deals-app .inp{width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 12.5px; transition: border .15s, box-shadow .15s;}
.deals-app .inp:focus{outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring);}
.deals-app .seg{display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-3);}
.deals-app .seg button{min-height: 28px; padding: 0 11px; border-radius: 8px; color: var(--ink-2); font-size: 12px; white-space: nowrap; transition: all .15s;}
.deals-app .seg button:hover{color: var(--ink);}
.deals-app .seg button.on{background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1);}
.deals-app .switch{position: relative; flex: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); transition: background .15s;}
.deals-app .switch::after{content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s;}
.deals-app .switch.on{background: var(--accent);}
.deals-app .switch.on::after{transform: translateX(14px);}
.deals-app .chip{display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; white-space: nowrap;}
.deals-app .chip.ok{background: var(--ok-soft); color: var(--ok);}
.deals-app .chip.warn{background: var(--warn-soft); color: var(--warn);}
.deals-app .chip.bad{background: var(--bad-soft); color: var(--bad);}
.deals-app .chip.acc{background: var(--soft); color: var(--accent);}
.deals-app .chip.hatch{background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, var(--surface) 4px 8px); color: var(--ink-2); border: 1px dashed var(--line-2);}
.deals-app .chip svg.i{width: 12px; height: 12px;}
.deals-app .dot{width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 18%, transparent);}
.deals-app .dot.warn{background: var(--warn); box-shadow: 0 0 0 3px color-mix(in oklab, var(--warn) 18%, transparent);}
.deals-app .dot.bad{background: var(--bad); box-shadow: 0 0 0 3px color-mix(in oklab, var(--bad) 18%, transparent); animation: beat 1.6s infinite;}
.deals-app .dot.idle{background: var(--ink-3); box-shadow: none;}
@keyframes beat{ 50% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--bad) 8%, transparent); } }
.deals-app .card{background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); min-width: 0;}
.deals-app .card-head{display: flex; align-items: center; gap: 10px; padding: 13px 16px 0; min-height: 44px; flex-wrap: wrap;}
.deals-app .card-head h3{font-size: 13.5px;}
.deals-app .card-head small{color: var(--ink-3); font-size: 11.5px;}
.deals-app .card-head .end{margin-left: auto; display: flex; align-items: center; gap: 6px;}
.deals-app .card-body{padding: 12px 16px 16px;}
.deals-app .grid-2{display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px;}
.deals-app .grid-3{display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px;}
.deals-app .grid-side{display: grid; grid-template-columns: minmax(0,1fr) 336px; gap: 16px; align-items: start;}
.deals-app .banner{display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--warn-line); background: var(--warn-soft); color: var(--warn);}
.deals-app .banner.bad{border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad);}
.deals-app .banner.info{border-color: var(--line); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-1);}
.deals-app .banner .btn{margin-left: auto;}
.deals-app .empty{display: grid; justify-items: center; gap: 8px; padding: 42px 20px; text-align: center; color: var(--ink-2);}
.deals-app .empty .glyph{display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--soft); color: var(--accent);}
.deals-app .empty .glyph svg.i{width: 24px; height: 24px;}
.deals-app .empty h3{color: var(--ink); font-size: 15px;}
.deals-app .empty p{font-weight: 400; max-width: 44ch;}
.deals-app .skel{border-radius: 8px; background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface-2) 50%, var(--surface-3) 70%); background-size: 240% 100%; animation: shimmer 1.3s linear infinite;}
@keyframes shimmer{ from { background-position: 120% 0; } to { background-position: -120% 0; } }
.deals-app .step{position: relative; display: grid; gap: 1px; align-content: start; min-height: 150px; padding: 14px 13px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); transition: transform .16s, box-shadow .16s, border-color .16s;}
.deals-app .step:hover{transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2);}
.deals-app .step-ico{position: relative; display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 7px; border-radius: 11px; background: var(--soft); color: var(--accent);}
.deals-app .step-state{position: absolute; top: 27px; left: 54px;}
.deals-app .step-lab{color: var(--ink-2); font-size: 11.5px;}
.deals-app .step-val{font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em;}
.deals-app .step-sub{color: var(--ink-3); font-size: 11px; min-height: 16px;}
.deals-app .step svg.spark{width: 100%; height: 26px; margin-top: 6px; display: block;}
.deals-app .step .pill{position: absolute; z-index: 1; top: 21px; right: -21px; padding: 0 5px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 10px; line-height: 16px; font-variant-numeric: tabular-nums;}
.deals-app .step.warn{border-color: var(--warn-line);}
.deals-app .step.bad{border-color: var(--bad-line); background: color-mix(in oklab, var(--bad) 4%, var(--surface));}
.deals-app .step.off .step-val{color: var(--ink-3); font-weight: 500; font-size: 16px; line-height: 1.65;}
.deals-app .step.off{background: var(--surface-2); box-shadow: none;}
.deals-app .chart{position: relative; height: 216px;}
.deals-app .chart svg{display: block; width: 100%; height: 100%;}
.deals-app .chart .axis{fill: var(--ink-3); font-size: 10.5px; font-variant-numeric: tabular-nums;}
.deals-app .tip{position: absolute; z-index: 5; pointer-events: none; padding: 7px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); font-size: 11.5px; white-space: nowrap; transform: translate(-50%, -112%);}
.deals-app .tip b{display: block; font-size: 13px; font-weight: 600;}
.deals-app .bars{display: grid; gap: 11px;}
.deals-app .bar-row{display: grid; grid-template-columns: 104px minmax(0,1fr) 92px; align-items: center; gap: 10px; font-size: 12px;}
.deals-app .bar-row .name{display: flex; align-items: center; gap: 7px; color: var(--ink-2);}
.deals-app .swatch{width: 9px; height: 9px; border-radius: 3px; flex: none; background: var(--c);}
.deals-app .bar-track{display: flex; gap: 2px; height: 14px;}
.deals-app .bar-seg{height: 100%; min-width: 3px; background: var(--c); border-radius: 2px; transition: width .32s cubic-bezier(.2,.8,.2,1);}
.deals-app .bar-seg:last-child{border-radius: 2px 4px 4px 2px;}
.deals-app .bar-seg.est{background: repeating-linear-gradient(135deg, var(--c) 0 2.5px, transparent 2.5px 5.5px); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 70%, transparent);}
.deals-app .bar-seg.none{background: var(--s-none);}
.deals-app .bar-row .val{text-align: right; font-variant-numeric: tabular-nums;}
.deals-app .legend{display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-2); font-size: 11.5px;}
.deals-app .legend span{display: inline-flex; align-items: center; gap: 6px;}
.deals-app .legend i{width: 18px; height: 9px; border-radius: 2px; background: var(--ink-2);}
.deals-app .legend i.est{background: repeating-linear-gradient(135deg, var(--ink-2) 0 2.5px, transparent 2.5px 5.5px); box-shadow: inset 0 0 0 1px var(--ink-3);}
.deals-app .legend i.none{background: var(--s-none);}
.deals-app .list{display: grid;}
.deals-app .li{display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px; border-top: 1px solid var(--line); width: 100%; transition: background .13s;}
.deals-app .li:first-child{border-top: 0;}
.deals-app button.li:hover, .deals-app .li.click:hover{background: var(--surface-2); cursor: pointer;}
.deals-app .li-ico{display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); flex: none;}
.deals-app .li-ico.warn{background: var(--warn-soft); color: var(--warn);}
.deals-app .li-ico.bad{background: var(--bad-soft); color: var(--bad);}
.deals-app .li-ico.ok{background: var(--ok-soft); color: var(--ok);}
.deals-app .li-ico.acc{background: var(--soft); color: var(--accent);}
.deals-app .li b{font-weight: 500;}
.deals-app table{width: 100%; border-collapse: collapse;}
.deals-app th{padding: 10px 14px; text-align: left; font-weight: 400; color: var(--ink-3); font-size: 11.5px; border-bottom: 1px solid var(--line); white-space: nowrap;}
.deals-app td{padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle;}
.deals-app tr:last-child td{border-bottom: 0;}
.deals-app tbody tr.click{cursor: pointer; transition: background .13s;}
.deals-app tbody tr.click:hover{background: var(--surface-2);}
.deals-app th:first-child, .deals-app td:first-child{padding-left: 16px;}
.deals-app th:last-child, .deals-app td:last-child{padding-right: 16px;}
.deals-app td.r, .deals-app th.r{text-align: right; font-variant-numeric: tabular-nums;}
.deals-app tr.diff td{background: color-mix(in oklab, var(--warn) 7%, transparent);}
.deals-app .toolbar{display: flex; align-items: center; gap: 8px; flex-wrap: wrap;}
.deals-app .search{position: relative; flex: 1 1 200px; max-width: 320px;}
.deals-app .search svg.i{position: absolute; top: 10px; left: 10px; color: var(--ink-3);}
.deals-app .search .inp{padding-left: 32px;}
.deals-app .site-card{display: grid; grid-template-columns: 62px minmax(0,1fr) auto; gap: 14px; padding: 16px; align-items: center;}
.deals-app .gauge{position: relative; width: 62px; height: 62px;}
.deals-app .gauge svg{width: 100%; height: 100%; transform: rotate(-90deg);}
.deals-app .gauge circle{fill: none; stroke-width: 7;}
.deals-app .gauge .t{stroke: var(--surface-3);}
.deals-app .gauge .v{stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .5s;}
.deals-app .gauge.warn .v{stroke: var(--warn);}
.deals-app .gauge.bad .v{stroke: var(--bad);}
.deals-app .gauge b{position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;}
.deals-app .caps{display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; padding: 12px 16px 16px; border-top: 1px solid var(--line);}
.deals-app .cap{display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 9px; border-radius: 9px; background: var(--surface-2); font-size: 11.5px; color: var(--ink); min-width: 0;}
.deals-app .cap svg.i{width: 13px; height: 13px; color: var(--ok);}
.deals-app .cap.off{color: var(--ink-3);}
.deals-app .cap.off svg.i{color: var(--ink-3);}
.deals-app .cap em{margin-left: auto; font-style: normal; font-size: 10px; color: var(--ink-3);}
.deals-app .person-head{display: flex; align-items: center; gap: 14px; padding: 16px; flex-wrap: wrap;}
.deals-app .person-head h2{font-size: 18px; letter-spacing: -.01em;}
.deals-app .stat3{display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-top: 1px solid var(--line);}
.deals-app .stat3 > div{padding: 11px 16px; border-left: 1px solid var(--line);}
.deals-app .stat3 > div:first-child{border-left: 0;}
.deals-app .stat3 b{display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums;}
.deals-app .stat3 span{color: var(--ink-3); font-size: 11.5px;}
.deals-app .tl{position: relative; padding: 4px 16px 10px;}
.deals-app .tl-item{position: relative; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 11px; padding: 9px 0;}
.deals-app .tl-item::before{content: ""; position: absolute; left: 15px; top: 40px; bottom: -9px; width: 2px; background: var(--line);}
.deals-app .tl-item:last-child::before{display: none;}
.deals-app .tl-ico{z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: var(--surface-3); color: var(--ink-2);}
.deals-app .tl-item.sale .tl-ico{background: var(--soft); color: var(--accent);}
.deals-app .tl-item.join .tl-ico{background: var(--flow); color: #fff;}
.deals-app .tl-item.anon .tl-ico{background: none; border: 1px dashed var(--line-2); color: var(--ink-3);}
.deals-app .tl-item h4{font-size: 12.5px; font-weight: 500;}
.deals-app .tl-item p{font-size: 11.5px; color: var(--ink-2); font-weight: 400;}
.deals-app .tl-item time{color: var(--ink-3); font-size: 11px; white-space: nowrap; padding-top: 2px;}
.deals-app .key{display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1px 8px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 12px;}
.deals-app .key:first-child{border-top: 0;}
.deals-app .key .v{color: var(--ink-2); font-size: 11.5px; grid-column: 1;}
.deals-app .key .chip{grid-row: 1 / span 2; grid-column: 2; align-self: center;}
.deals-app .merge{display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); padding: 0 16px 14px; align-items: stretch;}
.deals-app .mside{border: 1px solid var(--line); border-radius: 12px; overflow: hidden;}
.deals-app .mside h4{display: flex; align-items: center; gap: 9px; padding: 10px 12px; background: var(--surface-2); font-size: 13px;}
.deals-app .mrow{display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 8px; padding: 6px 12px; font-size: 12px; border-top: 1px solid var(--line);}
.deals-app .mrow span:first-child{color: var(--ink-3);}
.deals-app .mrow.same{background: var(--soft);}
.deals-app .mrow.same span:last-child{color: var(--accent);}
.deals-app .mjoin{display: grid; place-items: center; color: var(--ink-3);}
.deals-app .conf{display: inline-flex; gap: 2px;}
.deals-app .conf i{width: 13px; height: 4px; border-radius: 2px; background: var(--line-2);}
.deals-app .conf i.on{background: var(--accent);}
.deals-app .ev-row{display: grid; grid-template-columns: 74px 190px minmax(0,1fr) 120px 96px; gap: 10px; align-items: center; min-height: 40px; padding: 5px 16px; border-top: 1px solid var(--line); width: 100%; font-size: 12px; transition: background .13s;}
.deals-app .ev-row:first-child{border-top: 0;}
.deals-app .ev-row:hover{background: var(--surface-2);}
.deals-app .ev-row.on{background: var(--soft);}
.deals-app .ev-row.new{animation: flash 1.1s ease;}
@keyframes flash{ from { background: var(--soft-2); } }
.deals-app .ev-row code{color: var(--ink); font-size: 11.5px;}
.deals-app .live i{display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--flow); animation: pulse 1.4s infinite;}
@keyframes pulse{ 50% { opacity: .35; } }
.deals-app .json{margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font: 400 11.5px/1.6 "Cascadia Mono", ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word;}
.deals-app .pv{display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 4px; padding: 0 16px 14px;}
.deals-app .pv div{display: grid; gap: 6px; font-size: 11px; color: var(--ink-2); min-width: 0;}
.deals-app .pv i{height: 5px; border-radius: 3px; background: var(--surface-3);}
.deals-app .pv .done i{background: var(--ok);}
.deals-app .pv .run i{background: var(--flow); animation: pulse 1.2s infinite;}
.deals-app .pv .fail i{background: var(--bad);}
.deals-app .pv .fail{color: var(--bad);}
.deals-app .opt{display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); align-content: start; transition: border-color .15s, box-shadow .15s;}
.deals-app .opt:hover{border-color: var(--line-2);}
.deals-app .opt.on{border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring);}
.deals-app .opt h3{font-size: 14.5px;}
.deals-app .opt ul{margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--ink-2); font-size: 12px;}
.deals-app .opt li{display: flex; gap: 7px;}
.deals-app .opt li svg.i{width: 13px; height: 13px; margin-top: 3px; color: var(--ok);}
.deals-app .opt li.no svg.i{color: var(--bad);}
.deals-app .opt .mini{display: flex; gap: 2px; height: 13px;}
.deals-app .opt .mini span{background: var(--c, var(--s-meta));}
.deals-app .opt .mini span:first-child{border-radius: 4px 2px 2px 4px;}
.deals-app .opt .mini span:last-child{border-radius: 2px 4px 4px 2px;}
.deals-app .opt .mini .est{background: repeating-linear-gradient(135deg, var(--c, var(--s-meta)) 0 2.5px, transparent 2.5px 5.5px); box-shadow: inset 0 0 0 1px var(--line-2);}
.deals-app .opt > span:first-child{display: flex; align-items: center; min-height: 18px;}
.deals-app .opt.dim{opacity: .8;}
.deals-app .rec{color: var(--accent); font-size: 11px;}
.deals-app .rule{display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 11px; padding: 11px 16px; border-top: 1px solid var(--line);}
.deals-app .rule:first-child{border-top: 0;}
.deals-app .scrim{position: fixed; inset: 38px 0 0; z-index: 20; background: rgba(20, 20, 7,.42); animation: fade .16s ease;}
@keyframes fade{ from { opacity: 0; } }
.deals-app .drawer{position: fixed; z-index: 21; top: 38px; right: 0; bottom: 0; width: min(440px, 100vw); display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-3); animation: slide .22s cubic-bezier(.2,.8,.2,1);}
@keyframes slide{ from { transform: translateX(26px); opacity: .5; } }
.deals-app .d-head{display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line);}
.deals-app .d-head h3{font-size: 15px;}
.deals-app .d-body{padding: 14px 16px; overflow: auto; display: grid; gap: 14px; align-content: start;}
.deals-app .d-foot{display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line);}
.deals-app .modal{position: fixed; z-index: 21; left: 50%; top: 11vh; width: min(560px, calc(100vw - 24px)); max-height: 78vh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); transform: translateX(-50%); animation: pop .18s ease; overflow: hidden;}
@keyframes pop{ from { opacity: 0; transform: translate(-50%, 8px) scale(.985); } }
.deals-app .steps{display: flex; gap: 4px; padding: 0 16px 12px;}
.deals-app .steps i{flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3);}
.deals-app .steps i.on{background: var(--flow);}
.deals-app .code{display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); font: 500 25px/1 "Cascadia Mono", ui-monospace, Consolas, monospace; letter-spacing: .08em;}
.deals-app .checks{display: grid; gap: 7px;}
.deals-app .check{display: flex; align-items: center; gap: 9px; min-height: 26px; color: var(--ink-3);}
.deals-app .check.done{color: var(--ink);}
.deals-app .check svg.i{width: 15px; height: 15px;}
.deals-app .check.done svg.i{color: var(--ok);}
.deals-app .spin{width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: rot .7s linear infinite;}
@keyframes rot{ to { transform: rotate(360deg); } }
.deals-app .sum{display: grid; gap: 7px;}
.deals-app .sum div{display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2);}
.deals-app .sum .num{color: var(--ink);}
.deals-app .sum .tot{padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 500;}
.deals-app .sum .tot .num{font-size: 16px; font-weight: 600;}
.deals-app .touch{display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 8px; font-size: 12px;}
.deals-app .touch span:first-child{color: var(--ink-3);}
.deals-app .lbl{color: var(--ink-3); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 7px;}
.deals-app .pal{position: fixed; z-index: 31; left: 50%; top: 13vh; width: min(540px, calc(100vw - 24px)); transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-3); overflow: hidden; animation: pop .14s ease;}
.deals-app .pal input{width: 100%; height: 48px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 14px; outline: 0;}
.deals-app .pal .res{max-height: 320px; overflow: auto; padding: 6px;}
.deals-app .pal .res button{display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border-radius: 9px;}
.deals-app .pal .res button:hover, .deals-app .pal .res button.on{background: var(--soft);}
.deals-app #toasts{position: fixed; z-index: 40; right: 18px; bottom: 18px; display: grid; gap: 8px;}
.deals-app .toast{display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-2); animation: pop2 .18s ease;}
.deals-app .toast button{color: inherit; text-decoration: underline; text-underline-offset: 2px;}
@keyframes pop2{ from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 1180px){
.deals-app .step .pill{display: none;}
.deals-app .grid-3{grid-template-columns: repeat(2, minmax(0,1fr));}
.deals-app .grid-side{grid-template-columns: minmax(0,1fr);}
.deals-app .caps{grid-template-columns: repeat(2, minmax(0,1fr));}
}
@media (max-width: 860px){
.deals-app .grid-2, .deals-app .grid-3, .deals-app .merge{grid-template-columns: minmax(0,1fr);}
.deals-app .mjoin{padding: 4px;}
.deals-app .top-search{display: none;}
.deals-app .page{padding: 16px 14px 32px;}
.deals-app .head .acts{margin-left: 0;}
.deals-app .card-head .end{margin-left: 0;}
.deals-app .bar-row{grid-template-columns: 78px minmax(0,1fr) 76px;}
.deals-app .stat3 b{font-size: 15px;}
.deals-app .d-foot{flex-wrap: wrap;}
.deals-app .tl-item{grid-template-columns: 32px minmax(0,1fr);}
.deals-app .tl-item time{grid-column: 2; padding-top: 0;}
.deals-app .ev-row{grid-template-columns: 62px minmax(0,1fr) 84px;}
.deals-app .ev-row .hide-s{display: none;}
.deals-app .site-card{grid-template-columns: 62px minmax(0,1fr);}
.deals-app .site-card > .end{grid-column: 1 / -1;}
.deals-app .pv{grid-template-columns: minmax(0,1fr);}
.deals-app table{font-size: 12px;}
.deals-app th, .deals-app td{padding: 9px 10px;}
}
.deals-app .tiles{display: grid; grid-template-columns: repeat(4, minmax(0,1fr));}
.deals-app .tiles > div{padding: 13px 16px; border-left: 1px solid var(--line);}
.deals-app .tiles > div:first-child{border-left: 0;}
.deals-app .mnav{display: none;}
@media (max-width: 860px){
.deals-app .mnav{display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); background: var(--surface); border-top: 1px solid var(--line);}
.deals-app .mnav button{display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 10.5px;}
.deals-app .mnav button.on{color: var(--accent);}
.deals-app .tiles{grid-template-columns: repeat(2, minmax(0,1fr));}
.deals-app .tiles > div:nth-child(odd){border-left: 0;}
.deals-app .tiles > div:nth-child(n+3){border-top: 1px solid var(--line);}
.deals-app .seg{display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none;}
.deals-app .person-head > .chip, .deals-app .person-head > .btn{margin-left: 0;}
.deals-app .person-head .grow{min-width: 0; flex: 1 1 calc(100% - 74px); overflow-wrap: anywhere;}
.deals-app .sales-table th:nth-child(2), .deals-app .sales-table td:nth-child(2), .deals-app .sales-table th:nth-child(5), .deals-app .sales-table td:nth-child(5), .deals-app .sales-table th:nth-child(7), .deals-app .sales-table td:nth-child(7){display: none;}
}
.deals-app{--c-won: #607d12; --c-wei: #ad9f1d; --c-1: #7fa21f; --hatch: #b8b8a6; --sig-client: #7fa21f; --sig-company: #7e7307;
  --won-1: #17735a; --won-soft: #e6f4ee;}
[data-theme="dark"] .deals-app{--c-won: #759c23; --c-wei: #765b0e; --c-1: #9dcc1b; --hatch: #76765d; --sig-client: #c2ed4a; --sig-company: #c5b11f;
  --won-1: #43c495; --won-soft: #2a1e12;}
.deals-app .sr{position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);}
.deals-app .w5{font-weight: 500;}
.deals-app .end-auto{margin-left: auto;}
.deals-app .ok-text{color: var(--ok);}
.deals-app .bad-text{color: var(--bad);}
.deals-app .stack.tight{gap: 8px;}
.deals-app .row.center{justify-content: center;}
.deals-app .center{text-align: center;}
.deals-app .pad{padding: 16px;}
.deals-app .pad0{padding: 4px 0 10px;}
.deals-app a.btn{text-decoration: none;}
.deals-app .seg button{display: inline-flex; align-items: center; gap: 6px;}
.deals-app .top-search{width: 300px; white-space: nowrap;}
.deals-app .top-search > span{min-width: 0; overflow: hidden; text-overflow: ellipsis;}
.deals-app .top-search kbd{flex: none; white-space: nowrap;}
.deals-app .big{font-size: 22px; font-weight: 500; letter-spacing: -.01em;}
.deals-app svg.i.xs{width: 13px; height: 13px;}
.deals-app .show-s{display: none !important;}
.deals-app .page.wide{max-width: 1560px;}
.deals-app .page.narrow-page{max-width: 860px;}
.deals-app .link-btn{color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-size: inherit;}
.deals-app .link-btn.start{display: inline-flex; gap: 5px; align-items: center; justify-self: start;}
.deals-app .link-btn.dim{color: var(--ink-3); font-size: 12px;}
.deals-app .link-like{color: var(--accent); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap;}
.deals-app p{font-weight: 400;}
.deals-app .btn.is-won{background: var(--won-1); border-color: var(--won-1); color: #fff;}
.deals-app .btn.is-won:hover{filter: brightness(1.08);}
.deals-app [data-theme="dark"] .btn.is-won{color: #06241b;}
.deals-app .avatar.is-person{background: var(--soft-2); color: var(--accent); box-shadow: none;}
.deals-app .chip.tiny{min-height: 18px; padding: 0 6px; font-size: 10.5px; gap: 3px;}
.deals-app .btn:disabled{opacity: .5; cursor: not-allowed;}
.deals-app .head h1{font-size: 22px; font-weight: 500; letter-spacing: -.01em;}
.deals-app .pulse{display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 1px; margin-bottom: 12px; border-radius: var(--radius); overflow: hidden; background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow-1);}
.deals-app .p-cell{display: grid; gap: 2px; align-content: start; padding: 12px 16px; background: var(--surface); min-width: 0;}
.deals-app .p-cell small{display: block; color: var(--ink-2); font-size: 11.5px;}
.deals-app .p-cell b{display: block; font-size: 20px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums;}
.deals-app .p-cell > span{font-size: 12px;}
.deals-app .p-fore{display: grid; gap: 4px;}
.deals-app .fore-bar{display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); margin-top: 3px;}
.deals-app .fore-bar i{display: block; height: 100%;}
.deals-app .fore-bar i.won{background: var(--c-won);}
.deals-app .fore-bar i.wei{background: var(--c-wei);}
.deals-app .fore-bar i.rest{background: repeating-linear-gradient(135deg, var(--hatch) 0 1.5px, transparent 1.5px 4px);}
.deals-app .p-need{padding: 12px 16px; background: var(--warn-soft); color: var(--ink); text-align: left; min-width: 208px; transition: background .15s;}
.deals-app .p-need b{font-size: 20px; font-weight: 500; color: var(--warn);}
.deals-app .p-need svg{color: var(--warn);}
.deals-app .p-need:hover{background: color-mix(in oklab, var(--warn-soft) 80%, var(--warn));}
.deals-app .p-need.calm{background: var(--surface);}
.deals-app .p-need.calm b, .deals-app .p-need.calm svg{color: var(--ok);}
.deals-app .p-need.calm b{display: inline-flex; align-items: center; gap: 6px;}
.deals-app .p-need.on{box-shadow: inset 0 0 0 2px var(--warn);}
.deals-app .toolbar{display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;}
.deals-app .inp.sel{width: auto; min-height: 32px; padding-right: 26px;}
.deals-app .pipe-pick{max-width: 240px; font-weight: 500;}
.deals-app .tb-search{display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); width: 210px; color: var(--ink-3);}
.deals-app .tb-search:focus-within{border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring);}
.deals-app .tb-search input{border: 0; outline: 0; background: none; width: 100%; color: var(--ink);}
.deals-app .kbd-on{color: var(--ink-3);}
.deals-app .board{display: grid; grid-auto-flow: column; grid-auto-columns: minmax(216px, 1fr); gap: 10px; align-items: start; padding-bottom: 76px; overflow-x: auto;}
.deals-app .col{display: flex; flex-direction: column; min-width: 0; border-radius: 14px; background: color-mix(in oklab, var(--surface-3) 62%, var(--bg)); border: 1px solid transparent; transition: background .14s, border-color .14s;}
.deals-app .col.over{background: var(--soft); border-color: var(--accent);}
.deals-app .col-head{padding: 10px 12px 8px;}
.deals-app .col-head .row{gap: 6px;}
.deals-app .col-head h3, .deals-app .col-head b{font-size: 12.5px; font-weight: 500;}
.deals-app .col-n{display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--surface); color: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums;}
.deals-app .col-p{color: var(--ink-3); font-size: 11px; margin-left: auto; font-variant-numeric: tabular-nums;}
.deals-app .col-sum{display: flex; align-items: baseline; gap: 7px; margin-top: 3px; color: var(--ink-2); font-size: 11.5px; font-variant-numeric: tabular-nums;}
.deals-app .col-meter{height: 3px; margin-top: 7px; border-radius: 2px; background: var(--line); overflow: hidden;}
.deals-app .col-meter i{display: block; height: 100%; background: var(--flow); border-radius: 2px; transition: width .25s;}
.deals-app .col-body{display: grid; gap: 7px; padding: 2px 7px 8px; min-height: 76px; align-content: start;}
.deals-app .col-empty{display: grid; place-items: center; gap: 6px; padding: 18px 10px; border: 1px dashed var(--line-2); border-radius: 11px; color: var(--ink-3); text-align: center; font-size: 11.5px;}
.deals-app .deal{position: relative; display: grid; gap: 6px; width: 100%; padding: 10px 11px; border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid transparent; cursor: grab; touch-action: pan-y; transition: transform .12s, box-shadow .12s, border-color .12s; user-select: none; text-align: left;}
.deals-app .deal:hover{box-shadow: var(--shadow-2); transform: translateY(-1px); border-color: var(--line-2);}
.deals-app .deal:focus-visible{outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 11px;}
.deals-app .deal.needs::before{content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--warn);}
.deals-app .deal.flash{animation: flash 1s ease;}
@keyframes flash{ 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow-1); } }
.deals-app .deal.lifted{opacity: .35;}
.deals-app .deal.ghost{position: fixed; z-index: 40; pointer-events: none; opacity: 1; transform: rotate(1.8deg) scale(1.02); box-shadow: var(--shadow-3); cursor: grabbing;}
body.dragging .deals-app , body.dragging .deals-app *{cursor: grabbing !important; user-select: none;}
.deals-app .ph{height: 64px; border: 1.5px dashed var(--accent); border-radius: 11px; background: var(--soft);}
.deals-app .c-top{display: flex; align-items: baseline; gap: 8px; min-width: 0;}
.deals-app .c-top h4{flex: 1; min-width: 0; font-size: 13px; font-weight: 500;}
.deals-app .c-top .num{flex: none; font-size: 12.5px; font-weight: 500; white-space: nowrap;}
.deals-app .c-sub{color: var(--ink-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.deals-app .c-next{display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11.5px; color: var(--ink-2);}
.deals-app .c-next span{flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.deals-app .c-next time{flex: none; white-space: nowrap; font-variant-numeric: tabular-nums;}
.deals-app .c-next svg{flex: none;}
.deals-app .c-next.none{color: var(--warn);}
.deals-app .c-next.late{color: var(--bad);}
.deals-app .c-next.today{color: var(--accent);}
.deals-app .c-foot{display: flex; align-items: flex-end; gap: 5px; min-height: 22px; min-width: 0;}
.deals-app .c-docs{display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0;}
.deals-app .c-foot .chip{max-width: 100%;}
.deals-app .c-chan{color: var(--ink-3); display: inline-flex; align-self: center; flex: none;}
.deals-app .c-foot .avatar{flex: none;}
.deals-app .c-chan svg{width: 13px; height: 13px;}
.deals-app .c-move{display: none; margin-left: auto; min-width: 32px; min-height: 32px; place-items: center; border-radius: 8px; color: var(--ink-2);}
.deals-app .dock{position: fixed; left: 50%; bottom: 18px; z-index: 39; display: flex; gap: 10px; transform: translate(-50%, 90px); opacity: 0; transition: transform .18s cubic-bezier(.2,.9,.3,1.1), opacity .14s; pointer-events: none;}
.deals-app .dock.up{transform: translate(-50%, 0); opacity: 1; pointer-events: auto;}
.deals-app .dock-z{display: flex; align-items: center; justify-content: center; gap: 8px; width: 210px; height: 62px; border-radius: 14px; background: var(--surface); border: 1.5px dashed var(--line-2); box-shadow: var(--shadow-3); font-weight: 500; transition: all .12s;}
.deals-app .dock-z.won{color: var(--won-1); border-color: var(--won-1);}
.deals-app .dock-z.lost{color: var(--ink-2);}
.deals-app .dock-z.won.over{background: var(--won-1); color: #fff; transform: scale(1.05); border-style: solid;}
.deals-app .dock-z.lost.over{background: var(--ink-2); color: var(--surface); transform: scale(1.05); border-style: solid;}
.deals-app .welcome{display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; align-items: center; padding: 26px 28px; margin-bottom: 14px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--surface), var(--soft)); box-shadow: var(--shadow-1); overflow: hidden;}
.deals-app .welcome h2{font-size: 22px; font-weight: 500; letter-spacing: -.01em; margin: 6px 0 6px; line-height: 1.25;}
.deals-app .w-copy{display: grid; gap: 8px;}
.deals-app .eyebrow{color: var(--accent); font-size: 11.5px; font-weight: 500; letter-spacing: .03em;}
.deals-app .w-steps{display: grid; gap: 7px; margin: 6px 0 8px; padding: 0; list-style: none;}
.deals-app .w-steps li{display: flex; gap: 8px; align-items: center; color: var(--ink-2);}
.deals-app .ghost-board{display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; opacity: .92;}
.deals-app .ghost-board > div{display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: color-mix(in oklab, var(--surface-3) 70%, transparent); align-content: start; min-height: 136px;}
.deals-app .zero-board .col-empty{width: 100%;}
.deals-app .ghost-board small{color: var(--ink-3);}
.deals-app .ghost-board span, .deals-app .ghost-board i{display: block; height: 34px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-1);}
.deals-app .skel{display: block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 220% 100%; animation: shimmer 1.3s linear infinite;}
@keyframes shimmer{ to { background-position: -220% 0; } }
.deals-app .skel.w20{width: 20%;}
.deals-app .skel.w40{width: 40%;}
.deals-app .skel.w50{width: 50%;}
.deals-app .skel.w70{width: 70%;}
.deals-app .skel.w90{width: 90%;}
.deals-app .skel.tall{height: 22px;}
.deals-app .skel.chart{height: 200px; border-radius: 10px; margin-top: 12px;}
.deals-app .skel-row{display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 6px 0;}
.deals-app .skel-card{display: grid; gap: 8px; padding: 12px; border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-1);}
.deals-app .banner{display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);}
.deals-app .banner > svg{flex: none;}
.deals-app .banner.warn{background: var(--warn-soft); border-color: var(--warn-line);}
.deals-app .banner.warn > svg{color: var(--warn);}
.deals-app .banner.bad{background: var(--bad-soft); border-color: var(--bad-line);}
.deals-app .banner.bad > svg{color: var(--bad);}
.deals-app .tbl-card{overflow: hidden; padding: 0;}
.deals-app .tbl-card table{width: 100%; border-collapse: collapse;}
.deals-app .th-btn{display: inline-flex; align-items: center; gap: 4px; color: inherit; font: inherit;}
.deals-app tr.click{cursor: pointer;}
.deals-app tr.click:hover td{background: var(--surface-2);}
.deals-app tr.closed td{color: var(--ink-3);}
.deals-app tr.click:focus-visible{outline: 2px solid var(--accent); outline-offset: -2px;}
.deals-app .stage-pill{display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 99px; background: var(--surface-3); font-size: 11.5px; white-space: nowrap;}
.deals-app .tbl-foot{padding: 10px 14px; color: var(--ink-2); font-size: 12px; border-top: 1px solid var(--line);}
.deals-app .sheet{position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; display: grid; gap: 10px; padding: 8px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 18px 18px 0 0; box-shadow: var(--shadow-3); animation: rise .18s cubic-bezier(.2,.9,.3,1.05); max-height: 86vh; overflow: auto;}
@keyframes rise{ from { transform: translateY(40px); opacity: 0; } }
.deals-app .sheet-grip{width: 38px; height: 4px; margin: 0 auto 4px; border-radius: 2px; background: var(--line-2);}
.deals-app .sheet-list{display: grid; gap: 2px;}
.deals-app .sheet-list button{display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 10px; border-radius: 10px;}
.deals-app .sheet-list button.on{background: var(--soft); color: var(--accent);}
.deals-app .sheet-acts{display: grid; grid-template-columns: 1fr 1fr; gap: 8px;}
.deals-app .sheet-acts .btn{min-height: 44px; justify-content: center;}
.deals-app .stage-tabs{display: none;}
.deals-app .gate{display: grid; gap: 12px; justify-items: center; max-width: 480px; margin: 9vh auto 0; text-align: center;}
.deals-app .gate.wide{max-width: 640px;}
.deals-app .gate h1, .deals-app .gate h2{font-size: 22px; font-weight: 500; letter-spacing: -.01em;}
.deals-app .gate p{color: var(--ink-2); font-weight: 400;}
.deals-app .gate.in-card{margin: 12px auto 0; padding: 40px 28px;}
.deals-app .gate-points{display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 6px;}
.deals-app .gate-points span{display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 12px;}
.deals-app .glyph{display: grid; place-items: center; width: 54px; height: 54px; border-radius: 17px; background: var(--soft); color: var(--accent);}
.deals-app .glyph svg{width: 24px; height: 24px;}
.deals-app .phonewrap{display: grid; place-items: center; height: calc(100vh - 38px); background: var(--bg); overflow: auto; padding: 14px;}
.deals-app .device{width: 410px; height: min(844px, calc(100vh - 66px)); padding: 10px; border-radius: 42px; background: #13130b; box-shadow: var(--shadow-3); flex: none;}
.deals-app .device iframe{width: 390px; height: 100%; border: 0; border-radius: 32px; background: var(--bg); display: block;}
.deals-app #tip{position: fixed; z-index: 60; max-width: 280px; display: grid; gap: 3px; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 11.5px; pointer-events: none; box-shadow: var(--shadow-2);}
.deals-app #tip[hidden]{display: none;}
.deals-app #tip .tp{display: flex; align-items: center; gap: 6px; opacity: .92;}
.deals-app #tip .tp b{margin-left: auto; padding-left: 12px; font-weight: 500; font-variant-numeric: tabular-nums;}
.deals-app #tip b{font-weight: 500;}
.deals-app #tip .faint{color: inherit; opacity: .7;}
.deals-app .keyrow{padding: 3px 0;}
.deals-app .keyrow .muted{margin-left: 6px;}
.deals-app .modal{z-index: 22; grid-template-columns: minmax(0, 1fr);}
.deals-app .scrim + .modal, .deals-app .scrim + .drawer{animation: pop .18s cubic-bezier(.2,.9,.3,1.05);}
.deals-app .m-head{display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px;}
.deals-app .m-head h3{font-size: 15px; font-weight: 500;}
.deals-app .m-body{display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 2px 16px 14px; overflow: auto; min-height: 0; align-content: start;}
.deals-app .m-foot{display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius);}
.deals-app .field{display: grid; gap: 5px; min-width: 0;}
.deals-app .field > span:first-child, .deals-app .field > label:first-child{color: var(--ink-2); font-size: 12px;}
.deals-app .grid-2.gap{display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;}
.deals-app .input-affix{position: relative; display: block;}
.deals-app .input-affix i{position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-style: normal; font-size: 12px; pointer-events: none;}
.deals-app .input-affix .inp{padding-left: 30px; width: 100%;}
.deals-app .input-affix.right i{left: auto; right: 10px;}
.deals-app .input-affix.right .inp{padding-left: 10px; padding-right: 36px;}
.deals-app .seg.full{display: flex; width: 100%;}
.deals-app .seg.full button{flex: 1; justify-content: center; display: inline-flex; align-items: center; gap: 6px; text-align: center;}
.deals-app .check{display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 12.5px;}
.deals-app .check input{margin-top: 2px; accent-color: var(--accent);}
.deals-app textarea.inp{resize: vertical; min-height: 60px; padding-top: 7px; font-size: 13px;}
.deals-app .inp.bad{border-color: var(--bad);}
.deals-app .drawer.deal-drawer, .deals-app .drawer.c-drawer{width: min(540px, 100vw); box-shadow: var(--shadow-3);}
.deals-app .dd-head{display: grid; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line);}
.deals-app .dd-head h2{font-size: 17px; font-weight: 500; letter-spacing: -.005em;}
.deals-app .dd-contact{display: flex; gap: 6px; flex-wrap: wrap;}
.deals-app .dd-contact .btn{max-width: 210px;}
.deals-app .stepper{display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; border-radius: 9px; overflow: hidden;}
.deals-app .stepper button{position: relative; min-height: 28px; padding: 0 3px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; text-align: center; transition: background .12s; min-width: 0;}
.deals-app .stepper button:hover:not(:disabled){background: var(--soft-2); color: var(--ink);}
.deals-app .stepper button.done{background: var(--soft-2); color: var(--accent);}
.deals-app .stepper button.now{background: var(--accent); color: var(--accent-ink); font-weight: 500;}
.deals-app .stepper button:focus-visible{outline-offset: -2px;}
.deals-app .stepper button span{display: block;}
.deals-app .dd-body{display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px 16px; overflow: auto; align-content: start; min-height: 0;}
.deals-app .dd-foot{display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2);}
.deals-app .next{display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid transparent;}
.deals-app .next.late{background: var(--bad-soft); border-color: var(--bad-line);}
.deals-app .next.none{display: grid; gap: 8px; background: var(--warn-soft); border-color: var(--warn-line);}
.deals-app .next-head{display: flex; align-items: center; gap: 7px;}
.deals-app .next-head b{font-weight: 500;}
.deals-app .next-head svg{color: var(--warn);}
.deals-app .quick .btn{flex: 1; justify-content: center;}
.deals-app .next-title{font-weight: 500;}
.deals-app .next .row .inp{width: 100%;}
.deals-app .next-check{display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); color: transparent; background: var(--surface); transition: all .12s;}
.deals-app .next-check:hover{background: var(--accent); color: var(--accent-ink);}
.deals-app .facts{display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); overflow: hidden;}
.deals-app .fact{position: relative; display: grid; gap: 2px; padding: 8px 12px; background: var(--surface); cursor: text; min-width: 0;}
.deals-app .fact:focus-within{background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--ring);}
.deals-app .fact small{color: var(--ink-2); font-size: 11px; display: flex; gap: 6px; align-items: baseline;}
.deals-app .fact-in{display: flex; align-items: center; gap: 5px; min-width: 0;}
.deals-app .fact-sub{margin-left: auto; white-space: nowrap;}
.deals-app .plain.pct-in{width: 3.2ch; flex: none;}
.deals-app .plain{width: 100%; border: 0; background: none; padding: 0; outline: 0; font-size: 14px; font-weight: 500; color: var(--ink); min-width: 0; color-scheme: inherit;}
.deals-app .stopped{display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 11px; background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 12.5px;}
.deals-app .stopped > svg{color: var(--warn); margin-top: 1px;}
.deals-app .stopped.bad{background: var(--bad-soft); border-color: var(--bad-line);}
.deals-app .stopped.bad > svg{color: var(--bad);}
.deals-app .stopped.good{background: var(--ok-soft); border-color: transparent;}
.deals-app .stopped.good > svg{color: var(--ok);}
.deals-app .result{display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;}
.deals-app .result.won{background: var(--ok-soft);}
.deals-app .result.won > svg{color: var(--ok); width: 20px; height: 20px;}
.deals-app .result.lost{background: var(--surface-3);}
.deals-app .result b{font-weight: 500;}
.deals-app .dd-tabs{display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-top: 2px;}
.deals-app .dd-tabs button{position: relative; padding: 7px 10px; color: var(--ink-2); font-size: 12.5px;}
.deals-app .dd-tabs button:hover{color: var(--ink);}
.deals-app .dd-tabs button.on{color: var(--ink); font-weight: 500;}
.deals-app .dd-tabs button.on::after{content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent);}
.deals-app .dd-pane{display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0;}
.deals-app .note-add{display: flex; gap: 6px;}
.deals-app .note-add .inp{flex: 1; width: auto; min-width: 0;}
.deals-app .tl{display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; position: relative;}
.deals-app .tl::before{content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 1px; background: var(--line);}
.deals-app .tl li{position: relative; display: flex; gap: 10px;}
.deals-app .tl p{font-weight: 400;}
.deals-app .tl-dot{position: relative; flex: none; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--surface-3); color: var(--ink-2);}
.deals-app .tl-dot svg{width: 13px; height: 13px;}
.deals-app .tl li.fresh{animation: pop2 .25s ease;}
.deals-app .tl li.fresh .tl-dot{background: var(--soft-2); color: var(--accent);}
.deals-app .tab-empty{display: grid; gap: 8px; justify-items: center; padding: 22px 12px; text-align: center;}
.deals-app .tab-empty h4{font-size: 14px; font-weight: 500;}
.deals-app .doc-row{display: flex; align-items: center; gap: 10px; min-width: 0;}
.deals-app .doc-ic{flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--accent);}
.deals-app .evidence{display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; background: var(--ok-soft); font-size: 12px;}
.deals-app .evidence b{font-weight: 500;}
.deals-app .pix-wait{display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--soft);}
.deals-app .mini-thread{display: grid; gap: 6px;}
.deals-app .bub{position: relative; max-width: 82%; padding: 7px 10px 5px; border-radius: 12px; font-size: 12.5px;}
.deals-app .bub p{font-weight: 400;}
.deals-app .bub time{display: block; text-align: right; color: var(--ink-3); font-size: 10px; margin-top: 1px;}
.deals-app .conv-body .bub.in{background: var(--surface); box-shadow: var(--shadow-1);}
.deals-app .bub.out{justify-self: end; background: var(--soft-2); border-bottom-right-radius: 4px;}
.deals-app .bub.in{justify-self: start; background: var(--surface-3); border-bottom-left-radius: 4px;}
.deals-app .signers{display: grid; gap: 10px; margin: 0; padding: 0; list-style: none;}
.deals-app .signers li{display: flex; gap: 10px; align-items: flex-start;}
.deals-app .s-dot{flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); color: #fff; margin-top: 2px;}
.deals-app .s-dot svg{width: 12px; height: 12px;}
.deals-app .signers .signed .s-dot{background: var(--ok); border-color: var(--ok);}
.deals-app .signers .declined .s-dot{background: var(--bad); border-color: var(--bad);}
.deals-app .signers .viewed .s-dot{border-color: var(--accent); background: var(--soft-2);}
.deals-app .signers .sent .s-dot{border-color: var(--accent);}
.deals-app [data-theme="dark"] .signers .signed .s-dot, .deals-app [data-theme="dark"] .signers .declined .s-dot{color: #181906;}
.deals-app .lines-mini{display: grid; gap: 4px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px;}
.deals-app .will{display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--soft);}
.deals-app .will b{font-weight: 500;}
.deals-app .will ul{display: grid; gap: 7px; margin: 0; padding: 0; list-style: none;}
.deals-app .will li{display: flex; gap: 8px; align-items: center;}
.deals-app .will svg{color: var(--accent);}
.deals-app .will li.faint svg{color: inherit;}
.deals-app .won-done{display: grid !important; grid-template-rows: none !important; justify-items: center; gap: 8px; padding: 28px 24px 22px; text-align: center; top: 16vh;}
.deals-app .won-done h2{font-size: 22px; font-weight: 500;}
.deals-app .burst{position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); animation: burst .5s cubic-bezier(.2,1.6,.4,1);}
.deals-app .burst svg{width: 30px; height: 30px;}
.deals-app .burst::after{content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ok); animation: ring .7s ease-out forwards;}
@keyframes burst{ from { transform: scale(.4); opacity: 0; } }
@keyframes ring{ to { transform: scale(1.7); opacity: 0; } }
.deals-app .did{display: grid; gap: 6px; margin: 8px 0 12px; padding: 12px 14px; list-style: none; border-radius: 12px; background: var(--surface-2); text-align: left; width: 100%; font-size: 12.5px;}
.deals-app .did li{display: flex; gap: 8px; align-items: center;}
.deals-app .did svg{color: var(--ok);}
.deals-app .reason-grid{display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;}
.deals-app .reason-grid button{min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); transition: all .1s;}
.deals-app .reason-grid button:hover{border-color: var(--accent);}
.deals-app .reason-grid button.on{background: var(--soft); border-color: var(--accent); color: var(--accent); font-weight: 500; box-shadow: inset 0 0 0 1px var(--accent);}
.deals-app .picked{display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2);}
.deals-app .pick-list{display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin-top: -6px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; max-height: 210px; overflow: auto;}
.deals-app .pick-list.big{margin: 0; max-height: 56vh; border: 0; padding: 0;}
.deals-app .pick-list button, .deals-app .drill-row{display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 8px; width: 100%;}
.deals-app .pick-list button{text-align: left;}
.deals-app .pick-list button:hover{background: var(--surface-3);}
.deals-app .pick-list.big{overflow-x: hidden;}
.deals-app .pick-list button > .avatar, .deals-app .drill-row > .avatar{flex: none;}
.deals-app .pick-list button > .num, .deals-app .drill-row > .num{flex: none;}
.deals-app .pick-new{display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; background: var(--soft); color: var(--accent); margin-top: -4px;}
.deals-app .soft-warn{display: flex; gap: 8px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--warn-soft); font-size: 12.5px;}
.deals-app .soft-warn svg{color: var(--warn);}
.deals-app .quote-page{max-width: 1320px;}
.deals-app .q-top{display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;}
.deals-app .q-switch{display: none; margin-bottom: 12px;}
.deals-app .q-grid{display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; align-items: start;}
.deals-app .q-line{display: grid; grid-template-columns: minmax(0, 1fr) 54px 88px 62px 84px 30px; gap: 8px; align-items: end; padding: 9px 0; border-bottom: 1px solid var(--line);}
.deals-app .q-line:first-child{padding-top: 0;}
.deals-app .q-name{align-self: center; font-weight: 500; min-width: 0;}
.deals-app .q-f{display: grid; gap: 2px;}
.deals-app .q-f small{color: var(--ink-3); font-size: 10.5px;}
.deals-app .q-f .inp{min-height: 30px; padding: 0 7px; width: 100%; text-align: right;}
.deals-app .q-tot{align-self: center; text-align: right; font-weight: 500; padding-top: 12px;}
.deals-app .q-line > .btn{align-self: center; margin-top: 12px; padding: 0 5px;}
.deals-app .cat-add{display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px;}
.deals-app .cat-add > span{width: 100%;}
.deals-app .cat-chip{display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border: 1px dashed var(--line-2); border-radius: 99px; font-size: 12px; transition: all .1s; max-width: 100%;}
.deals-app .cat-chip span{overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.deals-app .cat-chip small{color: var(--ink-3);}
.deals-app .cat-chip:hover{border-color: var(--accent); border-style: solid; background: var(--soft);}
.deals-app .pay-opts{display: grid; gap: 6px;}
.deals-app .pay-opt{display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 11px; text-align: left; transition: all .1s; width: 100%;}
.deals-app .pay-opt.on{border-color: var(--accent); background: var(--soft);}
.deals-app .q-sum{display: flex; align-items: center; gap: 16px; padding: 14px 16px;}
.deals-app .q-sum p{flex: 1; font-weight: 400;}
.deals-app .q-preview{position: sticky; top: 0;}
.deals-app .browser{border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-2);}
.deals-app .browser-bar{display: flex; align-items: center; gap: 5px; padding: 8px 12px; background: var(--surface-3); color: var(--ink-3); font-size: 11px;}
.deals-app .browser-bar i{width: 8px; height: 8px; border-radius: 50%; background: var(--line-2);}
.deals-app .browser-bar span{flex: 1; margin-left: 8px; padding: 2px 10px; border-radius: 99px; background: var(--surface);}
.deals-app .browser-body{background: #f8f7f6; color: #282912; max-height: 72vh; overflow: auto; padding: 16px;}
.deals-app .phone-preview{padding: 12px; border-radius: 12px; background: var(--surface-3); display: grid;}
.deals-app .phone-preview .bub{max-width: 90%;}
.deals-app .link-card{display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 8px; border-radius: 9px; background: rgba(255,255,255,.55);}
.deals-app [data-theme="dark"] .link-card{background: rgba(0,0,0,.25);}
.deals-app .link-card small{color: var(--ink-3);}
.deals-app .pdoc{display: grid; gap: 16px; background: #fff; color: #282912; border-radius: 14px; padding: 24px; box-shadow: 0 1px 2px rgba(40, 41, 18,.05), 0 6px 24px rgba(40, 41, 18,.07);}
.deals-app .pdoc.small{padding: 18px; gap: 12px; font-size: 12px;}
.deals-app .pdoc-head{display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #6f6e55;}
.deals-app .pdoc-head b{color: #282912; font-weight: 500; font-size: 14px;}
.deals-app .pdoc-num{text-align: right;}
.deals-app .pdoc-num small{display: block; font-size: 10.5px; color: #96967f;}
.deals-app .pdoc-num b{font-size: 13px;}
.deals-app .mark.big{width: 36px; height: 36px; border-radius: 11px; font-size: 16px;}
.deals-app .pdoc-hero{display: grid; gap: 4px; padding: 18px; border-radius: 12px; background: color-mix(in oklab, var(--brand) 8%, #fff);}
.deals-app .pdoc-hero small{color: #6f6e55;}
.deals-app .pdoc-hero h2{font-size: 20px; font-weight: 500; letter-spacing: -.01em;}
.deals-app .pdoc-total{display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px;}
.deals-app .pdoc-total b{font-size: 28px; font-weight: 500; letter-spacing: -.02em;}
.deals-app .pdoc-total s{color: #96967f;}
.deals-app .save{color: #17735a; font-size: 12px; font-weight: 500;}
.deals-app .pdoc-until{display: inline-flex; align-items: center; gap: 5px; color: #6f6e55; font-size: 12px;}
.deals-app .pdoc-lines{width: 100%; border-collapse: collapse;}
.deals-app .pdoc-lines th{padding: 6px 0; text-align: left; color: #96967f; font-weight: 400; font-size: 11.5px; border-bottom: 1px solid #ebebe3; background: none; position: static;}
.deals-app .pdoc-lines th.r, .deals-app .pdoc-lines td.r{text-align: right;}
.deals-app .pdoc-lines td{padding: 10px 0; border-bottom: 1px solid #f3f3ee; color: #282912; vertical-align: top; background: none;}
.deals-app .pdoc-lines .muted{color: #6f6e55;}
.deals-app .pdoc-lines .faint{color: #96967f;}
.deals-app .pdoc-lines tr.pdoc-sum td{border-bottom: 0; font-weight: 500; font-size: 15px; padding-top: 12px;}
.deals-app .pdoc-note{color: #6f6e55; font-weight: 400; font-size: 12.5px;}
.deals-app .pdoc-pays{display: flex; flex-wrap: wrap; gap: 6px;}
.deals-app .pdoc-pays span{display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; background: #f3f3ee; color: #6f6e55; font-size: 11.5px;}
.deals-app .pub{position: relative; height: calc(100vh - 38px); overflow: auto; background: #f6f5f4; color: #282912; --surface: #fff; --surface-2: #faf9f8; --surface-3: #f3f3ee; --line: #ebebe3; --line-2: #e0e0d4; --ink: #282912; --ink-2: #6f6e55; --ink-3: #96967f; --soft: color-mix(in oklab, var(--brand) 9%, #fff); --soft-2: color-mix(in oklab, var(--brand) 16%, #fff); --accent: var(--brand); --accent-ink: #fff; --ok: #1b8a60; --ok-soft: #e6f4ee; --bad: #c93636; --bad-soft: #fcefef; --bad-line: #f2cfcf; color-scheme: light;}
.deals-app [data-theme="dark"] .pub{background: #17180a; color: #eeeee3; --surface: #252713; --surface-2: #2a2c17; --surface-3: #33351d; --line: #3d3d26; --line-2: #4d4e33; --ink: #eeeee3; --ink-2: #b9b9a3; --ink-3: #95957c; --soft: color-mix(in oklab, var(--brand) 20%, #252713); --soft-2: color-mix(in oklab, var(--brand) 32%, #252713); --ok: #43c495; --ok-soft: #2a1e12; --bad: #f08a8a; --bad-soft: #3a1f22; --bad-line: #5d2d31; color-scheme: dark;}
.deals-app [data-theme="dark"] .pub .pdoc, .deals-app [data-theme="dark"] .pub-bar, .deals-app [data-theme="dark"] .pub-end, .deals-app [data-theme="dark"] .pub-sticky, .deals-app [data-theme="dark"] .sign-dock{background: var(--surface); color: var(--ink);}
.deals-app [data-theme="dark"] .pub .pdoc-head, .deals-app [data-theme="dark"] .pub .pdoc-hero small, .deals-app [data-theme="dark"] .pub .pdoc-until, .deals-app [data-theme="dark"] .pub .pdoc-note, .deals-app [data-theme="dark"] .pub .pdoc-lines .muted{color: var(--ink-2);}
.deals-app [data-theme="dark"] .pub .pdoc-head b, .deals-app [data-theme="dark"] .pub .pdoc-lines td{color: var(--ink);}
.deals-app [data-theme="dark"] .pub .pdoc-num small, .deals-app [data-theme="dark"] .pub .pdoc-total s, .deals-app [data-theme="dark"] .pub .pdoc-lines th, .deals-app [data-theme="dark"] .pub .pdoc-lines .faint{color: var(--ink-3);}
.deals-app [data-theme="dark"] .pub .pdoc-lines th, .deals-app [data-theme="dark"] .pub .pdoc-lines td{border-color: var(--line);}
.deals-app [data-theme="dark"] .pub .pdoc-hero{background: color-mix(in oklab, var(--brand) 20%, var(--surface));}
.deals-app [data-theme="dark"] .pub .pdoc-pays span{background: var(--surface-3); color: var(--ink-2);}
.deals-app [data-theme="dark"] .pub .save{color: var(--ok);}
.deals-app .pub-mock{display: flex; align-items: center; gap: 4px; padding: 6px 12px; background: #292919; color: #dad9cd;}
.deals-app .pub-mock .btn{color: #dad9cd; background: none; border-color: transparent; min-height: 26px;}
.deals-app .pub-mock .btn.soft{background: rgba(255,255,255,.16); color: #fff;}
.deals-app .pub-mock .btn:hover{background: rgba(255,255,255,.1);}
.deals-app .pub-bar{display: flex; align-items: center; gap: 10px; padding: 12px clamp(14px, 4vw, 40px); background: #fff; border-bottom: 1px solid var(--line);}
.deals-app .pub-bar b{font-weight: 500; font-size: 15px;}
.deals-app .ghost-on{background: none; border-color: var(--line-2);}
.deals-app .pub-main{display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; max-width: 1040px; margin: 0 auto; padding: 22px clamp(12px, 3vw, 24px) 40px;}
.deals-app .pub-main.narrow{display: grid; grid-template-columns: minmax(0, 1fr); max-width: 520px; gap: 14px;}
.deals-app .pub-side{position: sticky; top: 16px; display: grid; gap: 10px; padding: 18px;}
.deals-app .pub-total{font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1;}
.deals-app .btn.pub-cta{justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-size: 14px; font-weight: 500; box-shadow: 0 4px 14px color-mix(in oklab, var(--brand) 35%, transparent); transition: transform .1s, filter .1s;}
.deals-app .btn.pub-cta:hover{filter: brightness(1.08); transform: translateY(-1px);}
.deals-app .btn.full{width: 100%; justify-content: center;}
.deals-app .pub-sticky{display: none;}
.deals-app .pub-foot{display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; padding: 18px 16px 26px; color: var(--ink-3); font-size: 11.5px; text-align: center;}
.deals-app .powered{color: var(--ink-3);}
.deals-app .powered .link-btn{color: inherit;}
.deals-app .pub-end{display: grid; gap: 12px; justify-items: center; padding: 42px 18px; text-align: center; background: #fff; border-radius: 16px; box-shadow: var(--shadow-1);}
.deals-app .pub-end h1, .deals-app .pub-ok h1{font-size: 22px; font-weight: 500; letter-spacing: -.01em;}
.deals-app .pub-end p{font-weight: 400;}
.deals-app .pub-ok{display: grid; gap: 8px; justify-items: center; padding: 18px 0 4px; text-align: center;}
.deals-app .pub-ok p{font-weight: 400;}
.deals-app .pub-pay{display: grid; gap: 14px; padding: 16px;}
.deals-app .pix{display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center;}
.deals-app .pix-copy{display: grid; gap: 8px;}
.deals-app .pix-copy p{font-weight: 400;}
.deals-app .qr{display: block; width: 100%; height: auto; border-radius: 8px;}
.deals-app .qr-wrap{padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--line);}
.deals-app .qr-wrap.small{width: 128px; padding: 6px;}
.deals-app .pay-card{display: grid; gap: 12px;}
.deals-app .pay-card p{font-weight: 400;}
.deals-app .receipt{display: grid; gap: 8px; padding: 14px 16px;}
.deals-app .receipt b{font-weight: 500;}
.deals-app .receipt dl, .deals-app .kv{display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 12.5px;}
.deals-app .receipt dt, .deals-app .kv dt{color: var(--ink-2);}
.deals-app .receipt dd, .deals-app .kv dd{margin: 0; min-width: 0; overflow-wrap: anywhere;}
.deals-app .receipt .btn{justify-self: start;}
.deals-app .c-tabs{display: flex; align-items: center; gap: 10px; margin-bottom: 12px;}
.deals-app .c-table td{vertical-align: middle;}
.deals-app .s-pips{display: inline-flex; align-items: center; gap: 4px;}
.deals-app .s-pips em{margin-left: 3px; color: var(--ink-2); font-style: normal; font-size: 11.5px; font-variant-numeric: tabular-nums;}
.deals-app .s-pips i{display: block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-2);}
.deals-app .s-pips i.signed{background: var(--ok); border-color: var(--ok);}
.deals-app .s-pips i.declined{background: var(--bad); border-color: var(--bad);}
.deals-app .s-pips i.viewed{background: var(--soft-2); border-color: var(--accent);}
.deals-app .s-pips i.sent{border-color: var(--accent);}
.deals-app .tpl-grid{display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 12px;}
.deals-app .tpl{display: grid; grid-template-rows: auto auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; text-align: left; transition: transform .12s, box-shadow .12s;}
.deals-app .tpl:hover{transform: translateY(-2px); box-shadow: var(--shadow-2);}
.deals-app .tpl-thumb{height: 170px; overflow: hidden; padding: 14px 22px 0; background: var(--surface-3);}
.deals-app .tpl-info{display: grid; gap: 3px; padding: 11px 13px; justify-items: start;}
.deals-app .tpl.add{place-items: center; align-content: center; gap: 6px; min-height: 240px; border-style: dashed; border-color: var(--line-2); box-shadow: none; background: none; grid-template-rows: none; text-align: center;}
.deals-app .tpl.add:hover{border-color: var(--accent); background: var(--soft);}
.deals-app .paper{position: relative; width: 100%; aspect-ratio: 1 / 1.414; background: #fff; color: #3d3d26; border-radius: 3px; box-shadow: 0 1px 3px rgba(40, 41, 18,.14), 0 10px 30px rgba(40, 41, 18,.08); container-type: inline-size; overflow: hidden;}
.deals-app .pp{position: absolute; left: 10%; right: 10%; font-size: 1.62cqw; line-height: 1.5; font-family: Georgia, "Times New Roman", serif;}
.deals-app .pp.c{text-align: center; font-size: 1.9cqw;}
.deals-app .pp b{font-weight: 700;}
.deals-app .pp.lab{right: auto; font-family: Inter, "Segoe UI", sans-serif; color: #96967f; font-size: 1.4cqw;}
.deals-app .pp.foot{color: #96967f; text-align: right; font-size: 1.3cqw; font-family: Inter, "Segoe UI", sans-serif;}
.deals-app .pp-line{position: absolute; height: 1px; background: #6f6e55;}
.deals-app .pf-thumb{position: absolute; border-radius: 2px;}
.deals-app .pf-thumb.client{background: color-mix(in oklab, var(--sig-client) 34%, #fff);}
.deals-app .pf-thumb.company{background: color-mix(in oklab, var(--sig-company) 34%, #fff);}
.deals-app .paper.thumb{box-shadow: 0 1px 3px rgba(40, 41, 18,.18);}
.deals-app .file-ok{display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2);}
.deals-app .drop{display: grid; gap: 6px; justify-items: center; padding: 26px; border: 1.5px dashed var(--line-2); border-radius: 14px; cursor: pointer; text-align: center; transition: all .12s;}
.deals-app .drop:hover, .deals-app .drop:focus-within{border-color: var(--accent); background: var(--soft);}
.deals-app .to-line{display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2);}
.deals-app .fill-box{display: grid; gap: 6px; padding: 10px 12px; border-radius: 11px; background: var(--ok-soft);}
.deals-app .fill-row{display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; font-size: 12.5px; gap: 6px;}
.deals-app .sm-inp{min-height: 30px; width: 100%; font-size: 12px;}
.deals-app .fill-row.miss{margin-top: 2px;}
.deals-app .paper-stack{display: grid; place-items: center;}
.deals-app .paper-ghost{display: grid; gap: 7px; align-content: start; width: 170px; aspect-ratio: 1 / 1.414; padding: 18px 16px; background: var(--surface); border-radius: 4px; box-shadow: var(--shadow-3); transform: rotate(2deg);}
.deals-app .paper-ghost i{display: block; height: 5px; border-radius: 3px; background: var(--surface-3);}
.deals-app .paper-ghost b{margin-top: auto; height: 28px; border-radius: 5px; border: 1.5px dashed var(--accent); background: var(--soft);}
.deals-app .welcome.tiny-w{grid-template-columns: minmax(0, 1fr) 220px;}
.deals-app .placer{display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100%;}
.deals-app .pl-top{display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);}
.deals-app .pl-title{font-size: 14px; max-width: 340px; padding: 4px 6px; border-radius: 6px;}
.deals-app .pl-title:hover, .deals-app .pl-title:focus{background: var(--surface-3);}
.deals-app .pl-phone-note{display: none;}
.deals-app .pl-grid{display: grid; grid-template-columns: 220px minmax(0, 1fr) 260px; min-height: 0;}
.deals-app .pl-tools, .deals-app .pl-props{display: grid; gap: 10px; align-content: start; padding: 14px; background: var(--surface); overflow: auto;}
.deals-app .pl-tools{border-right: 1px solid var(--line);}
.deals-app .pl-props{border-left: 1px solid var(--line);}
.deals-app .placer h4{font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-top: 6px;}
.deals-app .pl-signers{display: grid; gap: 4px;}
.deals-app .pl-signers button{display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid transparent;}
.deals-app .pl-signers button i{width: 10px; height: 10px; border-radius: 50%;}
.deals-app .pl-signers .client i{background: var(--sig-client);}
.deals-app .pl-signers .company i{background: var(--sig-company);}
.deals-app .pl-signers button.on{background: var(--surface-3); border-color: var(--line-2); font-weight: 500;}
.deals-app .ghosty{color: var(--ink-2); border: 1px dashed var(--line-2) !important;}
.deals-app .pl-items{display: grid; gap: 4px;}
.deals-app .pl-item{display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 10px 0 6px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); cursor: grab; transition: all .1s; touch-action: none;}
.deals-app .pl-item:hover{border-color: var(--accent); box-shadow: var(--shadow-1); transform: translateX(1px);}
.deals-app .pl-check{display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; font-size: 12px;}
.deals-app .pl-check li{display: flex; gap: 6px; align-items: flex-start;}
.deals-app .pl-check .ok svg{color: var(--ok);}
.deals-app .pl-check .miss{color: var(--warn);}
.deals-app .pl-hint{display: grid; gap: 8px; justify-items: start; padding-top: 8px; color: var(--ink-3);}
.deals-app .pl-hint p{font-weight: 400;}
.deals-app .pl-canvas{display: grid; justify-content: center; align-content: start; grid-template-columns: minmax(0, 620px); gap: 8px; padding: 18px 24px 40px; overflow: auto; background: var(--surface-3);}
.deals-app .pl-pager{display: flex; gap: 3px; min-height: 0;}
.deals-app .pl-pager button{min-width: 26px; height: 24px; border-radius: 7px; color: var(--ink-2); font-size: 12px;}
.deals-app .pl-pager button.on{background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1);}
.deals-app .pf{position: absolute; display: flex; align-items: center; gap: 3px; padding: 0 5px; border: 1.5px solid; border-radius: 4px; font: 500 max(10px, 1.45cqw)/1 Inter, "Segoe UI", sans-serif; cursor: move; touch-action: none; user-select: none; overflow: visible; min-width: 0;}
.deals-app .pf.client{color: #607d12; border-color: #7fa21f; background: rgba(127, 162, 31,.1);}
.deals-app .pf.company{color: #706705; border-color: #7e7307; background: rgba(126, 115, 7,.1);}
.deals-app .pf.on{box-shadow: 0 0 0 3px rgba(127, 162, 31,.25); background: #fff; z-index: 2;}
.deals-app .pf:focus-visible{outline: 2px solid #282912; outline-offset: 2px; border-radius: 4px;}
.deals-app .pf .ell{min-width: 0;}
.deals-app .pf-h{position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 3px; background: #7fa21f; border: 2px solid #fff; cursor: nwse-resize;}
.deals-app .pf.company .pf-h{background: #7e7307;}
.deals-app .pf-ghost{position: fixed; z-index: 50; padding: 6px 10px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-3); pointer-events: none; transform: translate(-50%, -50%) rotate(-2deg); font-weight: 500;}
.deals-app .signing{display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; overflow: hidden;}
.deals-app .sign-main{overflow: auto; padding: 16px clamp(10px, 3vw, 24px) 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0;}
.deals-app .sign-main > *{flex: none;}
.deals-app .sign-main > .paper{max-width: 680px;}
.deals-app .sign-lead{justify-self: stretch; max-width: 680px; margin: 0 auto; width: 100%; font-weight: 400;}
.deals-app .sf{position: absolute; display: flex; align-items: center; padding: 0 4px; border-radius: 3px; font: 500 max(9px, 1.5cqw)/1 Inter, "Segoe UI", sans-serif; color: #282912; overflow: hidden; text-align: left;}
.deals-app .sf.mine{background: color-mix(in oklab, var(--brand) 9%, #fff); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--brand) 35%, #fff);}
.deals-app .sf.filled{background: none; box-shadow: none;}
.deals-app .sf.other{background: #f4f4f0; color: #96967f;}
.deals-app .sf.cur{background: color-mix(in oklab, var(--brand) 14%, #fff); box-shadow: 0 0 0 2px var(--brand), 0 0 0 6px color-mix(in oklab, var(--brand) 22%, transparent); animation: glow 1.8s ease-in-out infinite; z-index: 2;}
@keyframes glow{ 50% { box-shadow: 0 0 0 2px var(--brand), 0 0 0 9px color-mix(in oklab, var(--brand) 8%, transparent); } }
.deals-app .sf{scroll-margin: 44px;}
.deals-app .sf img{max-width: 100%; max-height: 100%;}
.deals-app .sf-ph{display: inline-flex; align-items: center; gap: 3px; color: var(--brand); white-space: nowrap; overflow: hidden;}
.deals-app .sf .typed{font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive; font-size: max(13px, 2.8cqw); font-weight: 400; white-space: nowrap;}
.deals-app .sign-dock{background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(40, 41, 18,.08); z-index: 3;}
.deals-app .sign-progress{height: 3px; background: var(--surface-3);}
.deals-app .sign-progress i{display: block; height: 100%; background: var(--brand); transition: width .25s;}
.deals-app .sd-in{display: grid; gap: 9px; max-width: 640px; margin: 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));}
.deals-app .sd-in .btn{min-height: 44px;}
.deals-app .sd-in .pub-cta{width: 100%;}
.deals-app .big-in{min-height: 44px; font-size: 16px; width: 100%;}
.deals-app .typed-in{min-height: 62px; width: 100%; font: 400 26px "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;}
.deals-app .sig-pad{position: relative; height: 118px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fcfbfa; touch-action: none; overflow: hidden;}
.deals-app .sig-pad.initials{height: 92px;}
.deals-app .sig-pad canvas{position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair;}
.deals-app .sig-base{position: absolute; left: 22px; right: 22px; bottom: 26px; height: 1px; background: var(--line-2); pointer-events: none;}
.deals-app .sig-hint{position: absolute; left: 0; right: 0; top: 40%; text-align: center; color: var(--ink-3); pointer-events: none; font-size: 12.5px;}
.deals-app .sig-clear{position: absolute; top: 4px; right: 4px; min-height: 26px !important;}
.deals-app .ok-mark{display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); flex: none;}
.deals-app .rp-filters{display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap;}
.deals-app .rp-tiles{display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px;}
.deals-app .rp-tile{display: grid; gap: 2px; padding: 13px 16px;}
.deals-app .rp-tile > b{font-size: 24px; font-weight: 500; letter-spacing: -.015em;}
.deals-app .rp-grid{display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;}
.deals-app .rp-card{padding: 14px 16px 16px; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start;}
.deals-app .rp-wide{grid-column: span 4;}
.deals-app .rp-c2{grid-column: span 2;}
.deals-app .rp-c3{grid-column: span 3;}
.deals-app .rp-head{display: flex; align-items: flex-start; gap: 10px;}
.deals-app .rp-head h3{font-size: 13.5px; font-weight: 500;}
.deals-app .rp-head p{font-weight: 400; margin-top: 1px;}
.deals-app .seg.mini button{min-height: 24px; padding: 0 7px;}
.deals-app .rp-legend{display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); font-size: 11.5px;}
.deals-app .rp-legend span{display: inline-flex; align-items: center; gap: 5px;}
.deals-app .sw{display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px;}
.deals-app .sw.won{background: var(--c-won);}
.deals-app .sw.wei{background: var(--c-wei);}
.deals-app .sw.rest{background: repeating-linear-gradient(135deg, var(--hatch) 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px var(--hatch);}
.deals-app .sw.one{background: var(--c-1);}
.deals-app .sw.tick{width: 2px; height: 12px; border-radius: 1px; background: var(--ink);}
.deals-app .sw.limit{width: 0; height: 12px; border-radius: 0; border-left: 2px dashed var(--warn);}
.deals-app .plot.columns{margin-top: 12px; display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: var(--plot-h) auto; column-gap: 8px;}
.deals-app .y-axis{display: flex; flex-direction: column; justify-content: space-between; text-align: right; color: var(--ink-3); font-size: 10.5px; font-variant-numeric: tabular-nums;}
.deals-app .y-axis span{line-height: 1; transform: translateY(-1px); white-space: nowrap;}
.deals-app .grid-area{position: relative; min-width: 0;}
.deals-app .gridlines{position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none;}
.deals-app .gridlines i{display: block; height: 1px; background: var(--line);}
.deals-app .gridlines i:last-child{background: var(--line-2);}
.deals-app .cols{position: absolute; inset: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);}
.deals-app .col-hit{position: relative; display: flex; justify-content: center; align-items: flex-end; border-radius: 8px;}
.deals-app .col-hit:hover, .deals-app .col-hit:focus-visible{background: color-mix(in oklab, var(--accent) 6%, transparent);}
.deals-app .col-stack{display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; width: 24px;}
.deals-app .col-stack i{display: block;}
.deals-app .col-stack i:first-child{border-radius: 4px 4px 0 0;}
.deals-app .seg-won{background: var(--c-won);}
.deals-app .seg-wei{background: var(--c-wei);}
.deals-app .seg-rest{background: repeating-linear-gradient(135deg, var(--hatch) 0 1.5px, transparent 1.5px 4px); box-shadow: inset 0 0 0 1px var(--hatch);}
.deals-app .col-lab{position: absolute; left: 50%; transform: translate(-50%, -4px); font-size: 11.5px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink);}
.deals-app .x-axis{grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 6px; color: var(--ink-2); font-size: 11.5px; text-align: center;}
.deals-app .x-axis span.cur{color: var(--ink); font-weight: 500;}
.deals-app .rp-note{display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; text-align: left;}
.deals-app .rp-note span:nth-child(2){flex: 1;}
.deals-app .rp-note svg{color: var(--ink-3);}
.deals-app .rp-note:hover{background: var(--surface-3);}
.deals-app .hbars{display: grid; gap: 0;}
.deals-app .hbars.tall{gap: 8px;}
.deals-app .hbar{display: grid; grid-template-columns: minmax(84px, 112px) minmax(0, 1fr) 54px; gap: 8px; align-items: center; width: 100%; min-height: 26px; padding: 2px 4px; border-radius: 7px; text-align: left;}
.deals-app .hbar:hover, .deals-app .hbar:focus-visible{background: color-mix(in oklab, var(--accent) 6%, transparent);}
.deals-app .hb-l{color: var(--ink-2); font-size: 12px;}
.deals-app .hb-v{text-align: right; font-weight: 500; font-size: 12px; white-space: nowrap;}
.deals-app .hb-t{position: relative; display: block; height: 14px;}
.deals-app .hb-t i{display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--c-1);}
.deals-app .hb-t u{position: absolute; top: -3px; bottom: -3px; width: 2px; text-decoration: none;}
.deals-app .hb-t u.p90{background: var(--ink); border-radius: 1px;}
.deals-app .hb-t u.lim{width: 0; border-left: 2px dashed var(--warn);}
.deals-app .step-rate{display: flex; align-items: center; gap: 6px; padding: 0 0 0 calc(min(112px, 30%) + 12px); color: var(--ink-3); font-size: 10.5px; min-height: 16px;}
.deals-app .step-rate > span:first-child{display: inline-flex; align-items: center; gap: 2px; font-variant-numeric: tabular-nums;}
.deals-app .step-rate.drop > span:first-child{color: var(--ink); font-weight: 500;}
.deals-app .rp-foot{display: flex; gap: 6px; align-items: center; color: var(--ink-2); font-weight: 400;}
.deals-app .rp-table{overflow-x: auto;}
.deals-app .rp-table table{width: 100%; border-collapse: collapse; font-size: 12.5px;}
.deals-app .rp-table th, .deals-app .rp-table td{padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left;}
.deals-app .rp-table th{color: var(--ink-2); font-weight: 400;}
.deals-app .rp-table .r{text-align: right;}
.deals-app .conv{display: grid; grid-template-columns: 280px minmax(0, 1fr); height: 100%; min-height: 0;}
.deals-app .conv-list{background: var(--surface); border-right: 1px solid var(--line); overflow: auto;}
.deals-app .conv-h{padding: 14px 14px 8px;}
.deals-app .conv-h h3{font-size: 15px; font-weight: 500;}
.deals-app .conv-row{display: flex; gap: 9px; align-items: center; width: 100%; padding: 9px 12px; text-align: left;}
.deals-app .conv-row:hover{background: var(--surface-2);}
.deals-app .conv-row.on{background: var(--soft);}
.deals-app .conv-row .grow{display: grid; gap: 1px; min-width: 0;}
.deals-app .deal-tick{color: var(--accent); display: inline-flex;}
.deals-app .conv-row .count{background: var(--accent); color: var(--accent-ink); border-radius: 99px; min-width: 18px; height: 18px; font-size: 10.5px; display: inline-grid; place-items: center; padding: 0 5px; margin: 0;}
.deals-app .conv-main{display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0;}
.deals-app .conv-top{display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0;}
.deals-app .conv-body{display: grid; gap: 8px; padding: 16px; overflow: auto; align-content: end;}
.deals-app .conv-input{display: flex; gap: 8px; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line);}
.deals-app .conv-input .inp{flex: 1; width: auto;}
.deals-app .deal-chip{display: inline-flex; align-items: center; gap: 6px; max-width: 250px; padding: 5px 10px; border-radius: 99px; background: var(--soft); color: var(--accent); font-size: 12px; transition: all .1s;}
.deals-app .deal-chip:hover{background: var(--soft-2);}
.deals-app .conv-hint{justify-self: center; display: flex; gap: 7px; align-items: center; max-width: 420px; padding: 7px 12px; border-radius: 99px; background: var(--surface); border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 12px; margin-top: 6px;}
.deals-app .contact-head{display: flex; align-items: center; gap: 12px; padding: 16px; margin-bottom: 14px;}
.deals-app .contact-head h1{font-size: 18px; font-weight: 500;}
.deals-app .contact-head p{font-weight: 400;}
.deals-app .deal-line{display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid transparent; width: 100%; text-align: left; transition: all .1s;}
.deals-app .deal-line:hover{border-color: var(--line-2); transform: translateY(-1px);}
.deals-app .deal-line.ghosty{background: none; box-shadow: none; border: 1px dashed var(--line-2);}
.deals-app .stack > .doc-row{padding: 11px 14px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-1);}
.deals-app .set-pipes{gap: 6px; margin-bottom: 10px;}
.deals-app .pipe-tab{display: inline-flex; gap: 6px; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-1);}
.deals-app .pipe-tab.on{background: var(--accent); color: var(--accent-ink);}
.deals-app .pipe-tab.on .faint{color: inherit; opacity: .8;}
.deals-app .pipe-tab.ghosty{background: none; box-shadow: none;}
.deals-app .st-f{display: block; min-width: 0;}
.deals-app .st-f small{display: none;}
.deals-app .stage-card{padding: 4px 0 0; overflow: hidden;}
.deals-app .stage-row{display: grid; grid-template-columns: 30px minmax(0, 1fr) 84px 108px 30px; gap: 8px; align-items: start; padding: 7px 12px; border-bottom: 1px solid var(--line);}
.deals-app .stage-row.head-row{padding-bottom: 4px; color: var(--ink-3); font-size: 11.5px;}
.deals-app .stage-move{display: grid;}
.deals-app .stage-move button{display: grid; place-items: center; height: 16px; color: var(--ink-3); border-radius: 4px;}
.deals-app .stage-move button:hover:not(:disabled){color: var(--ink); background: var(--surface-3);}
.deals-app .stage-move button:disabled{opacity: .25;}
.deals-app .stage-name{display: grid; gap: 2px;}
.deals-app .stage-name .inp, .deals-app .stage-row .inp{min-height: 32px; width: 100%;}
.deals-app .stage-add{display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--surface-2);}
.deals-app .reason-row{display: grid; grid-template-columns: minmax(0, 1fr) 36px auto 30px; gap: 10px; align-items: center;}
.deals-app .reason-row .inp{width: 100%;}
.deals-app .pay-pix{display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 18px; align-items: start;}
.deals-app .pay-pix .inp{width: 100%;}
.deals-app .pay-preview{display: grid; gap: 5px; justify-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); text-align: center; min-width: 0;}
.deals-app .honest{display: flex; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 12.5px;}
.deals-app .honest svg{color: var(--warn); margin-top: 1px;}
.deals-app .co-row{display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: center;}
.deals-app .co-row .inp{width: 100%;}
.deals-app .page > .card + .card, .deals-app .narrow-page > section + section{margin-top: 12px;}
.deals-app .mod-card{display: grid; gap: 12px; padding: 16px;}
.deals-app .mod-state{display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 11px;}
.deals-app .mod-state.ok{background: var(--ok-soft);}
.deals-app .mod-state.ok > svg{color: var(--ok);}
.deals-app .mod-state.bad{background: var(--bad-soft);}
.deals-app .mod-state.bad > svg{color: var(--bad);}
.deals-app .mem-row{display: flex; align-items: center; gap: 8px;}
.deals-app .meter{flex: 1; max-width: 180px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden;}
.deals-app .meter i{display: block; height: 100%; background: var(--flow);}
.deals-app .con-card{display: grid; gap: 12px; padding: 14px 16px;}
.deals-app .con-card.dim{opacity: .85;}
.deals-app .con-head{display: flex; align-items: center; gap: 10px;}
.deals-app .switch-btn .switch{display: block;}
.deals-app .switch:not(.on){background: var(--ink-3);}
.deals-app .switch-btn{padding: 4px; border-radius: 99px;}
.deals-app .switch-btn:disabled{cursor: progress;}
.deals-app .checks{display: grid; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); list-style: none;}
.deals-app .checks li{display: flex; gap: 10px; align-items: flex-start;}
.deals-app .checks li.wait{color: var(--ink-3);}
.deals-app .ck{flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-2); margin-top: 1px;}
.deals-app .checks .ok .ck{background: var(--ok); border-color: var(--ok); color: #fff;}
.deals-app .checks .bad .ck{background: var(--bad); border-color: var(--bad); color: #fff;}
.deals-app .ck svg{width: 12px; height: 12px;}
.deals-app .spin{width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin .8s linear infinite;}
@keyframes spin{ to { transform: rotate(360deg); } }
.deals-app .checks li.run{font-weight: 500;}
@media (max-width: 1280px){
.deals-app .rp-grid{grid-template-columns: repeat(2, minmax(0, 1fr));}
.deals-app .rp-wide, .deals-app .rp-c2{grid-column: 1 / -1;}
.deals-app .rp-c3{grid-column: auto;}
.deals-app .pl-grid{grid-template-columns: 190px minmax(0, 1fr) 220px;}
}
@media (max-width: 860px){
.deals-app .hide-s{display: none !important;}
.deals-app .show-s{display: inline-flex !important;}
.deals-app .board{display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 2px 12px; margin: 0 -2px;}
.deals-app .board > .col{flex: 0 0 calc(100vw - 44px); max-width: 360px; scroll-snap-align: center;}
.deals-app .pulse{grid-template-columns: repeat(2, minmax(0, 1fr));}
.deals-app .p-need{grid-column: 1 / -1; min-width: 0; min-height: 44px;}
.deals-app .p-cell{padding: 9px 12px;}
.deals-app .p-cell b{font-size: 17px;}
.deals-app .p-fore{grid-column: 1 / -1; order: 3;}
.deals-app .pulse > .p-cell:not(.p-need):not(.p-fore) > span{display: none;}
.deals-app .p-need{grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center;}
.deals-app .p-need > small, .deals-app .p-need > span{grid-column: 1;}
.deals-app .p-need > b{grid-column: 2; grid-row: 1 / 3;}
.deals-app .p-fore{grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline;}
.deals-app .p-fore > .fore-bar, .deals-app .p-fore > span{grid-column: 1 / -1;}
.deals-app .toolbar{gap: 6px;}
.deals-app .toolbar .inp.sel{flex: 1 1 42%; min-width: 0; min-height: 38px;}
.deals-app .banner{flex-wrap: wrap;}
.deals-app .banner > span{flex: 1 1 calc(100% - 34px); min-width: 0;}
.deals-app .banner > .btn{margin-left: auto;}
.deals-app .tb-search{flex: 1 1 140px; width: auto; min-width: 0; min-height: 38px;}
.deals-app .toolbar > .grow{display: none;}
.deals-app .rp-filters > .grow{display: none;}
.deals-app .rp-filters .inp.sel{flex: 1 1 38%; min-width: 0;}
.deals-app .q-top .btn.ghost{flex: 1 1 0; min-width: 0; justify-content: flex-start;}
.deals-app .q-top > .grow, .deals-app .q-top > .chip{display: none;}
.deals-app .stage-tabs{display: flex; gap: 4px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none;}
.deals-app .stage-tabs button{flex: none; min-height: 34px; padding: 0 12px; border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-1); font-size: 12px; white-space: nowrap;}
.deals-app .stage-tabs button{display: inline-flex; align-items: center; gap: 6px;}
.deals-app .stage-tabs button span{opacity: .72; font-variant-numeric: tabular-nums;}
.deals-app .stage-tabs button.on{background: var(--accent); color: var(--accent-ink);}
.deals-app .deal{padding: 12px; cursor: pointer;}
.deals-app .c-move{display: grid;}
.deals-app .welcome, .deals-app .welcome.tiny-w{grid-template-columns: minmax(0, 1fr); padding: 18px;}
.deals-app .welcome .ghost-board, .deals-app .welcome .paper-stack{display: none;}
.deals-app .drawer.deal-drawer, .deals-app .drawer.c-drawer{width: 100vw;}
.deals-app .dd-head{padding: 12px 14px 10px;}
.deals-app .dd-body{padding: 12px 14px;}
.deals-app .dd-foot{padding: 10px 14px; flex-wrap: wrap;}
.deals-app .dd-foot .btn{min-height: 42px; flex: 1; justify-content: center;}
.deals-app .dd-foot .grow{display: none;}
.deals-app .stepper{display: flex; overflow-x: auto; scrollbar-width: none;}
.deals-app .stepper button{flex: 1 0 auto; min-height: 34px; font-size: 11.5px; padding: 0 12px; white-space: nowrap;}
.deals-app .btn{min-height: 36px;}
.deals-app .modal{left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 90vh; transform: none; border-radius: 18px 18px 0 0; animation: rise .18s cubic-bezier(.2,.9,.3,1.05) !important;}
.deals-app .m-foot{border-radius: 0; flex-wrap: wrap;}
.deals-app .m-foot .btn{flex: 1; justify-content: center; min-height: 42px;}
.deals-app .won-done{top: auto;}
.deals-app .grid-2.gap{grid-template-columns: minmax(0, 1fr);}
.deals-app .fill-row{grid-template-columns: 70px minmax(0, 1fr);}
.deals-app .q-switch{display: flex;}
.deals-app .q-grid{grid-template-columns: minmax(0, 1fr);}
.deals-app .q-grid.tab-edit .q-preview{display: none;}
.deals-app .q-grid.tab-view .q-form{display: none;}
.deals-app .q-preview{position: static;}
.deals-app .browser-body{max-height: none; padding: 10px;}
.deals-app .q-line{grid-template-columns: 56px 92px 60px minmax(0, 1fr) 30px;}
.deals-app .q-name{grid-column: 1 / -1;}
.deals-app .q-tot{font-size: 13px;}
.deals-app .pub-main{grid-template-columns: minmax(0, 1fr); padding: 12px 10px 90px;}
.deals-app .pub-side{position: static;}
.deals-app .pdoc{padding: 16px;}
.deals-app .pub-sticky{position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(40, 41, 18,.08);}
.deals-app .pub-sticky .pub-cta{flex: 0 0 56%;}
.deals-app .pub-sticky b{font-size: 16px; font-weight: 500;}
.deals-app .pix{grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center;}
.deals-app .pix .qr-wrap{width: 200px;}
.deals-app .pix-copy{width: 100%;}
.deals-app .tpl-grid{grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;}
.deals-app .tpl-thumb{height: 130px; padding: 10px 14px 0;}
.deals-app .tpl.add{min-height: 180px;}
.deals-app .c-table thead{display: none;}
.deals-app .c-table tr{display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 11px 13px; border-bottom: 1px solid var(--line);}
.deals-app .c-table td{display: block; padding: 0; border: 0;}
.deals-app .c-table td:nth-child(2){display: none;}
.deals-app .c-table td:nth-child(3){grid-column: 2; grid-row: 1; text-align: right;}
.deals-app .c-table td:nth-child(4){grid-column: 1;}
.deals-app .c-table td:nth-child(5){grid-column: 2; font-size: 11.5px;}
.deals-app .pl-phone-note{display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--soft); font-size: 12px;}
.deals-app .pl-grid{grid-template-columns: minmax(0, 1fr); overflow: auto;}
.deals-app .pl-tools, .deals-app .pl-props{display: none;}
.deals-app .pl-canvas{padding: 12px; grid-template-columns: minmax(0, 1fr); overflow: visible;}
.deals-app .pf{pointer-events: none; font-size: 8.5px;}
.deals-app .pl-top .pl-title{font-size: 13px;}
.deals-app .rp-tiles{grid-template-columns: repeat(2, minmax(0, 1fr));}
.deals-app .rp-tile > b{font-size: 19px;}
.deals-app .rp-grid{grid-template-columns: minmax(0, 1fr);}
.deals-app .rp-wide, .deals-app .rp-c2, .deals-app .rp-c3{grid-column: auto;}
.deals-app .plot.columns{grid-template-columns: 40px minmax(0, 1fr); --plot-h: 180px !important;}
.deals-app .hbar{grid-template-columns: 92px minmax(0, 1fr) 50px; min-height: 30px;}
.deals-app .step-rate{padding-left: 104px;}
.deals-app .rp-filters .seg{flex: 1 1 100%;}
.deals-app .rp-filters .seg button{flex: 1; text-align: center;}
.deals-app .rp-filters .inp.sel{flex: 1; min-width: 0;}
.deals-app .conv{grid-template-columns: minmax(0, 1fr);}
.deals-app .conv .conv-main{display: none;}
.deals-app .conv.reading .conv-list{display: none;}
.deals-app .conv.reading .conv-main{display: grid;}
.deals-app .deal-chip{max-width: 150px;}
.deals-app .conv-hint{border-radius: 12px;}
.deals-app .stage-row{grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 30px; row-gap: 6px;}
.deals-app .stage-row.head-row{display: none;}
.deals-app .stage-row > .stage-name{grid-column: 2 / 4;}
.deals-app .stage-row > .st-f{grid-row: 2;}
.deals-app .stage-row > .st-f:first-of-type{grid-column: 2;}
.deals-app .stage-row > .st-f:last-of-type{grid-column: 3;}
.deals-app .stage-row > .btn{grid-column: 4; grid-row: 1;}
.deals-app .st-f small{display: block; margin-bottom: 2px; color: var(--ink-3); font-size: 10.5px;}
.deals-app .stage-add{flex-wrap: wrap;}
.deals-app .reason-row{grid-template-columns: minmax(0, 1fr) 30px;}
.deals-app .reason-row .muted, .deals-app .reason-row .check{grid-row: 2;}
.deals-app .reason-row .check{grid-column: 1; justify-self: end;}
.deals-app .reason-row .muted{grid-column: 1;}
.deals-app .pay-pix{grid-template-columns: minmax(0, 1fr);}
.deals-app .co-row{grid-template-columns: minmax(0, 1fr);}
.deals-app .contact-head{flex-wrap: wrap;}
.deals-app .c-tabs .seg{overflow-x: auto;}
.deals-app .dock-z{width: 44vw;}
}
/* The module inside the portal's content area: tabs on top, one scrolling page, layers above it. */
.deals-app { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; color: var(--ink); }
.deals-app .deals-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.deals-app .deals-scroll { flex: 1; min-height: 0; overflow: auto; }
.deals-app .deals-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--line); flex: none; }
.deals-app .deals-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.deals-app .deals-tab:hover { background: var(--s2); }
.deals-app .deals-tab.on { background: var(--s2); color: var(--ink); }
.deals-app .deals-tab .i { width: 16px; height: 16px; }
.deals-app .grow { flex: 1; }
.deals-app .block { display: block; }
.deals-app .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.deals-app .mnav.deals-mnav { display: none; }
.deals-app .pl-paper { position: relative; line-height: 0; }
.deals-app .pl-paper img { width: 100%; display: block; user-select: none; }
.deals-app #plFields { position: absolute; inset: 0; line-height: normal; }
.deals-app .phone-preview { padding: 12px; border-radius: 12px; background: var(--s2); }
.deals-app .field-err { color: var(--bad); font-size: 13px; }
.deals-app .hash { word-break: break-all; font-size: 11px; }
.deals-app .pick-new-form { display: grid; gap: 8px; padding-top: 8px; }
#dealsTip { position: fixed; z-index: 1100; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: var(--ink, #222); color: var(--bg, #fff); font-size: 12px; line-height: 1.4; pointer-events: none; height: auto; display: block; }
#dealsTip[hidden] { display: none; }
.pf-ghost { position: fixed; z-index: 1100; padding: 6px 10px; border-radius: 6px; background: var(--brand); color: var(--brand-ink); font-size: 12px; pointer-events: none; transform: translate(-50%, -50%); height: auto; display: block; }
@media (max-width: 720px) {
  .deals-app .deals-tabs { display: none; }
  .deals-app .mnav.deals-mnav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; flex: none; order: 2; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .deals-app .hide-s { display: none; }
}

/* Reports: bars take their share of the plot; filters stay compact beside each other. */
.deals-app .plot.columns .col-hit { align-items: stretch; }
.deals-app .plot.columns .col-stack { height: 100%; }
@media (min-width: 761px) { .deals-app .rp-filters .inp.sel { width: auto; flex: 0 1 200px; } }
.deals-app #plPaper { container-type: inline-size; }
/* Admin → Events (public/app/events.js), built from the shared kit (kit.css). */
.events-strip { display: flex; align-items: center; gap: 16px; padding: 12px 16px; flex-wrap: wrap; }
.events-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.events-stat { display: grid; gap: 1px; min-width: 0; }
.events-stat strong { font-size: 1.05em; font-weight: 600; color: var(--ink); }
.events-stat small { color: var(--ink-3); font-size: .8em; }

.events-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.events-tile { display: grid; gap: 4px; padding: 14px 14px 10px; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.events-tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.events-tile:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--ring); }
.events-tile.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.events-tile strong { font-size: 1.6em; font-weight: 600; line-height: 1.1; }
.events-tile small { font-size: .82em; }
.events-bars { display: flex; align-items: flex-end; gap: 2px; height: 28px; margin-top: 4px; }
.events-bars i { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--accent); opacity: .75; }
.events-bars i.events-h0 { opacity: .18; }
/* Bar heights as classes: the panel's CSP allows no inline styles. */
.events-h0 { height: 8%; } .events-h1 { height: 10%; } .events-h2 { height: 20%; } .events-h3 { height: 30%; } .events-h4 { height: 40%; } .events-h5 { height: 50%; } .events-h6 { height: 60%; } .events-h7 { height: 70%; } .events-h8 { height: 80%; } .events-h9 { height: 90%; } .events-h10 { height: 100%; }

.events-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; padding: 12px 16px; }
.events-filter-acts { display: flex; gap: 6px; }

.events-list-card { padding: 0; overflow: hidden; }
.events-list { list-style: none; margin: 0; padding: 0; }
.events-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding-right: 10px; }
.events-row:last-child { border-bottom: 0; }
.events-row.is-fresh { animation: events-fresh 2.4s ease both; }
@keyframes events-fresh { from { background: color-mix(in srgb, var(--accent) 16%, transparent); } to { background: transparent; } }
.events-open { flex: 1; min-width: 0; display: grid; grid-template-columns: 150px minmax(0, 1.4fr) minmax(0, 1fr) 110px; gap: 12px; align-items: center; padding: 10px 6px 10px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.events-open:hover { background: var(--surface-2); }
.events-open:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.events-open time { font-size: .86em; white-space: nowrap; }
.events-type { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.events-type code, .events-detail-head code { font: 500 .88em/1.3 "Cascadia Mono", ui-monospace, Consolas, monospace; color: var(--ink); }
.events-source { font-size: .88em; }
.events-amount { font-weight: 600; white-space: nowrap; text-align: right; }
.events-row-who { flex: none; width: 150px; display: flex; justify-content: flex-start; }
.events-who .kit-i, .events-row-who .kit-i { width: 13px; height: 13px; }
.events-more { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--line); }
.events-end { text-align: center; padding: 12px; margin: 0; border-top: 1px solid var(--line); }

.events-pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: events-pulse 1.6s ease-in-out infinite; }
@keyframes events-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .events-pulse, .events-row.is-fresh, .events-tile { animation: none; transition: none; } }

.events-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.events-detail-head code { font-size: 1.05em; }
.events-detail { display: grid; gap: 10px; margin: 0; }
.events-detail > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.events-detail dt { color: var(--ink-3); font-size: .9em; }
.events-detail dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.events-detail code { font: .9em/1.4 "Cascadia Mono", ui-monospace, Consolas, monospace; }
.events-detail-sub { margin: 18px 0 8px; color: var(--ink-3); font-size: .85em; font-weight: 500; }
.events-json { margin: 0; padding: 12px; max-height: 280px; overflow: auto; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font: .85em/1.5 "Cascadia Mono", ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.events-json:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--ring); }

@media (max-width: 860px) {
  .events-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .events-filter-acts { grid-column: 1 / -1; }
  .events-open { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .events-open time { grid-column: 1 / -1; order: -1; }
  .events-source { grid-column: 1; }
}
@media (max-width: 520px) {
  .events-stats { margin-left: 0; gap: 14px; }
  .events-filters { grid-template-columns: minmax(0, 1fr); }
  .events-row { flex-direction: column; align-items: stretch; gap: 0; padding-right: 0; }
  .events-row-who { width: auto; padding: 0 10px 8px 16px; }
  .events-detail > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
/* The panel's help (public/app/help.js): the "?" in the top bar, its side sheet and the
   assistant, plus the "Central de ajuda" card in Admin › Geral. Brand colours come from the
   tenant (--brand-blue*), so every tenant's sheet wears its own look. */
.help-trigger { display: inline-grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid #e5eae7; border-radius: 9px; color: #84836b; background: #fcfcfa; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.help-trigger svg { width: 17px; height: 17px; }
.help-trigger:hover { border-color: #dbdcab; color: var(--brand-blue); background: #fff; }
.help-trigger:focus-visible, .help-close:focus-visible, .help-card:focus-visible, .help-ask-send:focus-visible, .help-foot a:focus-visible { outline: 3px solid rgba(114, 117, 0, .28); outline-offset: 2px; }

.help-drawer { width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; border-left: 1px solid #dce5e1; color: var(--text); background: #fcfcfb; box-shadow: -24px 0 70px rgba(32, 33, 4, .2); }
.help-drawer[open] { display: flex; flex-direction: column; animation: help-drawer-in .22s cubic-bezier(.2, .8, .2, 1); }
.help-drawer::backdrop { background: rgba(26, 25, 5, .32); backdrop-filter: blur(2px); animation: help-fade-in .2s ease; }
@keyframes help-drawer-in { from { opacity: .4; transform: translateX(28px); } }
@keyframes help-fade-in { from { opacity: 0; } }

.help-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 16px 18px 20px; border-bottom: 1px solid #e6ecea; background: linear-gradient(135deg, var(--brand-blue-soft), #fff 70%); }
.help-head-mark { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--brand-blue-ink); background: var(--brand-blue); box-shadow: 0 8px 20px rgba(32, 33, 4, .16); }
.help-head-mark svg { width: 21px; height: 21px; }
.help-head-text { flex: 1; min-width: 0; }
.help-head h2 { margin: 0; font-size: calc((17px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: -.01em; }
.help-head p { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); text-overflow: ellipsis; white-space: nowrap; }
.help-close { display: inline-grid; width: 32px; height: 32px; flex: 0 0 auto; align-self: flex-start; place-items: center; padding: 0; border: 0; border-radius: 9px; color: #84836b; background: transparent; cursor: pointer; }
.help-close svg { width: 15px; height: 15px; }
.help-close:hover { color: var(--text); background: rgba(32, 33, 4, .06); }

.help-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 22px; overscroll-behavior: contain; }
.help-search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border: 1px solid #dfe7e3; border-radius: 11px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.help-search:focus-within { border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); }
.help-search svg { width: 16px; height: 16px; color: #9a9884; }
.help-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }

.help-guides { min-height: 60px; }
.help-group { margin-top: 18px; }
.help-group h3 { margin: 0 0 8px 2px; color: #8d8c74; font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.help-cards { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.help-card { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; border: 1px solid #e3eae7; border-radius: 12px; color: inherit; background: #fff; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.help-card:hover { border-color: #e1e1be; box-shadow: 0 6px 18px rgba(32, 33, 4, .07); transform: translateY(-1px); }
.help-card-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--brand-blue); background: var(--brand-blue-soft); }
.help-card-icon svg { width: 15px; height: 15px; }
.help-card-text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.help-card strong { font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 680; }
.help-card small { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.help-card-go { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 3px; color: #b7b5a3; transition: color .15s ease; }
.help-card:hover .help-card-go { color: var(--brand-blue); }
.help-empty { margin: 16px 2px 0; color: var(--muted); font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.5; }
.help-empty.is-bad { color: var(--red); }

.help-skeleton { display: grid; gap: 7px; margin-top: 18px; }
.help-skeleton span { height: 56px; border-radius: 12px; background: linear-gradient(90deg, #f2f0ee 25%, #f9f8f7 50%, #f2f0ee 75%) 0 0 / 200% 100%; animation: help-shimmer 1.1s linear infinite; }
@keyframes help-shimmer { to { background-position: -200% 0; } }

.help-ask { margin-top: 24px; padding: 14px; border: 1px solid #e0e9e5; border-radius: 14px; background: #fff; box-shadow: 0 4px 16px rgba(32, 33, 4, .04); }
.help-ask[hidden] { display: none; }
.help-ask-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.help-ask-mark { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--brand-blue-ink); background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-hover)); }
.help-ask-mark svg { width: 15px; height: 15px; }
.help-ask h3 { margin: 0; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 720; }
.help-ask-head p { margin: 1px 0 0; color: var(--muted); font-size: calc((10px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.help-ask-row { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 10px; border: 1px solid #dfe7e3; border-radius: 11px; background: #fcfcfb; transition: border-color .15s ease, box-shadow .15s ease; }
.help-ask-row:focus-within { border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-soft); background: #fff; }
.help-ask textarea { flex: 1; min-width: 0; min-height: 38px; max-height: 140px; padding: 6px 0; border: 0; outline: 0; resize: none; field-sizing: content; color: var(--text); background: transparent; font: inherit; font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.45; }
.help-ask-send { display: inline-flex; height: 34px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 9px; color: #fff; background: var(--brand-blue-button, var(--brand-blue)); font: inherit; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); font-weight: 700; cursor: pointer; transition: background .15s ease; }
.help-ask-send:hover { background: var(--brand-blue-button-hover, var(--brand-blue-hover)); }
.help-ask-send:disabled { opacity: .6; cursor: progress; }
.help-ask-send svg { width: 14px; height: 14px; }
.help-answer:empty { display: none; }
.help-answer { margin-top: 12px; }
.help-answer-text { padding: 12px 14px; border-radius: 12px; background: var(--brand-blue-soft); font-size: calc((12px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); line-height: 1.55; animation: help-fade-in .25s ease; }
.help-answer-text p { margin: 0 0 8px; }
.help-answer-text :is(ol, ul) { margin: 0 0 8px; padding-left: 20px; }
.help-answer-text li + li { margin-top: 4px; }
.help-answer-text .help-answer-note { margin: 10px 0 0; color: var(--muted); font-size: .86em; }
.help-answer .help-group { margin-top: 14px; }
.help-thinking { display: flex; align-items: center; gap: 5px; margin: 4px 2px 0; color: var(--muted); font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.help-thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-blue); animation: help-dot 1s ease-in-out infinite; }
.help-thinking span:nth-child(2) { animation-delay: .15s; }
.help-thinking span:nth-child(3) { margin-right: 6px; animation-delay: .3s; }
@keyframes help-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.help-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 18px; border-top: 1px solid #e6ecea; background: #fff; font-size: calc((11px * var(--portal-font-calibration-slope) + var(--portal-font-calibration-offset)) * var(--portal-text-scale)); }
.help-foot a { display: inline-flex; align-items: center; gap: 7px; border-radius: 6px; color: var(--brand-blue); font-weight: 680; text-decoration: none; }
.help-foot a:hover { text-decoration: underline; }
.help-foot a svg { width: 15px; height: 15px; }
.help-foot-keys { color: var(--muted); }


@media (max-width: 520px) {
  .help-drawer { width: 100vw; border-left: 0; }
  .help-foot-keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .help-drawer[open], .help-drawer::backdrop, .help-answer-text, .help-thinking span, .help-skeleton span { animation: none; }
  .help-card, .help-card:hover { transition: none; transform: none; }
}
/* The shared kit (decision 0017; docs/PRODUCT-GUIDE.md, "The experience bar"): the parts of
   docs/screens/4.0-sales-loop.html, for every screen of 4.1 to 7B.2. Colour comes from the tenant
   (--brand-blue) plus one blue-to-cyan accent; status colours are for status only. A screen wraps
   itself in .kit and uses these classes; public/app/kit.js builds the parts that need markup. */
.kit {
  --brand: var(--brand-blue, #67620a); --brand-ink: var(--brand-blue-ink, #fff);
  --surface: #fff; --surface-2: #faf9f8; --surface-3: #f3f3ee;
  --line: #ebebe3; --line-2: #e0e0d4; --ink: #282912; --ink-2: #6f6e55; --ink-3: #87866f;
  --accent: var(--brand); --accent-ink: var(--brand-ink);
  --soft: color-mix(in oklab, var(--brand) 9%, #fff); --soft-2: color-mix(in oklab, var(--brand) 16%, #fff);
  --ring: color-mix(in oklab, var(--brand) 32%, transparent);
  --flow: linear-gradient(90deg, #7fa21f, #8b7e07);
  --ok: #1b7f59; --ok-soft: #e6f4ee; --warn: #94600a; --warn-soft: #fbf3e4; --warn-line: #efdcb9; --bad: #c03030; --bad-soft: #fcefef; --bad-line: #f2d2d2;
  --shadow-1: 0 1px 2px rgba(40, 41, 18,.05), 0 2px 8px rgba(40, 41, 18,.04);
  --shadow-2: 0 2px 6px rgba(40, 41, 18,.06), 0 12px 32px rgba(40, 41, 18,.1);
  --shadow-3: 0 8px 18px rgba(40, 41, 18,.1), 0 28px 64px rgba(40, 41, 18,.18);
  --radius: 14px;
  color: var(--ink); font-size: calc(13px * var(--portal-font-zoom, 1)); line-height: 1.45; font-weight: 400;
}
:root[data-theme="dark"] .kit {
  --surface: #222414; --surface-2: #2a2b19; --surface-3: #32341f;
  --line: #373823; --line-2: #45462e; --ink: #f1f1e9; --ink-2: #bdbca9; --ink-3: #a3a38b;
  --accent: color-mix(in oklab, var(--brand) 48%, #fbff9c); --accent-ink: #181906;
  --soft: color-mix(in oklab, var(--accent) 13%, #222414); --soft-2: color-mix(in oklab, var(--accent) 22%, #222414);
  --ring: color-mix(in oklab, var(--accent) 38%, transparent);
  --flow: linear-gradient(90deg, #bcec22, #c4b218);
  --ok: #43c495; --ok-soft: #2a1e12; --warn: #e3a845; --warn-soft: #2b2415; --warn-line: #4c3d1e; --bad: #ef6b6b; --bad-soft: #2f1a1c; --bad-line: #57292c;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3); --shadow-2: 0 2px 6px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.34); --shadow-3: 0 8px 18px rgba(0,0,0,.35), 0 28px 64px rgba(0,0,0,.45);
}
.kit, .kit * { box-sizing: border-box; }
.kit h2, .kit h3, .kit p { margin: 0; font-weight: 500; }
.kit p { font-weight: 400; }
.kit code { font: 400 .92em/1.5 "Cascadia Mono", ui-monospace, Consolas, monospace; }
.kit :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.kit-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kit-num { font-variant-numeric: tabular-nums; }
.kit-muted { color: var(--ink-2); } .kit-faint { color: var(--ink-3); } .kit-small { font-size: .885em; }
.kit-grow { flex: 1; min-width: 0; }
.kit-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-row { display: flex; align-items: center; gap: 8px; min-width: 0; } .kit-row.is-wrap { flex-wrap: wrap; }
.kit-stack { display: grid; gap: 12px; min-width: 0; align-content: start; }

.kit-page { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; animation: kit-rise .22s ease both; }
@keyframes kit-rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.kit-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.kit-head h2 { font-size: 1.6em; line-height: 1.2; letter-spacing: -.012em; }
.kit-head p { color: var(--ink-2); margin-top: 3px; max-width: 86ch; }
.kit-head .kit-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.kit-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: .96em; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, filter .15s; }
.kit-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.kit-btn.is-primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 6px 14px color-mix(in oklab, var(--accent) 24%, transparent); }
.kit-btn.is-primary:hover { filter: brightness(1.08); }
.kit-btn.is-soft { border-color: transparent; background: var(--soft); color: var(--accent); }
.kit-btn.is-ghost { border-color: transparent; background: none; color: var(--ink-2); } .kit-btn.is-ghost:hover { background: var(--surface-3); color: var(--ink); }
.kit-btn.is-danger { color: var(--bad); border-color: var(--bad-line); } .kit-btn.is-danger:hover { background: var(--bad-soft); }
.kit-btn.is-sm { min-height: 30px; padding: 0 9px; border-radius: 8px; font-size: .885em; }
.kit-btn:disabled, .kit-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.kit-input { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; transition: border .15s, box-shadow .15s; }
.kit-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.kit-field { display: grid; gap: 6px; } .kit-field > span { color: var(--ink-2); font-size: .885em; }

.kit-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 8px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: .85em; white-space: nowrap; }
.kit-chip.is-ok { background: var(--ok-soft); color: var(--ok); } .kit-chip.is-warn { background: var(--warn-soft); color: var(--warn); }
.kit-chip.is-bad { background: var(--bad-soft); color: var(--bad); } .kit-chip.is-accent { background: var(--soft); color: var(--accent); }
.kit-chip .kit-i { width: 12px; height: 12px; }

.kit-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); min-width: 0; }
.kit-card-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px 0; min-height: 44px; flex-wrap: wrap; }
.kit-card-head h3 { font-size: 1.04em; }
.kit-card-body { padding: 12px 16px 16px; }

.kit-banner { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.kit-banner.is-bad { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }
.kit-banner.is-info { border-color: var(--line); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-1); }
.kit-banner .kit-btn { margin-left: auto; }

.kit-empty { display: grid; justify-items: center; gap: 8px; padding: 42px 20px; text-align: center; color: var(--ink-2); }
.kit-glyph { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--soft); color: var(--accent); }
.kit-glyph .kit-i { width: 24px; height: 24px; } .kit-empty h3 { color: var(--ink); font-size: 1.15em; } .kit-empty p { max-width: 46ch; }
.kit-skel { border-radius: 14px; background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface-2) 50%, var(--surface-3) 70%); background-size: 240% 100%; animation: kit-shimmer 1.3s linear infinite; }
@keyframes kit-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.kit-gauge { position: relative; width: 62px; height: 62px; }
.kit-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.kit-gauge circle { fill: none; stroke-width: 7; } .kit-gauge .kit-gauge-track { stroke: var(--surface-3); } .kit-gauge .kit-gauge-value { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.kit-gauge.is-warn .kit-gauge-value { stroke: var(--warn); } .kit-gauge.is-bad .kit-gauge-value { stroke: var(--bad); } .kit-gauge.is-none .kit-gauge-value { stroke: var(--line-2); }
.kit-gauge b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1em; font-weight: 600; font-variant-numeric: tabular-nums; }

.kit-dialog { width: min(560px, calc(100vw - 24px)); max-height: 82vh; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); overflow: hidden; }
.kit-dialog[open] { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; animation: kit-pop .18s ease; }
.kit-dialog::backdrop { background: rgba(20, 20, 7,.42); animation: kit-fade .16s ease; }
@keyframes kit-fade { from { opacity: 0; } } @keyframes kit-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.kit-dialog-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; } .kit-dialog-head h3 { font-size: 1.15em; }
.kit-dialog-body { padding: 8px 16px 14px; overflow: auto; display: grid; gap: 14px; align-content: start; min-height: 150px; }
.kit-dialog-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.kit-steps { display: flex; gap: 4px; padding: 0 16px 6px; } .kit-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); } .kit-steps i.is-on { background: var(--flow); }

.kit-code { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.kit-code strong { font: 500 1.9em/1 "Cascadia Mono", ui-monospace, Consolas, monospace; letter-spacing: .08em; user-select: all; }
.kit-checks { display: grid; gap: 7px; }
.kit-check { display: flex; align-items: center; gap: 9px; min-height: 26px; color: var(--ink-3); } .kit-check.is-done { color: var(--ink); } .kit-check.is-done .kit-i { color: var(--ok); }
.kit-check.is-failed { color: var(--bad); } .kit-check small { margin-left: auto; color: var(--ink-3); font-size: .885em; text-align: right; }
.kit-spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: kit-rot .7s linear infinite; } @keyframes kit-rot { to { transform: rotate(360deg); } }

.kit-toasts { position: fixed; z-index: 2147483000; right: 18px; bottom: 18px; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.kit-toast { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-2); animation: kit-toast .18s ease; }
.kit-toast button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@keyframes kit-toast { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 860px) { .kit-head .kit-acts { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .kit, .kit *, .kit-dialog, .kit-dialog::backdrop, .kit-toast { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
/* Classic look (6.2, Enzo 2026-11-07: "i even like the left menu and the topbar ... add it to
   dashboard users settings as a classic version"): the 6.1 screens' night sidebar tinted with the
   tenant's colour, compact menu rows and a slim top bar with the page path, the search and the
   avatar. A personal preference (Preferências → Visual do painel); the current look stays the
   default. Only the shell changes: every screen inside it keeps its own styles. */
:root[data-layout="classic"] {
  --classic-side: color-mix(in oklab, var(--brand-blue) 22%, #151507);
  --classic-side-2: rgba(255,255,255,.07);
  --classic-side-line: rgba(255,255,255,.1);
  --classic-ink: #282912; --classic-ink-2: #6f6e55; --classic-ink-3: #96967f;
  --classic-line: #ebebe3; --classic-soft: color-mix(in oklab, var(--brand-blue) 9%, #fff);
}
:root[data-layout="classic"] .sidebar { width: 216px; padding: 16px 12px 12px; background: var(--classic-side); color: #ebe9df; }
:root[data-layout="classic"] .main-shell { margin-left: 216px; }
:root[data-layout="classic"] .brand { min-height: 40px; gap: 9px; margin: 2px 6px 10px; }
:root[data-layout="classic"] .brand img { width: 96px; height: 40px; }
:root[data-layout="classic"] .brand-tag { color: #b7b59f; border-left-color: var(--classic-side-line); }
:root[data-layout="classic"] .sidebar-menu { margin: 0 -12px 8px; padding: 0 4px 0 12px; }
:root[data-layout="classic"] .nav-label { min-height: 22px; margin-top: 10px; padding: 0 8px; color: #98967f; font-size: calc(10px * var(--portal-font-zoom)); font-weight: 500; letter-spacing: .15em; }
:root[data-layout="classic"] .nav-label-spaced { margin-top: 14px; }
:root[data-layout="classic"] .main-nav { gap: 1px; margin-top: 4px; }
:root[data-layout="classic"] .nav-item { min-height: 34px; gap: 10px; padding: 0 10px; border-radius: 10px; color: #d7d5c6; transition: background .15s, color .15s; }
:root[data-layout="classic"] .nav-item > svg { width: 16px; height: 16px; color: currentColor; opacity: .85; }
:root[data-layout="classic"] .nav-item span:nth-of-type(1) { font-size: calc(12.5px * var(--portal-font-zoom)); font-weight: 450; }
:root[data-layout="classic"] .nav-item:hover { color: #fff; background: var(--classic-side-2); }
:root[data-layout="classic"] .nav-item:hover > svg { color: #fff; opacity: 1; }
:root[data-layout="classic"] .nav-item.is-active { color: #fff; background: var(--classic-side-2); border-color: var(--classic-side-line); box-shadow: none; }
:root[data-layout="classic"] .nav-item.is-active > svg { color: #fff; opacity: 1; }
:root[data-layout="classic"] .nav-key { display: none; }
:root[data-layout="classic"] .sidebar-status { padding: 10px; border-color: var(--classic-side-line); background: transparent; }
:root[data-layout="classic"] .sidebar-foot { color: #98967f; }

:root[data-layout="classic"] .topbar { height: 54px; gap: 12px; padding: 0 20px; border-bottom-color: var(--classic-line); background: #fff; backdrop-filter: none; }
:root[data-layout="classic"] .topbar-context { gap: 6px; color: var(--classic-ink-2); font-size: calc(12.5px * var(--portal-font-zoom)); font-weight: 400; }
:root[data-layout="classic"] .topbar-context .context-mark { display: none; }
:root[data-layout="classic"] .topbar-context .context-divider { color: var(--classic-ink-3); }
:root[data-layout="classic"] #currentSectionLabel { color: var(--classic-ink); font-weight: 500; }
:root[data-layout="classic"] .topbar-date, :root[data-layout="classic"] .topbar-separator { display: none; }
:root[data-layout="classic"] .topbar-actions { gap: 10px; margin-left: auto; }
:root[data-layout="classic"] .search-trigger { width: 240px; height: 34px; padding: 0 10px; border-color: var(--classic-line); border-radius: 10px; background: #faf9f8; color: var(--classic-ink-3); transition: border-color .15s; }
:root[data-layout="classic"] .search-trigger:hover { border-color: #e0e0d4; background: #faf9f8; }
:root[data-layout="classic"] .search-trigger span { font-size: calc(12px * var(--portal-font-zoom)); }
:root[data-layout="classic"] .team-chip { padding: 2px; border-radius: 11px; }
:root[data-layout="classic"] .team-name, :root[data-layout="classic"] .team-caret { display: none; }
:root[data-layout="classic"] .team-avatar { width: 30px; height: 30px; border: 0; border-radius: 10px; background: var(--classic-soft); color: var(--brand-blue); font-size: calc(11px * var(--portal-font-zoom)); font-weight: 600; }

@media (max-width: 840px), (max-height: 500px) and (max-width: 1000px) {
  :root[data-layout="classic"] .sidebar { width: 248px; }
  :root[data-layout="classic"] .main-shell { margin-left: 0; }
  :root[data-layout="classic"] .search-trigger { width: 36px; padding: 0; justify-content: center; }
}
@media (max-width: 620px) {
  :root[data-layout="classic"] .topbar { height: 54px; padding-inline: 14px; }
}

/* Preferências → Visual do painel: two cards, each a small picture of its look. */
.settings-layout-field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.settings-layout-field legend { margin-bottom: 8px; padding: 0; color: var(--adm-ink-2, #6b6550); font-size: calc(12px * var(--portal-font-zoom)); font-weight: 600; }
.settings-layout-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.settings-layout-choice { position: relative; display: grid; align-content: start; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--adm-line, #dfe8e3); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.settings-layout-choice:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(40, 41, 18,.08); }
.settings-layout-choice:has(input:checked) { border-color: var(--adm-brand, var(--brand-blue)); box-shadow: inset 0 0 0 1px var(--adm-brand, var(--brand-blue)); }
.settings-layout-choice:has(input:focus-visible) { outline: 3px solid rgba(114, 117, 0, .24); outline-offset: 2px; }
.settings-layout-choice input { position: absolute; top: 12px; right: 12px; margin: 0; accent-color: var(--adm-brand, var(--brand-blue)); }
.settings-layout-picture { display: grid; grid-template: 12px 1fr / 26% 1fr; height: 64px; overflow: hidden; border: 1px solid #ebebe3; border-radius: 8px; background: #f6f5f4; }
.settings-layout-picture i { display: block; }
.settings-layout-picture .is-side { grid-row: 1 / 3; background: var(--night); }
.settings-layout-picture .is-top { background: #fff; border-bottom: 1px solid #ebebe3; }
.settings-layout-picture .is-body { margin: 6px; border-radius: 4px; background: linear-gradient(#fff 0 0) 0 0 / 46% 40% no-repeat, linear-gradient(#fff 0 0) 100% 0 / 46% 40% no-repeat, linear-gradient(#fff 0 0) 0 100% / 100% 44% no-repeat; }
.settings-layout-choice.is-standard .is-top { background: linear-gradient(90deg, transparent 38%, #dcdbcf 38% 62%, transparent 62%) center / 100% 3px no-repeat, #fff; }
.settings-layout-choice.is-classic .settings-layout-picture { grid-template-rows: 10px 1fr; grid-template-columns: 24%; }
.settings-layout-choice.is-classic .is-side { background: color-mix(in oklab, var(--brand-blue) 22%, #151507); }
.settings-layout-choice.is-classic .is-top { background: linear-gradient(90deg, transparent 52%, #f3f3ee 52% 86%, transparent 86%) center / 100% 5px no-repeat, #fff; }
.settings-layout-text { display: grid; gap: 1px; padding: 0 2px 2px; }
.settings-layout-text strong { color: var(--adm-ink, #282912); font-size: calc(12.5px * var(--portal-font-zoom)); font-weight: 600; }
.settings-layout-text small { color: var(--adm-muted, #87866f); font-size: calc(11px * var(--portal-font-zoom)); line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .settings-layout-choice { transition: none; } .settings-layout-choice:hover { transform: none; } }
.app-shell[data-reduce-motion="true"] .settings-layout-choice:hover { transform: none; }
/* NoLeadLeft in the other pages (loop-pages.js, 6.3 pass 2): Segmentos presets, the Conversas
   section, the weekly summary's card in Configurações. */
.loop-presets { display: grid; gap: 8px; margin: 0 0 4px; }
.loop-presets-title { margin: 0; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.loop-presets-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.loop-preset { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.loop-preset:hover { border-color: var(--accent); }
.loop-preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.loop-preset[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); box-shadow: inset 0 0 0 1px var(--accent); }
.loop-preset strong { display: block; font-size: .86rem; }
.loop-preset small { display: block; margin-top: 2px; font-size: .76rem; color: var(--ink-2); line-height: 1.35; }
.loop-preset-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 99px; background: var(--soft); color: var(--accent); }
.loop-preset-icon .kit-i { width: 14px; height: 14px; }
.loop-presets-note { margin: 0; font-size: .8rem; color: var(--ink-2); }
.loop-conversation .contact-site-chips { margin: 6px 0 8px; }
.loop-conversation-skel { height: 44px; border-radius: var(--radius); margin-top: 6px; }
.loop-conversation-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .84rem; }
.loop-conversation-lines li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.loop-conversation-lines .kit-i { flex: none; width: 14px; height: 14px; color: var(--accent); }
.loop-settings-latest { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; font-size: .84rem; color: var(--ink-2); }
.loop-settings-latest .kit-i { width: 14px; height: 14px; color: var(--accent); }
.loop-settings-latest a { margin-left: auto; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .loop-preset { transition: none; } }
/* Contatos -> Duplicados and the journey's Identity tab (public/app/people.js; 5.1 pass 3).
   The review sits on the shared kit dialog (public/app/kit.css), only wider. */
.people-dup-button { position: relative; }
.people-badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 99px; background: var(--brand-blue, #67620a); color: var(--brand-blue-ink, #fff); font-size: .82em; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.people-badge[hidden] { display: none; }

.kit-dialog.people-dialog { width: min(820px, calc(100vw - 24px)); max-height: 88vh; }
.people-dialog .kit-dialog-foot .kit-i { width: 13px; height: 13px; vertical-align: -2px; }
.people-loading { display: grid; gap: 12px; }

.people-strip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, var(--soft), var(--surface-2)); border: 1px solid var(--line); }
.people-strip-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.people-strip-copy strong { font-size: 1.08em; font-weight: 600; }

.people-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); justify-self: start; max-width: 100%; }
.people-switch-option { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.people-switch-option:hover { color: var(--ink); }
.people-switch-option[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.people-switch-count { min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--ink-3); font-size: .85em; font-variant-numeric: tabular-nums; }
.people-switch-option[aria-pressed="true"] .people-switch-count { background: var(--soft); color: var(--accent); }

.people-pairs { display: grid; gap: 12px; }
.people-pair { display: grid; gap: 12px; padding: 14px; animation: kit-rise .2s ease both; }
.people-pair-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.people-pair-when { margin-left: auto; }
.people-conflict { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--bad-line); background: var(--bad-soft); color: var(--bad); font-size: .93em; }
.people-conflict .kit-i { margin-top: 2px; }

.people-sides { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: stretch; gap: 8px; }
.people-arrow { display: grid; place-items: center; color: var(--ink-3); }
.people-side { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, opacity .15s; }
.people-side:hover { border-color: var(--line-2); }
.people-side:not(.is-keep) { opacity: .82; }
.people-side.is-keep { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--ring); opacity: 1; }
.people-side-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.people-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--soft-2); color: var(--accent); font-weight: 600; font-size: .92em; }
.people-side-name { display: grid; min-width: 0; flex: 1; }
.people-side-role { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); color: var(--ink-3); font-size: .8em; font-weight: 500; }
.people-side-role.is-keep { background: var(--accent); color: var(--accent-ink); }
.people-side-role .kit-i { width: 12px; height: 12px; }
.people-side-lines { display: grid; gap: 2px; color: var(--ink-2); font-size: .93em; min-width: 0; }
.people-side-flags { display: flex; flex-wrap: wrap; gap: 4px; }

.people-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.people-confirm { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); animation: kit-rise .16s ease both; }
.people-more { text-align: center; }

.people-merges { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.people-merge { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.people-merge:last-child { border-bottom: 0; }
.people-merge.is-undone { opacity: .72; }
.people-merge-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--soft); color: var(--accent); }
.people-merge-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.people-merge-copy strong { font-weight: 500; overflow-wrap: anywhere; }
.people-undo, .people-undo-confirm { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.people-undo-note { color: var(--warn); }

.people-identity { display: grid; gap: 10px; }
.people-identity-note { margin: -4px 0 2px; }
.people-hint { font-family: "Cascadia Mono", ui-monospace, Consolas, monospace; font-weight: 400; letter-spacing: .02em; }
.people-identity code { font-size: .92em; }
.cj-row-icon.is-identity { background: #ede9fb; color: #5b45c4; }
.cj-row-icon.is-site { background: #f9fbe4; color: #686e13; }
:root[data-theme="dark"] .cj-row-icon.is-identity { background: #2a2444; color: #b9a8ff; }
:root[data-theme="dark"] .cj-row-icon.is-site { background: #313411; color: #e8f07a; }

@media (max-width: 640px) {
  .people-strip { flex-wrap: wrap; }
  .people-strip .kit-btn { width: 100%; }
  .people-sides { grid-template-columns: minmax(0,1fr); }
  .people-arrow { transform: rotate(90deg); padding: 0; }
  .people-pair-when { margin-left: 0; width: 100%; }
  .people-acts .kit-btn, .people-confirm .kit-btn { flex: 1; }
  .people-merge { flex-wrap: wrap; }
  .people-undo, .people-undo-confirm { width: 100%; justify-content: flex-start; padding-left: 44px; }
  .people-switch { width: 100%; } .people-switch-option { flex: 1; justify-content: center; }
}
.people-privacy { display: grid; gap: 8px; margin-top: 6px; }
.people-privacy-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.people-privacy-facts li { padding: 4px 10px; border: 1px solid #edf0e2; border-radius: 999px; background: #fff; font-size: .92em; }
.people-privacy-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.people-privacy-confirm { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--bad-line); border-radius: 10px; }
.people-privacy-confirm input { max-width: 360px; }

/* Vendas: the order drawer (public/app/sales-order.js). A sheet from the right on a desk, from the
   bottom on a phone; two columns when there is room, one when not. Classes only (CSP style-src). */
.kit-dialog.sales-order { width: min(860px, calc(100vw - 24px)); max-height: min(92vh, 980px); margin: auto 12px auto auto; border-radius: 20px; }
.kit-dialog.sales-order[open] { animation: sales-order-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes sales-order-in { from { transform: translateX(28px); } to { transform: none; } }
.sales-order .kit-dialog-body { gap: 16px; padding: 6px 18px 18px; }
.sales-order-skel { height: 180px; } .sales-order-skel.is-short { height: 96px; }
.sales-order-head h4 { margin: 8px 0 2px; font-size: 1.35em; line-height: 1.2; overflow-wrap: anywhere; }
.sales-order-head p { margin: 0; overflow-wrap: anywhere; }
.sales-order-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sales-order-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sales-order-col { display: grid; gap: 14px; min-width: 0; }
.sales-order-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; min-width: 0; }
.sales-order-card.is-good { border-color: color-mix(in srgb, var(--ok, #1f9d63) 40%, var(--line)); background: color-mix(in srgb, var(--ok, #1f9d63) 7%, var(--surface)); }
.sales-order-card h5 { margin: 0; font-size: .78em; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sales-order-card p { margin: 0; }
.sales-order-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sales-order-note { color: var(--ink-3); font-size: .92em; }
.sales-order-money { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 70%); }
.sales-order-gross { display: grid; gap: 2px; }
.sales-order-gross span { color: var(--ink-3); font-size: .85em; }
.sales-order-gross strong { font-size: 1.9em; font-weight: 780; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.sales-order-gross small { color: var(--ink-3); }
.sales-order-money-lines { display: grid; gap: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }
.sales-order-money-line { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.sales-order-money-line span { color: var(--ink-3); }
.sales-order-money-line.is-net { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 1.08em; }
.sales-order-money-line.is-net span { color: var(--ink); font-weight: 700; }
.sales-order-money-line.is-net b { color: var(--accent); }
.sales-order-money-lines .kit-faint { font-size: .82em; }
.sales-order-linked-list { display: grid; gap: 6px; }
.sales-order-linked { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.sales-order-linked:hover:not(:disabled) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.sales-order-linked:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.sales-order-linked:disabled { cursor: default; opacity: .75; }
.sales-order-linked span { display: grid; min-width: 0; } .sales-order-linked strong, .sales-order-linked small { overflow-wrap: anywhere; }
.sales-order-linked small { color: var(--ink-3); }
.sales-order-linked b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sales-order-touches { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sales-order-touch { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; align-items: start; }
.sales-order-touch-tag { justify-self: start; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: .74em; font-weight: 760; text-transform: uppercase; letter-spacing: .04em; }
.sales-order-touch div { display: grid; gap: 2px; min-width: 0; }
.sales-order-touch-detail { display: flex; flex-wrap: wrap; gap: 4px; } .sales-order-touch-detail code { overflow-wrap: anywhere; }
.sales-order-touch time, .sales-order-timeline time { color: var(--ink-3); font-size: .86em; }
.sales-order-buyer { display: grid; gap: 2px; } .sales-order-buyer span { color: var(--ink-3); overflow-wrap: anywhere; }
.sales-order-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; display: grid; gap: 10px; border-left: 2px solid var(--line); }
.sales-order-timeline li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; }
.sales-order-timeline li::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.sales-order-timeline time { grid-column: 1 / -1; }
.sales-order-timeline b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sales-order-ref { padding: 0; border: 0; background: none; color: var(--portal-accent, #695a0a); font: inherit; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.sales-order-ref:focus-visible { outline: 3px solid color-mix(in srgb, currentColor 45%, transparent); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 720px) {
  .kit-dialog.sales-order { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .kit-dialog.sales-order[open] { animation-name: sales-order-up; }
  .sales-order-grid { grid-template-columns: minmax(0, 1fr); }
  .sales-order .kit-dialog-body { padding: 4px 14px 16px; }
}
@keyframes sales-order-up { from { transform: translateY(32px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .kit-dialog.sales-order[open] { animation: none; } }
.segments-panel { margin: 0 0 18px; padding: 18px 20px 16px; border: 1px solid #dce9e3; border-radius: 18px; background: linear-gradient(135deg,#f6fbf8,#fafbf3); box-shadow: 0 8px 22px rgba(50, 42, 22,.05); }
.segments-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.segments-eyebrow { color:#67877c; font-size:10px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.segments-panel h3,.segment-dialog h2 { margin:4px 0 3px; color:#3a3719; font-size:20px; letter-spacing:-.03em; }
.segments-panel p { margin:0; color:#857b71; font-size:12px; line-height:1.45; }
.segment-list { display:grid; gap:8px; }
.segment-card { display:flex; align-items:center; gap:11px; min-height:58px; padding:10px 12px; border:1px solid #e0ebe6; border-radius:13px; background:#fff; }
.segment-card-icon { display:grid; width:31px; height:31px; place-items:center; border-radius:10px; color:#564225; background:#e5f3ed; }
.segment-card-icon svg { width:15px; height:15px; }
.segment-card-copy { display:grid; min-width:0; flex:1; gap:2px; }
.segment-card-copy strong { color:#454124; font-size:13px; }
.segment-card-copy small,.segment-card-copy span { overflow:hidden; color:#908880; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.segment-empty { display:flex; min-height:44px; align-items:center; gap:9px; color:#7b8e89; font-size:12px; }
.segment-empty strong { color:#635546; }
.segment-dialog { width:min(600px,calc(100vw - 24px)); padding:0; border:0; border-radius:20px; box-shadow:0 24px 80px rgba(41, 38, 18,.22); }
.segment-dialog::backdrop { background:rgba(38, 36, 18,.35); backdrop-filter:blur(3px); }
.segment-dialog-head,.segment-dialog-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 21px; border-bottom:1px solid #e8efec; }
.segment-dialog-actions { justify-content:flex-end; border-top:1px solid #e8efec; border-bottom:0; }
.segment-dialog-fields { display:grid; gap:12px; padding:18px 21px; }
.segment-dialog-fields label { display:grid; gap:5px; color:#68594a; font-size:11px; font-weight:700; }
.segment-dialog-fields input,.segment-dialog-fields select,.segment-dialog-fields textarea { width:100%; box-sizing:border-box; padding:9px 10px; border:1px solid #d9e5e0; border-radius:9px; color:#49452a; background:#fbfdfc; font:inherit; font-size:13px; }
.segment-condition { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:0; padding:12px; border:1px solid #dce9e3; border-radius:12px; }
.segment-condition legend { padding:0 5px; color:#6d8980; font-size:10px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.segment-dialog-error { color:#a24f4f !important; }
@media (max-width: 620px) { .segments-panel-head { flex-direction:column; } .segment-condition { grid-template-columns:1fr; } }
/* Admin → Servidor and Admin → Saúde (3E.0 pass 5, server-health.js). */
.sh { --sh-good: var(--adm-good, #16a34a); --sh-warn: var(--adm-warn, #d97706); --sh-danger: var(--adm-danger, #dc2626); --sh-brand: var(--adm-brand, #4f46e5);
  --sh-violet: #8b5cf6; --sh-teal: #6b4709; --sh-muted: var(--adm-muted, #78806b);
  display: grid; gap: 16px; min-width: 0; color: var(--adm-ink, inherit); }
.sh h2, .sh h3, .sh p { margin: 0; }
.sh-muted { color: var(--sh-muted); font-size: 13px; }
.sh-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }

/* tones */
.sh .is-good { --sh-tone: var(--sh-good); --sh-tone-soft: var(--adm-good-soft, #dcfce7); }
.sh .is-warn { --sh-tone: var(--sh-warn); --sh-tone-soft: var(--adm-warn-soft, #fef3c7); }
.sh .is-danger { --sh-tone: var(--sh-danger); --sh-tone-soft: var(--adm-danger-soft, #fee2e2); }
.sh .is-brand { --sh-tone: var(--sh-brand); --sh-tone-soft: var(--adm-brand-soft, #efffde); }
.sh .is-muted { --sh-tone: var(--sh-muted); --sh-tone-soft: var(--adm-surface-3, #f5f6f3); }

/* hero */
.sh-hero { --sh-tone: var(--sh-muted); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px;
  border-radius: calc(var(--adm-radius, 12px) + 4px); border: 1px solid color-mix(in srgb, var(--sh-tone) 30%, transparent);
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--sh-tone) 16%, transparent), transparent 60%), var(--adm-surface, #fff);
  box-shadow: var(--adm-shadow, 0 1px 2px rgba(0,0,0,.06)); }
.sh-hero-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sh-hero h2 { font-size: 22px; letter-spacing: -.01em; }
.sh-hero p { color: var(--adm-ink-2, inherit); font-size: 14px; margin-top: 2px; }
.sh-eyebrow { font-size: 11px !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-muted) !important; }
.sh-hero > .sh-hero-main > .sh-dot { width: 14px; height: 14px; flex: none; }
.sh-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sh-tone, var(--sh-muted)); position: relative; flex: none; }
.sh-hero.is-good .sh-dot::after, .sh-hero.is-danger .sh-dot::after, .sh-hero.is-brand .sh-dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--sh-tone); opacity: 0; animation: sh-ping 2.2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes sh-ping { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
.sh-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sh-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sh-muted); }
.sh-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--sh-good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sh-good) 20%, transparent); }

/* controls */
.sh-button, .sh-icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600;
  border-radius: var(--adm-control-radius, 8px); border: 1px solid var(--adm-line-strong, #d8dbd1); background: var(--adm-surface, #fff); color: var(--adm-ink, inherit); cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s; }
.sh-icon-button { width: 34px; padding: 0; }
.sh-button svg, .sh-icon-button svg { width: 16px; height: 16px; }
.sh-button:hover, .sh-icon-button:hover { border-color: var(--sh-brand); }
.sh-button:active { transform: translateY(1px); }
.sh-button:disabled, .sh-icon-button:disabled { opacity: .55; cursor: default; }
.sh-button.is-primary { background: var(--sh-brand); border-color: var(--sh-brand); color: var(--adm-brand-ink, #fff); }
.sh-button.is-ghost { background: transparent; }
.sh-icon-button.is-danger:hover { border-color: var(--sh-danger); color: var(--sh-danger); }
.sh button:focus-visible, .sh input:focus-visible, .sh select:focus-visible, .sh textarea:focus-visible { outline: none; box-shadow: var(--adm-focus, 0 0 0 3px rgba(79,70,229,.35)); }
.sh-range { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--adm-surface-3, #f5f6f3); }
.sh-range button { border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 7px; color: var(--sh-muted); cursor: pointer; }
.sh-range button.is-active { background: var(--adm-surface, #fff); color: var(--adm-ink, inherit); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sh-link, .sh-link-button { color: var(--sh-brand); font-weight: 600; text-decoration: none; }
.sh-link-button { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; }
.sh-link:hover, .sh-link-button:hover { text-decoration: underline; }

/* KPI tiles */
.sh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.sh-kpi { --sh-tone: var(--sh-muted); position: relative; overflow: hidden; display: grid; gap: 4px; padding: 14px 14px 12px; border-radius: var(--adm-radius, 12px);
  border: 1px solid var(--adm-line, #e9ebe5); background: var(--adm-surface, #fff); }
.sh-kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--sh-tone); }
.sh-kpi p { font-size: 12px; font-weight: 600; color: var(--sh-muted); }
.sh-kpi strong { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sh-kpi strong em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--sh-muted); margin-left: 1px; }
.sh-kpi small { font-size: 12px; color: var(--sh-muted); }
.sh-spark { width: 100%; height: 26px; color: var(--sh-brand); }
.sh-spark path { stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.sh-meter { display: block; height: 6px; border-radius: 99px; background: var(--adm-surface-3, #f5f6f3); overflow: hidden; }
.sh-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--sh-tone); transition: width .4s ease; }

/* section tabs */
.sh-sections { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--adm-line, #e9ebe5); scrollbar-width: none; }
.sh-sections button { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--sh-muted); cursor: pointer; white-space: nowrap; }
.sh-sections button.is-active { color: var(--adm-ink, inherit); }
.sh-sections button.is-active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--sh-brand); }
.sh-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--sh-danger); color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.sh-body { display: grid; gap: 16px; animation: sh-in .2s ease; }
@keyframes sh-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* cards, lists */
.sh-card { display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: var(--adm-radius, 12px); border: 1px solid var(--adm-line, #e9ebe5); background: var(--adm-surface, #fff); min-width: 0; }
.sh-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sh-card > header h3 { font-size: 14px; font-weight: 700; }
.sh-card > header p { font-size: 12px; color: var(--sh-muted); margin-top: 2px; }
.sh-card > header > span { font-size: 12px; color: var(--sh-muted); font-variant-numeric: tabular-nums; }
.sh-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.sh-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.sh-chart { display: block; width: 100%; height: 120px; color: var(--sh-brand); }
.sh-chart.is-violet { color: var(--sh-violet); }
.sh-chart.is-teal { color: var(--sh-teal); }
.sh-chart .sh-line { stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.sh-chart .sh-grid { stroke: var(--adm-line, #e9ebe5); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.sh-chart-empty { height: 120px; display: grid; place-items: center; font-size: 12px; color: var(--sh-muted); border-radius: 8px; background: var(--adm-surface-2, #fafafa); }
.sh-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sh-list > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--adm-line, #e9ebe5); min-width: 0; }
.sh-list > li:first-child { border-top: 0; padding-top: 0; }
.sh-list > li > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.sh-list strong { font-size: 13px; overflow-wrap: anywhere; }
.sh-list small { font-size: 12px; color: var(--sh-muted); overflow-wrap: anywhere; }
.sh-list time { font-size: 12px; color: var(--sh-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sh-row-right { display: grid; justify-items: end; gap: 4px; min-width: 120px; flex: none !important; }
.sh-row-right .sh-meter { width: 120px; }
.sh-days { font-size: 12px; font-weight: 700; color: var(--sh-tone); }
.sh-empty { display: grid; justify-items: center; gap: 8px; padding: 22px 8px; color: var(--sh-muted); font-size: 13px; text-align: center; }
.sh-empty svg { width: 22px; height: 22px; color: var(--sh-good); }
.sh-incident { display: grid; gap: 6px; padding: 12px; border-radius: 10px; background: var(--adm-danger-soft, #fee2e2); font-size: 13px; }
.sh-incident ul { margin: 0; padding-left: 18px; }

/* pills, tags */
.sh-pill { --sh-tone: var(--sh-muted); display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  color: color-mix(in srgb, var(--sh-tone) 85%, #000); background: color-mix(in srgb, var(--sh-tone) 13%, transparent); }
.sh-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--sh-tone); }
.sh-tag { --sh-tone: var(--sh-muted); display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--sh-tone); background: color-mix(in srgb, var(--sh-tone) 12%, transparent); }
.sh .is-critical { --sh-tone: #b91c1c; }
.sh .is-high { --sh-tone: #ea580c; }
.sh .is-medium { --sh-tone: #ca8a04; }
.sh .is-low { --sh-tone: #7bc312; }
.sh .is-unknown { --sh-tone: var(--sh-muted); }
.sh .is-due { --sh-tone: var(--sh-danger); }
.sh-sev-row { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* severity strip */
.sh-severity { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.sh-sev { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--sh-tone) 9%, var(--adm-surface, #fff)); border: 1px solid color-mix(in srgb, var(--sh-tone) 22%, transparent); }
.sh-sev strong { font-size: 22px; color: var(--sh-tone); font-variant-numeric: tabular-nums; }
.sh-sev span { font-size: 12px; font-weight: 600; color: var(--sh-muted); }
.sh-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13px; }
.sh-facts dt { color: var(--sh-muted); }
.sh-facts dd { margin: 0; }

/* tables */
.sh-toolbar { display: flex; gap: 8px; }
.sh-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 420px; height: 36px; padding: 0 12px; border-radius: var(--adm-control-radius, 8px); border: 1px solid var(--adm-line-strong, #d8dbd1); background: var(--adm-surface, #fff); }
.sh-search svg { width: 16px; height: 16px; color: var(--sh-muted); }
.sh-search input { border: 0; outline: none; background: none; font: inherit; font-size: 13px; flex: 1; min-width: 0; color: inherit; }
.sh-table-card { padding-bottom: 6px; }
.sh-table-wrap { overflow-x: auto; margin: 0 -16px; }
.sh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sh-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sh-muted); padding: 8px 16px; border-bottom: 1px solid var(--adm-line, #e9ebe5); white-space: nowrap; }
.sh-table td { padding: 10px 16px; border-bottom: 1px solid var(--adm-line, #e9ebe5); vertical-align: top; }
.sh-table td small { display: block; color: var(--sh-muted); font-size: 12px; margin-top: 3px; }
.sh-table tr:last-child td { border-bottom: 0; }
.sh-table tr:hover td { background: var(--adm-surface-2, #fafafa); }
.sh-table tr.is-off td { opacity: .6; }
.sh-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.sh-check { --sh-tone: var(--sh-muted); display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--adm-line, #e9ebe5); }
.sh-check .sh-dot { margin-top: 5px; }
.sh-check div { display: grid; gap: 2px; min-width: 0; }
.sh-check strong { font-size: 13px; overflow-wrap: anywhere; }
.sh-check small { font-size: 12px; color: var(--sh-muted); }

/* timeline */
.sh-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.sh-timeline li { --sh-tone: var(--sh-muted); position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 0 0 14px 2px; }
.sh-timeline li::before { content: ''; position: absolute; left: 6px; top: 14px; bottom: 0; width: 1px; background: var(--adm-line, #e9ebe5); }
.sh-timeline li:last-child::before { display: none; }
.sh-timeline .sh-dot { margin-top: 4px; box-shadow: 0 0 0 3px var(--adm-surface, #fff); }
.sh-timeline div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.sh-timeline strong { font-size: 13px; }
.sh-timeline small { font-size: 12px; color: var(--sh-muted); overflow-wrap: anywhere; }
.sh-timeline time { font-size: 12px; color: var(--sh-muted); white-space: nowrap; }

/* alerts editor */
.sh-alerts { display: grid; gap: 16px; }
.sh-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sh-fields.is-disabled { opacity: .55; }
.sh-fields label, .sh-stack-label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--sh-muted); }
.sh-stack-label small { font-weight: 400; }
.sh input[type="text"], .sh input[type="tel"], .sh input[type="url"], .sh input[type="date"], .sh input[type="number"], .sh select, .sh textarea {
  height: 36px; padding: 0 10px; border-radius: var(--adm-control-radius, 8px); border: 1px solid var(--adm-line-strong, #d8dbd1); background: var(--adm-surface, #fff); color: var(--adm-ink, inherit); font: inherit; font-size: 13px; min-width: 0; }
.sh textarea { height: auto; padding: 8px 10px; resize: vertical; }
.sh-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
.sh-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sh-switch span { width: 36px; height: 20px; border-radius: 99px; background: var(--adm-line-strong, #d8dbd1); position: relative; transition: background .2s; }
.sh-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.sh-switch input:checked + span { background: var(--sh-brand); }
.sh-switch input:checked + span::after { transform: translateX(16px); }
.sh-switch input:focus-visible + span { box-shadow: var(--adm-focus, 0 0 0 3px rgba(79,70,229,.35)); }
.sh-switch b { font-size: 13px; }
.sh-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 8px; }
.sh-rule { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "switch text minutes" "switch text default"; align-items: center; gap: 2px 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--adm-line, #e9ebe5); }
.sh-rule > .sh-switch { grid-area: switch; }
.sh-rule > div { grid-area: text; display: grid; gap: 2px; min-width: 0; }
.sh-rule strong { font-size: 13px; }
.sh-rule small { font-size: 12px; color: var(--sh-muted); }
.sh-rule .sh-minutes { grid-area: minutes; }
.sh-rule .sh-default { grid-area: default; text-align: right; font-size: 11px; }
.sh-rule .sh-default.is-changed { color: var(--sh-brand); font-weight: 600; }
.sh-rule.is-off > div { opacity: .55; }
.sh-minutes { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sh-muted); }
.sh-minutes input { width: 84px; text-align: right; }
.sh-row-edit { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.sh-savebar { position: sticky; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; border-radius: 12px; border: 1px solid var(--adm-line, #e9ebe5);
  background: color-mix(in srgb, var(--adm-surface, #fff) 88%, transparent); backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.sh-savebar p { flex: 1; font-size: 12px; color: var(--sh-muted); }
.sh-flash { --sh-tone: var(--sh-muted); padding: 10px 14px; border-radius: 10px; font-size: 13px; background: color-mix(in srgb, var(--sh-tone) 10%, transparent); border: 1px solid color-mix(in srgb, var(--sh-tone) 25%, transparent); }
.sh-flash ul { margin: 6px 0 0; padding-left: 18px; }

/* skeleton */
.sh-skeleton { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sh-skeleton span { height: 84px; border-radius: 12px; background: linear-gradient(90deg, var(--adm-surface-2, #f5f5f5), var(--adm-surface-3, #ececec), var(--adm-surface-2, #f5f5f5)); background-size: 200% 100%; animation: sh-shimmer 1.2s linear infinite; }
.sh-skeleton span:first-child { grid-column: 1 / -1; height: 96px; }
@keyframes sh-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Saúde */
.sh-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sh-area { --sh-tone: var(--sh-muted); display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--adm-radius, 12px); border: 1px solid var(--adm-line, #e9ebe5); background: var(--adm-surface, #fff); transition: transform .15s, box-shadow .15s; }
.sh-area:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.sh-area > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.sh-area h3 { font-size: 14px; }
.sh-area p { font-size: 12px; color: var(--sh-muted); }
.sh-area-icon { --sh-tone: var(--sh-brand); width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--sh-tone); background: color-mix(in srgb, var(--sh-tone) 12%, transparent); }
.sh-area .sh-area-icon { --sh-tone: inherit; }
.sh-area-icon svg { width: 18px; height: 18px; }
.sh-uptime { grid-template-columns: auto 1fr; align-items: start; gap: 18px; }
.sh-uptime > div { display: grid; gap: 8px; min-width: 0; }
.sh-uptime p { font-size: 12px; color: var(--sh-muted); }
.sh-donut { width: 128px; height: 128px; }
.sh-donut-track { fill: none; stroke: var(--adm-surface-3, #f5f6f3); stroke-width: 12; }
.sh-donut-value { fill: none; stroke: var(--sh-good); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.sh-donut-number { font-size: 22px; font-weight: 700; fill: var(--adm-ink, #111); }
.sh-donut-label { font-size: 11px; fill: var(--sh-muted); }
.sh-good-note { display: inline-flex; align-items: center; gap: 6px; color: var(--sh-good) !important; font-weight: 600; }
.sh-good-note svg { width: 16px; height: 16px; }
.sh-protection .sh-area-icon { width: 30px; height: 30px; border-radius: 8px; }

@media (max-width: 720px) {
  .sh-hero { padding: 16px; }
  .sh-hero-actions { width: 100%; }
  .sh-row-edit { grid-template-columns: 1fr 1fr; }
  .sh-uptime { grid-template-columns: 1fr; justify-items: center; }
  .sh-rules, .sh-grid-2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .sh *, .sh *::before, .sh *::after { animation: none !important; transition: none !important; } }
.site-ads-body { display: grid; gap: 14px; }
.site-ads-bars { gap: 14px; }
.site-ads-bars li { display: grid; gap: 3px; }
.site-ads-bars small { margin-top: 2px; }
.site-ads-accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-ads-accounts li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.site-ads-accounts li:last-child { border-bottom: 0; }
.site-ads-accounts li > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.site-ads-account-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--soft); color: var(--accent); font-weight: 800; }
/* The Site area (decision 0020, 6.2): the Site button and its flyout/sheet, the strip on top of
   every Site page, KPI tiles, charts (series in the fixed categorical order, validated light and
   dark), bars, product cards and the product drawer. Built on the kit tokens (kit.css). */

.kit, .site-fly { --series-1: #7fa21f; --series-2: #eb6834; }
:root[data-theme="dark"] .kit, :root[data-theme="dark"] .site-fly { --series-1: #9dcc1b; --series-2: #d95926; }

/* The Site button in the menu: a caret and a status dot when a page needs a look. */
.nav-item[data-site-menu] .nav-caret { width: 14px; height: 14px; margin-left: auto; transform: rotate(-90deg); opacity: .7; transition: transform .16s ease; }
.nav-item[data-site-menu][aria-expanded="true"] .nav-caret { transform: rotate(0deg); }
.nav-item[data-site-menu]::after { content: ""; position: absolute; left: 24px; top: 8px; width: 7px; height: 7px; border-radius: 50%; display: none; box-shadow: 0 0 0 2px #20200a; }
.nav-item[data-site-menu][data-site-status="warn"]::after { display: block; background: #e9a23b; }
.nav-item[data-site-menu][data-site-status="bad"]::after { display: block; background: #e5534b; }

/* Flyout */
.site-fly { position: fixed; z-index: 80; width: 340px; max-width: calc(100vw - 16px); padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); opacity: 0; transform: translateX(-6px) scale(.98); transform-origin: left top; transition: opacity .14s ease, transform .16s ease; }
.site-fly.is-in { opacity: 1; transform: none; }
.site-fly[hidden] { display: none; }
.site-fly-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.site-fly-head b { display: block; font-size: 15px; }
.site-fly-head small { display: block; color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.site-fly-glyph { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: var(--flow); box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--accent) 70%, transparent); flex: none; }
.site-fly-glyph .kit-i { width: 18px; height: 18px; }
.site-fly-close { display: none; }
.site-fly-list { display: grid; gap: 2px; }
.site-fly-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; color: var(--ink); text-decoration: none; outline: none; transition: background .12s ease; }
.site-fly-item:hover, .site-fly-item:focus-visible { background: var(--surface-2); }
.site-fly-item:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.site-fly-item.is-current { background: var(--soft); }
.site-fly-ti { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); flex: none; }
.site-fly-item.is-current .site-fly-ti { background: var(--accent); color: var(--accent-ink); }
.site-fly-ti .kit-i { width: 16px; height: 16px; }
.site-fly-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.site-fly-text b { font-size: 13.5px; font-weight: 600; }
.site-fly-text small { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-fly-skel { display: inline-block; width: 120px; height: 10px; border-radius: 5px; vertical-align: middle; }
.site-fly kbd, .site-fly-foot kbd { min-width: 20px; padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-3); background: var(--surface-2); text-align: center; }
.site-fly-foot { margin-top: 6px; padding: 8px 8px 4px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; }
.site-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.site-dot.is-ok { background: var(--ok); } .site-dot.is-warn { background: var(--warn); } .site-dot.is-bad { background: var(--bad); }

/* Bottom sheet (phone) */
.site-fly-backdrop { position: fixed; inset: 0; z-index: 79; background: rgba(15, 15, 4, .45); backdrop-filter: blur(2px); }
.site-fly-backdrop[hidden] { display: none; }
.site-fly.is-sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100%; max-width: none; border-radius: 20px 20px 0 0; padding: 6px 10px calc(14px + env(safe-area-inset-bottom)); transform: translateY(24px); transform-origin: bottom; }
.site-fly.is-sheet.is-in { transform: none; }
.site-fly.is-sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 4px auto 8px; border-radius: 2px; background: var(--line-2); }
.site-fly.is-sheet .site-fly-close { display: inline-flex; }
.site-fly.is-sheet .site-fly-list { grid-template-columns: 1fr 1fr; gap: 8px; }
.site-fly.is-sheet .site-fly-item { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 104px; padding: 12px; border: 1px solid var(--line); position: relative; }
.site-fly.is-sheet .site-fly-item .site-dot { position: absolute; top: 14px; right: 14px; }
.site-fly.is-sheet kbd, .site-fly.is-sheet .site-fly-foot { display: none; }
.site-fly.is-sheet .site-fly-text small { white-space: normal; }

/* Strip on top of each Site page */
.site-page { display: grid; gap: 14px; }
.site-strip { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); overflow-x: auto; scrollbar-width: none; }
.site-strip-mark { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 8px; margin-right: 4px; border-right: 1px solid var(--line); color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.site-strip-item { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; border-radius: 10px; color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .12s, color .12s; }
.site-strip-item:hover { background: var(--surface-2); color: var(--ink); }
.site-strip-item:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.site-strip-item.is-current { background: var(--accent); color: var(--accent-ink); }
.site-strip .kit-i { width: 15px; height: 15px; }

/* Segmented control */
.site-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.site-seg button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.site-seg button:hover { color: var(--ink); }
.site-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.site-seg button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.site-seg.is-sm button { min-height: 26px; padding: 0 10px; font-size: 12px; }
.site-seg-count { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-3); font-size: 11px; }

/* KPI tiles */
.site-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.site-kpis.is-tight { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.site-kpi { position: relative; display: grid; gap: 4px; align-content: start; padding: 14px 16px; min-height: 104px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; }
.site-kpi.is-flat { min-height: 0; padding: 11px 13px; box-shadow: none; background: var(--surface-2); }
.site-kpi-label { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.site-kpi-value { font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.site-kpi.is-flat .site-kpi-value { font-size: 18px; }
.site-kpi-value.is-bad { color: var(--bad); }
.site-kpi-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-kpi .site-spark { position: absolute; right: 14px; bottom: 14px; width: 72px; height: 26px; opacity: .9; }
.site-kpi-skel { height: 104px; border-radius: var(--radius); }
.site-delta { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.site-delta.is-good { background: var(--ok-soft); color: var(--ok); }
.site-delta.is-bad { background: var(--bad-soft); color: var(--bad); }
.site-delta.is-new { background: var(--soft); color: var(--ink-2); }

/* Charts */
.site-chart { position: relative; min-height: 220px; }
/* No stroke leaks in from the page: only the marks that ask for one get it. */
.site-chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; stroke: none; }
.site-chart-svg:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); border-radius: 8px; }
.site-chart-grid { stroke: var(--line); stroke-width: 1; }
.site-chart-grid.is-base { stroke: var(--line-2); }
.site-chart-axis { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.site-chart-end { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.site-chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.site-chart-line.is-s1, .site-chart-dot.is-s1 { stroke: var(--series-1); }
.site-chart-line.is-s2, .site-chart-dot.is-s2 { stroke: var(--series-2); }
.site-chart-dot { fill: var(--surface); stroke-width: 2.5; }
.site-chart-dot.is-s1 { fill: var(--series-1); stroke: var(--surface); }
.site-chart-dot.is-s2 { fill: var(--series-2); stroke: var(--surface); }
.site-grad-top { stop-color: var(--series-1); stop-opacity: .22; }
.site-grad-bottom { stop-color: var(--series-1); stop-opacity: 0; }
.site-chart-hair { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.site-chart-hit { fill: transparent; stroke: none; cursor: crosshair; }
.site-chart-svg [hidden] { display: none; }
.site-chart-tip { position: absolute; z-index: 2; min-width: 150px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-2); font-size: 12px; pointer-events: none; }
.site-chart-tip > b { display: block; margin-bottom: 4px; color: var(--ink-2); font-weight: 600; }
.site-tip-row { display: flex; align-items: center; gap: 7px; padding: 1px 0; color: var(--ink-2); }
.site-tip-row span { flex: 1; }
.site-tip-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.site-tip-row i, .site-legend i { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.site-legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-2); font-size: 12px; }
.site-legend span { display: inline-flex; align-items: center; gap: 6px; }
i.is-s1 { background: var(--series-1); } i.is-s2 { background: var(--series-2); }
.site-spark { display: block; }
.site-spark polyline { fill: none; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.site-spark.is-s1 polyline { stroke: var(--series-1); }
.site-spark-gap { display: block; height: 28px; }
.site-chart-card .kit-card-body { padding-top: 6px; }

/* Tables (the chart's table view) */
.site-table-wrap { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.site-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.site-table th, .site-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.site-table thead th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 600; }
.site-table tbody th { font-weight: 500; color: var(--ink-2); }
.site-table .kit-num { text-align: right; }
.site-table tbody tr:last-child > * { border-bottom: 0; }

/* Bars (by product, by platform) */
.site-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.site-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.site-bar-text { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.site-bar-text .kit-num { font-weight: 600; white-space: nowrap; }
.site-bar-text small { margin-left: 8px; color: var(--ink-3); font-weight: 500; }
.site-bar { height: 8px; margin-top: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.site-chart-skel { height: 300px; }
.site-bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--series-1); transition: width .4s ease; }
.site-bar i.is-other { background: var(--ink-3); opacity: .5; }
.site-bars-empty { margin: 0; }
.site-foot { margin: 0; }
.site-section-title { margin: 8px 0 -4px; font-size: 16px; }

/* Products */
.site-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.site-search { position: relative; flex: 1 1 240px; max-width: 380px; }
.site-search > .kit-i { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.site-search .kit-input { width: 100%; padding-left: 34px; }
.site-prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.site-prod { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.site-prod:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.site-prod:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring), var(--shadow-2); }
.site-prod-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.site-prod-glyph { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--soft-2); color: var(--ink); font-weight: 700; font-size: 16px; flex: none; }
.site-prod-name { flex: 1; min-width: 0; display: grid; gap: 2px; }
.site-prod-name b { font-size: 14px; }
.site-prod-name small { font-size: 12px; }
.site-prod-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.site-prod-stats > span { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.site-prod-stats small { color: var(--ink-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-prod-stats b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-prod-stats b.is-bad { color: var(--bad); }
.site-prod .site-spark { width: 100%; height: 28px; }
.site-prod-foot { display: block; }
.site-prod-skel { height: 212px; border-radius: var(--radius); }
.site-prod-none { grid-column: 1 / -1; }

/* Product drawer: the kit dialog as a wide panel from the right (a sheet on a phone) */
.kit-dialog.site-drawer { width: min(720px, calc(100vw - 24px)); height: 100vh; max-height: none; margin: 0 0 0 auto; border-radius: 18px 0 0 18px; }
.kit-dialog.site-drawer[open] { animation: site-slide .2s ease; }
@keyframes site-slide { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.site-tabs { display: flex; gap: 4px; padding: 2px 16px 8px; border-bottom: 1px solid var(--line); }
.site-tabs button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.site-tabs button:hover { background: var(--surface-2); }
.site-tabs button[aria-selected="true"] { background: var(--soft); color: var(--ink); }
.site-tabs button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.site-drawer-title { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.site-drawer-section { display: grid; gap: 12px; justify-items: start; }
.site-drawer-section p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.site-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-sources li { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; }
.site-sources small { display: block; }

/* WordPress info (sites.js) */
.site-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.site-plugins { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.site-plugins li { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.site-plugins li:last-child { border-bottom: 0; }
.site-plugins li.is-off { color: var(--ink-3); }

@media (max-width: 840px), (max-height: 500px) and (max-width: 1000px) {
  .kit-dialog.site-drawer { width: 100vw; height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .site-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-kpi-value { font-size: 20px; }
  .site-kpi .site-spark { display: none; }
  .site-split { grid-template-columns: minmax(0, 1fr); }
  .site-search { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-fly, .site-prod, .site-bar i { transition: none; }
  .kit-dialog.site-drawer[open] { animation: none; }
}

@media (forced-colors: active) {
  .site-chart-line, .site-spark polyline { stroke: CanvasText; }
  .site-chart-line.is-s2 { stroke-dasharray: 5 3; }
  .site-bar i { background: Highlight; }
}
/* Site › Funis de venda, Experimentos and the platform's video player (6.2 pass 2). Colors come
   from the kit tokens and the chart series of site-area.css; widths from data-share (set by JS). */

/* Funnel cards */
.site-fun .site-prod-glyph { background: var(--soft); color: var(--accent); }
.site-fun .site-prod-glyph .kit-i { width: 18px; height: 18px; }
.site-prod-foot.is-hint { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.site-prod-foot.is-hint .kit-i { width: 14px; height: 14px; color: var(--warn); flex: none; }

/* The steps as a funnel: bars shrink with each step, the weakest step in the warning color */
.site-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-funnel.is-compact { gap: 6px; }
.site-funnel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; align-items: center; }
.site-funnel-text { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); }
.site-funnel.is-compact .site-funnel-text { font-size: 12px; }
.site-funnel-text b { color: var(--ink); font-weight: 600; }
.site-funnel-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.site-funnel.is-compact .site-funnel-bar { height: 6px; }
.site-funnel-bar i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--series-1); transition: width .4s ease; }
.site-funnel li.is-weak .site-funnel-bar i { background: var(--warn); }
.site-funnel-keep { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.site-funnel-keep.is-bad { color: var(--bad); font-weight: 600; }
.site-funnel:not(.is-compact) li { grid-template-columns: minmax(0, 1fr) 92px; }
.site-funnel:not(.is-compact) .site-funnel-keep { text-align: right; }

/* Drawer extras */
.site-drawer-bar { justify-content: space-between; }
.site-drawer-section.is-full { justify-items: stretch; }
.site-settings { display: grid; gap: 12px; }
.site-setting { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px; flex-wrap: wrap; }
.site-setting > div { flex: 1 1 280px; display: grid; gap: 8px; }
.site-setting h4 { margin: 0; font-size: 14px; }
.site-setting p { margin: 0; line-height: 1.5; }
.site-setting .kit-field { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }

/* The player: our controls under a shield over the embed (YouTube's own UI stays unreachable) */
.site-player { position: relative; display: grid; border-radius: 14px; overflow: hidden; background: #0f120b; color: #fff; box-shadow: var(--shadow-2); outline: none; }
.site-player:focus-visible { box-shadow: 0 0 0 2px var(--ring), var(--shadow-2); }
.site-player-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.site-player-poster, .site-player-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.site-player.is-live .site-player-poster { display: none; }
.site-player-shield { position: absolute; inset: 0; cursor: pointer; background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent 32%); }
.site-player.is-live.is-playing .site-player-shield { background: transparent; }
.site-player-big { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; border: 0; border-radius: 50%; transform: translate(-50%, -50%); background: rgba(255, 255, 255, .94); color: #0f120b; cursor: pointer; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .15s ease; }
.site-player-big:hover { transform: translate(-50%, -50%) scale(1.06); }
.site-player-big:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring), 0 10px 30px rgba(0, 0, 0, .35); }
.site-player-big .kit-i { width: 30px; height: 30px; margin-left: 4px; }
.site-player-bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; background: #181c12; }
.site-player-btn { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: #edf2e8; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.site-player-btn:hover { background: rgba(255, 255, 255, .1); }
.site-player-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.site-player-btn[aria-pressed="true"] { background: rgba(255, 255, 255, .16); color: #fff; }
.site-player-btn .kit-i { width: 19px; height: 19px; }
.site-player-time { min-width: 92px; padding: 0 6px; color: #cdd4c3; font-size: 12px; white-space: nowrap; }
.site-player-seek { position: relative; flex: 1; display: grid; align-items: center; min-width: 80px; height: 36px; }
.site-player-heat { position: absolute; left: 0; right: 0; top: calc(50% + 7px); width: 100%; height: 3px; border-radius: 2px; pointer-events: none; }
.site-player-seek input { width: 100%; margin: 0; accent-color: var(--series-1); cursor: pointer; }
.site-player-seek input:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.site-player:fullscreen { border-radius: 0; }
.site-player:fullscreen .site-player-stage { aspect-ratio: auto; flex: 1; }
.site-player:fullscreen { display: flex; flex-direction: column; }

/* Retention chart markers */
.site-ret-mark { stroke-width: 1.5; stroke-dasharray: 4 3; }
.site-ret-mark.is-half { stroke: var(--ink-3); }
.site-ret-mark.is-pitch { stroke: var(--series-2); }
i.site-ret-key { height: 0; border-top: 2px dashed var(--ink-3); background: none; }
i.site-ret-key.is-pitch { border-top-color: var(--series-2); }

/* Experiments */
.site-exp-list { display: grid; gap: 14px; }
.site-exp { display: grid; gap: 14px; padding: 16px; }
.site-exp-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-exp-head h3 { margin: 0; font-size: 15px; }
.site-exp-head .site-prod-glyph { background: var(--soft); color: var(--accent); }
.site-exp-skel { height: 260px; border-radius: var(--radius); }
.site-variants { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.site-variant { container-type: inline-size; display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.site-variant.is-best { border-color: color-mix(in oklab, var(--series-1) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklab, var(--series-1) 30%, transparent); }
.site-variant.is-winner { border-color: var(--ok); }
.site-variant.is-guard { border-color: color-mix(in oklab, var(--bad) 55%, var(--line)); }
.site-variant-head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.site-variant-head .kit-grow { display: grid; gap: 2px; min-width: 0; }
.site-variant-head b { font-size: 13.5px; }
.site-variant-head small { font-size: 12px; }
.site-variant-tag { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); color: var(--ink); font-weight: 800; flex: none; }
.site-variant.is-best .site-variant-tag { background: var(--series-1); color: #fff; }
.site-prod-stats.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.site-variant .site-bar { margin-top: -4px; }
.site-how { color: var(--ink-2); font-size: 13px; }
.site-how summary { cursor: pointer; font-weight: 600; }
.site-how summary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); border-radius: 6px; }
.site-how p { max-width: 72ch; line-height: 1.55; }

.kit-banner.is-ok { border-color: color-mix(in oklab, var(--ok) 35%, var(--line)); background: var(--ok-soft); color: var(--ok); }
.kit-banner.is-ok > span { color: var(--ink); }
@container (max-width: 400px) {
  .site-prod-stats.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .site-prod-stats.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-player-time { min-width: 0; }
  .site-player-btn[data-player="speed"], .site-player-btn[data-player="captions"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .site-funnel-bar i, .site-player-big { transition: none; }
}

@media (forced-colors: active) {
  .site-funnel-bar i { background: Highlight; }
  .site-funnel li.is-weak .site-funnel-bar i { background: Mark; }
  .site-ret-mark { stroke: CanvasText; }
  .site-variant.is-best { outline: 2px solid Highlight; }
}
/* Site › Tracking (site-tracking.js): tabs, coverage ring, tag cards, event map, link builder,
   attribution models. Built on kit.css and site-area.css tokens; works in every tenant's colors. */
.kit .site-tabs.is-page { padding: 0 0 8px; overflow-x: auto; scrollbar-width: none; }
.kit .site-tabs.is-page button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.kit .site-track-panel { display: grid; gap: 16px; }
.kit .site-side { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.kit .site-side.is-wide { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }

.kit .site-track-sources { display: flex; align-items: center; gap: 24px; }
.kit .site-ring { position: relative; flex: none; width: 132px; height: 132px; }
.kit .site-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.kit .site-ring circle { fill: none; stroke-width: 9; }
.kit .site-ring-track { stroke: var(--surface-3); }
.kit .site-ring-value { stroke: var(--series-1, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.kit .site-ring > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.kit .site-ring b { font-size: 26px; line-height: 1.1; color: var(--ink); }
.kit .site-ring small { font-size: 11px; color: var(--ink-3); max-width: 84px; }
.kit .site-track-sources + .site-foot { margin-top: 14px; }
.kit .site-bars li.is-none .site-bar-text span:first-child { color: var(--ink-3); font-style: italic; }

.kit .site-list { list-style: none; margin: 0; padding: 4px 8px 8px; display: grid; gap: 2px; }
.kit .site-list-item { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.kit .site-list-item:hover { background: var(--surface-2); }
.kit .site-list-item:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.kit .site-list-item .kit-grow, .kit .site-tag-head .kit-grow { display: grid; min-width: 0; }
.kit .site-list-item small, .kit .site-tag-head small { font-size: 12px; }

.kit .site-tag-logo { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.kit .site-tag-logo.is-meta { background: #f6fee7; color: #5c8712; }
.kit .site-tag-logo.is-ga4 { background: #fff1de; color: #a14f00; }
.kit .site-tag-logo.is-google_ads { background: #e6f4ea; color: #137333; }
.kit .site-tag-logo.is-tiktok { background: #1d1d1f; color: #fff; }
.kit .site-tag-logo.is-clarity { background: #e9e6fb; color: #4b3cb8; }
.kit .site-tag-logo.is-pinterest { background: #fde8ea; color: #b0172b; }
.kit .site-tag-logo.is-linkedin { background: #f5f8e1; color: #5d6707; }
.kit .site-tag-logo.is-kwai { background: #fff0e3; color: #a84300; }

.kit .site-tag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.kit .site-tag { display: grid; gap: 14px; align-content: start; padding: 16px; }
.kit .site-tag.is-off { background: var(--surface-2); }
.kit .site-tag.is-off .site-tag-logo { filter: grayscale(1); opacity: .6; }
.kit .site-tag.is-stopped { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--bad) 45%, transparent), var(--shadow-1); }
.kit .site-tag-head { display: flex; align-items: center; gap: 12px; }
.kit .site-tag-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.kit .site-tag-nums div { padding: 10px; border-radius: 10px; background: var(--surface-2); }
.kit .site-tag-nums dt { font-size: 11px; color: var(--ink-3); }
.kit .site-tag-nums dd { margin: 2px 0 0; font-size: 16px; font-weight: 700; }
.kit .site-tag-note { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.kit .site-tag-note.is-warn { background: var(--warn-soft, color-mix(in oklab, var(--warn) 12%, transparent)); color: var(--warn); }
.kit .site-tag-note.is-bad { background: var(--bad-soft, color-mix(in oklab, var(--bad) 12%, transparent)); color: var(--bad); }
.kit .site-tag-note .kit-i, .kit .site-tag-server .kit-i, .kit .site-locked .kit-i { flex: none; width: 16px; height: 16px; }
.kit .site-tag-server { display: flex; align-items: center; gap: 6px; margin: 0; }

.kit .site-switch { position: relative; flex: none; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.kit .site-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.kit .site-switch[aria-checked="true"] { background: var(--accent); }
.kit .site-switch[aria-checked="true"] i { transform: translateX(16px); }
.kit .site-switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.kit .site-switch:disabled { opacity: .6; cursor: progress; }

.kit .site-add-card { display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 180px; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.kit .site-add-card:hover { border-color: var(--accent); background: var(--soft); }
.kit .site-add-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.kit .site-add-glyph { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--accent); }

.kit .site-events-note { margin: 0 0 12px; }
.kit .site-table-wrap.is-free { margin: 0; }
.kit .site-table th[scope="row"] { display: grid; gap: 2px; font-weight: 500; }
.kit .site-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-3); }

.kit .site-link-form { display: grid; gap: 14px; }
.kit .site-link-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kit .site-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.kit .site-presets button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.kit .site-presets button:hover { border-color: var(--accent); }
.kit .site-presets button[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); color: var(--ink); font-weight: 600; }
.kit .site-presets button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.kit .site-link-preview { display: grid; gap: 4px; padding: 12px; border-radius: 10px; background: var(--surface-2); }
.kit .site-link-preview small { font-size: 11px; color: var(--ink-3); }
.kit .site-link-preview code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; color: var(--ink); }
.kit .site-link-made { margin: 0; }
.kit .site-link-short { display: block; max-width: 220px; }
.kit .site-link-dest { display: block; max-width: 260px; font-weight: 400; }

.kit .site-insights { display: grid; gap: 14px; }
.kit .site-insight { display: flex; gap: 12px; align-items: flex-start; }
.kit .site-insight > div { display: grid; gap: 2px; font-size: 13px; color: var(--ink-2); }
.kit .site-insight b { color: var(--ink); }
.kit .site-insight-glyph { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--soft); color: var(--accent); }
.kit .site-insight-glyph .kit-i { width: 16px; height: 16px; }

.kit .site-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kit .site-model { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink-3); }
.kit .site-model.is-on { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-1); }
.kit .site-model p { margin: 0; font-size: 13px; }
.kit .site-model-head { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.kit .site-model-tag { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); font-weight: 800; font-size: 13px; }
.kit .site-model.is-on .site-model-tag { background: var(--accent); color: var(--accent-ink, #fff); }
.kit .site-rules { list-style: none; margin: 0; padding: 0 16px 8px; }
.kit .site-rules li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.kit .site-rules li:first-child { border-top: 0; }
.kit .site-rules .kit-grow { display: grid; gap: 2px; }
.kit .site-locked { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12px; color: var(--ink-3); }

.kit-dialog .site-prov-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.kit-dialog .site-prov-grid button { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.kit-dialog .site-prov-grid button:hover { border-color: var(--accent); }
.kit-dialog .site-prov-grid button[aria-checked="true"] { border-color: var(--accent); background: var(--soft); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--accent); }
.kit-dialog .site-prov-grid button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.kit-dialog .site-field-error { margin: 4px 0 0; color: var(--bad); font-size: 13px; }

@media (max-width: 900px) {
  .kit .site-side, .kit .site-side.is-wide, .kit .site-models { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kit .site-track-sources { flex-direction: column; align-items: stretch; }
  .kit .site-ring { align-self: center; }
  .kit .site-link-pair { grid-template-columns: 1fr; }
  .kit .site-hide-s { display: none; }
  .kit .site-tag-grid { grid-template-columns: 1fr; }
  .kit-dialog .site-prov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .kit .site-ring-value, .kit .site-switch, .kit .site-switch i { transition: none; }
}
@media (forced-colors: active) {
  .kit .site-ring-value { stroke: Highlight; }
  .kit .site-switch { border: 1px solid ButtonText; }
  .kit .site-switch[aria-checked="true"] { background: Highlight; }
}
/* Admin → Sites (public/app/sites.js), built from the shared kit (kit.css). */
.site-card { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; gap: 14px; padding: 16px; align-items: center; }
.site-card-main { display: grid; gap: 4px; min-width: 0; }
.site-card-main h3 { font-size: 1.12em; }
.site-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.site-caps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.site-cap { display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 9px; border-radius: 9px; background: var(--surface-2); font-size: .885em; color: var(--ink); min-width: 0; }
.site-cap .kit-i { width: 13px; height: 13px; color: var(--ok); }
.site-cap.is-off { color: var(--ink-3); } .site-cap.is-off .kit-i { color: var(--ink-3); }
.site-cap em { margin-left: auto; padding-left: 6px; font-style: normal; font-size: .84em; color: var(--ink-3); white-space: nowrap; }
.site-details { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; padding: 14px 16px 16px; border-top: 1px solid var(--line); animation: kit-rise .18s ease both; }
.site-details section { display: grid; gap: 8px; align-content: start; min-width: 0; }
.site-details h4 { margin: 0; color: var(--ink-3); font-size: .85em; font-weight: 500; }
.site-details-gap { margin-top: 8px !important; }
.site-wa { grid-column: 1 / -1; }
.site-wa-row { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 22px; align-items: end; }
.site-wa-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.site-wa-stat { display: grid; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.site-wa-stat strong { font-weight: 500; }
.site-wa-stat small { color: var(--ink-3); font-size: .85em; line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 760px) { .site-wa-row { grid-template-columns: minmax(0, 1fr); } .site-wa-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.site-accounts { display: grid; gap: 4px; max-height: 320px; margin-top: 10px; overflow-y: auto; }
.site-account { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.site-account:has(input:checked) { border-color: var(--accent, var(--ink-3)); background: var(--surface-2); }
.site-account-who { display: grid; flex: 1; min-width: 0; }
.site-account-who strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-account-who small { color: var(--ink-3); font-size: .85em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-account-default { display: flex; align-items: center; gap: 8px; margin-top: 12px; cursor: pointer; }
.site-activity { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-activity li { display: flex; justify-content: space-between; gap: 12px; }
.site-activity time { flex: none; color: var(--ink-3); font-size: .885em; }
@media (max-width: 1180px) { .site-caps { grid-template-columns: repeat(2, minmax(0,1fr)); } .site-details { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px) {
  .site-card { grid-template-columns: 62px minmax(0,1fr); }
  .site-card-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .site-caps, .site-details { grid-template-columns: minmax(0,1fr); }
}
/* #tarefas (decision 0018): views rail, list, board, team, the task drawer, and the blocks on the
   contact page, the Agenda day and the conversation header. Built on the kit tokens, so the tenant's
   colour and dark mode come for free; list colours are a fixed set readable in both themes. */
.tk-app { --tk-blue: #79a621; --tk-cyan: #7e7308; --tk-green: #1f8a5b; --tk-amber: #b7790b; --tk-red: #cf3d3d; --tk-violet: #7a52d1; --tk-pink: #c8457f; --tk-slate: #797a61; }
:root[data-theme="dark"] .tk-app, :root[data-theme="dark"] .tk-embed, :root[data-theme="dark"] .tk-strip, :root[data-theme="dark"] .kit-dialog {
  --tk-blue: #bdf350; --tk-cyan: #c3b024; --tk-green: #4ccb91; --tk-amber: #e8b04f; --tk-red: #f07878; --tk-violet: #ab8cf2; --tk-pink: #ec84b2; --tk-slate: #b2b29a;
}
.tk-embed, .tk-strip, .kit-dialog { --tk-blue: #79a621; --tk-cyan: #7e7308; --tk-green: #1f8a5b; --tk-amber: #b7790b; --tk-red: #cf3d3d; --tk-violet: #7a52d1; --tk-pink: #c8457f; --tk-slate: #797a61; }
.tk-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tk-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--tk-c, var(--tk-slate)); }
.tk-dot.is-lg { width: 14px; height: 14px; box-shadow: 0 0 0 4px color-mix(in oklab, var(--tk-c) 18%, transparent); }
.is-blue { --tk-c: var(--tk-blue); } .is-cyan { --tk-c: var(--tk-cyan); } .is-green { --tk-c: var(--tk-green); } .is-amber { --tk-c: var(--tk-amber); }
.is-red { --tk-c: var(--tk-red); } .is-violet { --tk-c: var(--tk-violet); } .is-pink { --tk-c: var(--tk-pink); } .is-slate { --tk-c: var(--tk-slate); }
.tk-app kbd, .kit-dialog kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--ink-2); font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Shell */
.tk-screen { min-height: calc(100vh - 120px); }
.tk-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 0; min-height: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); overflow: hidden; position: relative; }
.tk-shell.has-drawer { grid-template-columns: 232px minmax(0, 1fr) min(440px, 40vw); }
.tk-solo { display: grid; place-items: center; min-height: 60vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* Rail */
.tk-rail { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--surface-2); }
.tk-navs { display: flex; flex-direction: column; gap: 1px; }
.tk-nav { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.tk-nav:hover { background: var(--surface-3); color: var(--ink); }
.tk-nav.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1), inset 3px 0 0 var(--accent); }
.tk-nav.is-on .tk-i { color: var(--accent); }
.tk-nav b { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: .85em; font-weight: 600; text-align: center; }
.tk-nav.is-alert b { background: var(--bad-soft); color: var(--bad); }
.tk-rail-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 4px; padding: 0 4px 0 10px; color: var(--ink-3); font-size: .78em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tk-rail-empty { margin: 4px 10px; color: var(--ink-3); font-size: .9em; }
.tk-keys { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink-3); font: inherit; font-size: .9em; cursor: pointer; }
.tk-keys:hover { background: var(--surface-3); color: var(--ink); } .tk-keys kbd { margin-left: auto; }

/* Main */
.tk-main { display: flex; flex-direction: column; min-width: 0; }
.tk-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px 12px; }
.tk-title { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-width: 0; }
.tk-title h2 { margin: 0; font-size: 1.55em; font-weight: 700; letter-spacing: -.01em; }
.tk-title p { margin: 1px 0 0; color: var(--ink-2); }
.tk-title-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--accent); }
.tk-title-icon .tk-i { width: 20px; height: 20px; }
.tk-head-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-search { position: relative; display: block; width: 220px; }
.tk-search .tk-i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.tk-search .kit-input { padding-left: 32px; min-height: 34px; }
.tk-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); }
.tk-seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: .92em; cursor: pointer; white-space: nowrap; }
.tk-seg button:hover { color: var(--ink); }
.tk-seg button.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }

/* Quick add */
.tk-quick { display: flex; align-items: center; gap: 10px; margin: 0 22px 10px; padding: 0 12px; min-height: 46px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); transition: border-color .15s, box-shadow .15s, background .15s; }
.tk-quick:focus-within { border-style: solid; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--ring); }
.tk-quick-plus { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.tk-quick-plus .tk-i { width: 14px; height: 14px; stroke-width: 2.4; }
.tk-quick-input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 1.04em; }
.tk-quick-input::placeholder { color: var(--ink-3); }
.tk-quick-hint { color: var(--ink-3); font-size: .86em; white-space: nowrap; }

/* Bulk */
.tk-bulk { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 22px 10px; padding: 8px 10px 8px 14px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-2); animation: tk-rise .18s ease-out; }
.tk-bulk .kit-btn { background: color-mix(in oklab, var(--surface) 12%, transparent); border-color: transparent; color: inherit; }
.tk-bulk .kit-btn:hover { background: color-mix(in oklab, var(--surface) 22%, transparent); }
.tk-bulk .kit-input, .tk-bulk select { width: auto; min-height: 30px; padding: 3px 8px; border-color: transparent; background: color-mix(in oklab, var(--surface) 12%, transparent); color: inherit; }
.tk-bulk select option { color: var(--ink); background: var(--surface); }
.tk-bulk-date { display: inline-flex; align-items: center; gap: 6px; font-size: .9em; }

/* List */
.tk-body { flex: 1; padding: 0 22px 26px; min-width: 0; }
.tk-groups { display: flex; flex-direction: column; gap: 16px; }
.tk-group-head { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; color: var(--ink-2); font-size: .8em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tk-group-head b { padding: 0 7px; border-radius: 99px; background: var(--surface-3); font-size: .95em; letter-spacing: 0; }
.tk-group.is-late .tk-group-head { color: var(--bad); } .tk-group.is-late .tk-group-head b { background: var(--bad-soft); }
.tk-group.is-today .tk-group-head { color: var(--accent); } .tk-group.is-today .tk-group-head b { background: var(--soft); }
.tk-rows { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.tk-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 7px 12px 7px 8px; border-top: 1px solid var(--line); transition: background .12s, opacity .3s, transform .3s; }
.tk-row:first-child { border-top: 0; }
.tk-row:hover, .tk-row.is-cursor { background: var(--surface-2); }
.tk-row.is-cursor { box-shadow: inset 3px 0 0 var(--accent); }
.tk-row.is-open { background: var(--soft); }
.tk-row.is-picked { background: color-mix(in oklab, var(--accent) 7%, var(--surface)); }
.tk-row.is-fresh { animation: tk-fresh 1.6s ease-out; }
.tk-row.is-leaving { opacity: 0; transform: translateX(14px); }
.tk-row.is-done .tk-row-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--ink-3) 60%, transparent); }
.tk-pick { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); opacity: 0; transition: opacity .12s; cursor: pointer; }
.tk-row:hover .tk-pick, .tk-pick:checked, .tk-pick:focus-visible, .tk-row.is-cursor .tk-pick { opacity: 1; }
.tk-check { display: grid; place-items: center; width: 22px; height: 22px; flex: none; padding: 0; border: 2px solid var(--line-2); border-radius: 50%; background: var(--surface); color: transparent; cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s; }
.tk-check .tk-i { width: 12px; height: 12px; stroke-width: 3; }
.tk-check:hover { border-color: var(--ok); color: var(--ok); transform: scale(1.06); }
.tk-check.is-urgent { border-color: var(--bad); }
.tk-check.is-done { border-color: var(--ok); background: var(--ok); color: #fff; animation: tk-pop .3s ease-out; }
.tk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; border-radius: 6px; }
.tk-row-main:focus-visible, .tk-card-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tk-row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 1.02em; }
.tk-row-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.tk-row-meta:empty { display: none; }
.tk-row-end { display: flex; align-items: center; gap: 8px; flex: none; }
.tk-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; height: 21px; padding: 0 7px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-size: .82em; }
.tk-tag .tk-i { width: 13px; height: 13px; }
.tk-tag .tk-dot { width: 7px; height: 7px; }
.tk-tag.is-link { background: var(--soft); color: var(--accent); }
.tk-tag.is-full { background: var(--ok-soft); color: var(--ok); }
.tk-tag.is-bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.tk-state { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 99px; font-size: .8em; font-weight: 600; }
.tk-state.is-doing { background: var(--soft); color: var(--accent); } .tk-state.is-waiting { background: var(--warn-soft); color: var(--warn); } .tk-state.is-cancelled { background: var(--surface-3); color: var(--ink-3); }
.tk-state-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ink-3); }
.tk-state-dot.is-open { background: transparent; box-shadow: inset 0 0 0 2px var(--ink-3); } .tk-state-dot.is-doing { background: var(--accent); }
.tk-state-dot.is-waiting { background: var(--warn); } .tk-state-dot.is-done { background: var(--ok); } .tk-state-dot.is-cancelled { background: var(--line-2); }
.tk-prio { display: inline-flex; align-items: center; gap: 4px; font-size: .84em; font-weight: 600; }
.tk-prio .tk-i { width: 13px; height: 13px; fill: currentColor; }
.tk-prio.is-high { color: var(--warn); } .tk-prio.is-urgent { color: var(--bad); }
.tk-prio.is-low, .tk-prio.is-normal { display: none; }
.tk-due { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 7px; color: var(--ink-2); font-size: .86em; white-space: nowrap; }
.tk-due .tk-i { width: 13px; height: 13px; }
.tk-due.is-today { background: var(--soft); color: var(--accent); font-weight: 600; }
.tk-due.is-soon { color: var(--warn); }
.tk-due.is-late { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.tk-due-text.is-late { color: var(--bad); font-weight: 600; } .tk-due-text.is-today { color: var(--accent); font-weight: 600; }
.tk-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: color-mix(in oklab, var(--accent) 18%, var(--surface)); color: var(--accent); font-size: .72em; font-weight: 700; letter-spacing: .02em; }
.tk-avatar.is-sm { width: 22px; height: 22px; font-size: .66em; }
.tk-avatar.is-lg { width: 38px; height: 38px; font-size: .86em; }
.tk-avatar.is-queue { background: var(--surface-3); color: var(--ink-3); } .tk-avatar.is-queue .tk-i { width: 13px; height: 13px; }
.tk-take { min-height: 26px; }

/* Welcome */
.tk-welcome { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 720px; margin: 22px auto; padding: 18px; text-align: center; }
.tk-welcome h3 { margin: 6px 0 0; font-size: 1.5em; letter-spacing: -.01em; }
.tk-welcome > p { margin: 0; max-width: 520px; color: var(--ink-2); font-size: 1.04em; }
.tk-welcome-art { position: relative; width: 140px; height: 110px; }
.tk-orb { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; transform: translate(-50%, -50%) rotate(-6deg); background: var(--flow); color: #fff; box-shadow: 0 16px 34px color-mix(in oklab, var(--accent) 35%, transparent); }
.tk-orb .tk-i { width: 30px; height: 30px; stroke-width: 2.6; }
.tk-welcome-art i { position: absolute; height: 10px; border-radius: 99px; background: var(--surface-3); }
.tk-welcome-art i:nth-of-type(1) { left: 0; top: 18px; width: 46px; } .tk-welcome-art i:nth-of-type(2) { right: 0; top: 50px; width: 38px; background: var(--soft-2); } .tk-welcome-art i:nth-of-type(3) { left: 14px; bottom: 10px; width: 30px; }
.tk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; margin: 8px 0; }
.tk-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: left; }
.tk-tile p { margin: 0; font-size: .92em; }
.tk-tile-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--soft); color: var(--accent); }
.tk-welcome-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Board */
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.tk-col { display: flex; flex-direction: column; min-height: 320px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); }
.tk-col-head { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 12px 8px; font-size: .92em; font-weight: 700; }
.tk-col-head b { color: var(--ink-3); font-weight: 600; }
.tk-col-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 8px; border-radius: 10px; transition: background .15s, box-shadow .15s; }
.tk-col-body.is-over { background: var(--soft); box-shadow: inset 0 0 0 2px var(--ring); }
.tk-col-empty { margin: 8px 4px; padding: 16px 8px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--ink-3); font-size: .9em; text-align: center; }
.tk-col-add { display: flex; align-items: center; gap: 6px; margin: 0 8px 10px; padding: 8px; border: 0; border-radius: 9px; background: none; color: var(--ink-3); font: inherit; cursor: pointer; }
.tk-col-add:hover { background: var(--surface-3); color: var(--ink); }
.tk-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow-1); cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s; }
.tk-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.tk-card.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.tk-card.is-open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.tk-card.is-urgent { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-1); }
.tk-card.is-done .tk-card-title { color: var(--ink-3); text-decoration: line-through; }
.tk-card-top { display: flex; align-items: flex-start; gap: 9px; }
.tk-card-title { flex: 1; min-width: 0; color: inherit; font-weight: 500; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
.tk-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.tk-card-foot > .kit-grow { flex: 1 0 0; } .tk-card-foot > .kit-grow + * { margin-left: auto; } .tk-card { min-width: 0; }
.tk-move { max-width: 26px; height: 26px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378898f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3C/svg%3E") center / 16px no-repeat; color: transparent; appearance: none; cursor: pointer; }
.tk-move:hover, .tk-move:focus-visible { border-color: var(--line-2); background-color: var(--surface-2); }
.tk-move option { color: var(--ink); background: var(--surface); }

/* Team */
.tk-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.tk-person { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-1); }
.tk-person.is-queue { background: linear-gradient(180deg, var(--soft), var(--surface) 70%); border-color: var(--soft-2); }
.tk-person-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tk-person-head > span:not(.tk-avatar) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tk-person-head b { font-size: 1.04em; }
.tk-person-head > .tk-i { color: var(--ink-3); transition: transform .15s; } .tk-person-head:hover > .tk-i { transform: translateX(3px); color: var(--accent); }
.tk-load { display: block; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.tk-load i { display: block; height: 100%; border-radius: inherit; background: var(--flow); }
.tk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tk-stats span { display: flex; flex-direction: column; padding: 7px 9px; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); font-size: .82em; }
.tk-stats b { color: var(--ink); font-size: 1.45em; font-weight: 700; line-height: 1.2; }
.tk-stats .is-late { background: var(--bad-soft); color: var(--bad); } .tk-stats .is-late b { color: var(--bad); }
.tk-nexts { display: flex; flex-direction: column; }
.tk-next { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: .94em; }
.tk-next:hover { color: var(--accent); }

/* Drawer */
.tk-drawer { display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 100px); position: sticky; top: 0; border-left: 1px solid var(--line); background: var(--surface); animation: tk-slide .2s ease-out; }
.tk-drawer-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tk-seg.is-status button { padding: 0 9px; }
.tk-seg.is-status button.is-on.is-done { background: var(--ok); color: #fff; }
.tk-seg.is-status button.is-on.is-done .tk-state-dot { background: #fff; }
.tk-drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.tk-d-title { display: flex; align-items: flex-start; gap: 10px; }
.tk-d-title .tk-check { width: 26px; height: 26px; margin-top: 4px; }
.tk-d-title-input { flex: 1; min-width: 0; padding: 2px 6px; margin: 0 -6px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 1.38em; font-weight: 650; line-height: 1.3; resize: none; overflow: hidden; field-sizing: content; }
.tk-d-title-input:hover { border-color: var(--line); } .tk-d-title-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.tk-d-made { margin: -8px 0 0 36px; font-size: .86em; }
.tk-fields { display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.tk-field { display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 40px; padding: 2px 6px; }
.tk-field label { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .92em; }
.tk-field label .tk-i { color: var(--ink-3); }
.tk-field-control { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tk-field .kit-input { min-height: 32px; padding: 4px 8px; border-color: transparent; background: transparent; }
.tk-field .kit-input:hover:not(:disabled) { border-color: var(--line-2); background: var(--surface); }
.tk-field .kit-input:focus { background: var(--surface); }
.tk-due-inputs { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tk-due-inputs .kit-input { flex: 1.5 1 0; min-width: 0; } .tk-due-inputs input[type="time"] { flex: 1 1 0; max-width: 112px; }
.tk-due-inputs .kit-btn { flex: none; }
.tk-inline { display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; color: var(--ink-2); font-size: .88em; }
.tk-inline input { accent-color: var(--accent); }
.tk-d-sec { display: flex; flex-direction: column; gap: 8px; }
.tk-d-sec h4 { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; color: var(--ink-2); font-size: .8em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tk-d-sec h4 b { margin-left: auto; letter-spacing: 0; }
.tk-links { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-link { display: inline-flex; align-items: center; max-width: 100%; border-radius: 8px; background: var(--soft); color: var(--accent); font-size: .92em; }
.tk-link a, .tk-link > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 4px 4px 9px; color: inherit; text-decoration: none; }
.tk-link a:hover { text-decoration: underline; }
.tk-link button { display: grid; place-items: center; width: 24px; height: 26px; padding: 0; border: 0; border-radius: 0 8px 8px 0; background: none; color: inherit; opacity: .6; cursor: pointer; }
.tk-link button:hover { opacity: 1; background: var(--soft-2); }
.tk-link button .tk-i { width: 12px; height: 12px; }
.tk-picker { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.tk-picker-list { display: flex; flex-direction: column; max-height: 220px; overflow-y: auto; }
.tk-pick-row { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tk-pick-row:hover, .tk-pick-row:focus-visible { background: var(--surface); }
.tk-pick-row span { display: flex; flex-direction: column; }
.tk-notes { min-height: 76px; resize: vertical; line-height: 1.5; }
.tk-progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.tk-progress i { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width .3s; }
.tk-cls { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.tk-cl { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 8px; }
.tk-cl:hover { background: var(--surface-2); }
.tk-cl label { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 30px; cursor: pointer; }
.tk-cl input { width: 16px; height: 16px; accent-color: var(--ok); }
.tk-cl.is-done span { color: var(--ink-3); text-decoration: line-through; }
.tk-cl-x { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--ink-3); opacity: 0; cursor: pointer; }
.tk-cl:hover .tk-cl-x, .tk-cl-x:focus-visible { opacity: 1; } .tk-cl-x:hover { background: var(--bad-soft); color: var(--bad); }
.tk-cl-add { display: flex; align-items: center; gap: 9px; padding: 3px 4px; color: var(--ink-3); }
.tk-cl-add input { flex: 1; min-height: 30px; border: 0; border-bottom: 1px solid transparent; outline: 0; background: none; color: var(--ink); font: inherit; }
.tk-cl-add input:focus { border-bottom-color: var(--accent); }
.tk-thread { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tk-comment { display: flex; gap: 9px; }
.tk-comment > div { flex: 1; min-width: 0; padding: 8px 11px; border-radius: 4px 12px 12px 12px; background: var(--surface-2); }
.tk-comment p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-comment-by { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px !important; font-size: .9em; }
.tk-reply { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tk-reply textarea { resize: vertical; }
.tk-history summary { list-style: none; cursor: pointer; } .tk-history summary::-webkit-details-marker { display: none; }
.tk-history summary h4::after { content: ''; width: 7px; height: 7px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.tk-history[open] summary h4::after { transform: rotate(45deg); }
.tk-history ul { position: relative; display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; padding: 0 0 0 16px; list-style: none; font-size: .9em; }
.tk-history ul::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tk-history li { position: relative; display: flex; gap: 8px; color: var(--ink-2); }
.tk-hist-dot { position: absolute; left: -16px; top: 5px; width: 10px; height: 10px; border: 2px solid var(--surface); border-radius: 50%; background: var(--ink-3); }
.tk-d-foot { display: flex; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }

/* Dialogs */
.tk-new .kit-dialog-body, .tk-settings .kit-dialog-body { display: flex; flex-direction: column; gap: 14px; }
.tk-new-body { display: flex; flex-direction: column; gap: 14px; }
.tk-new-title { width: 100%; padding: 4px 0; border: 0; border-bottom: 2px solid var(--line); outline: 0; background: none; color: var(--ink); font: inherit; font-size: 1.3em; font-weight: 600; resize: none; transition: border-color .15s; }
.tk-new-title:focus { border-bottom-color: var(--accent); }
.tk-new-row { display: flex; flex-direction: column; gap: 7px; }
.tk-new-label { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: .9em; font-weight: 600; }
.tk-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-chip-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink); font: inherit; font-size: .92em; cursor: pointer; transition: all .15s; }
.tk-chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.tk-chip-btn.is-on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.tk-chip-btn.is-on .kit-faint { color: inherit; opacity: .8; }
.tk-new-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.tk-new-grid .is-wide { grid-column: 1 / -1; }
.tk-add-notes { align-self: flex-start; }
.tk-links.is-static .tk-tag { height: 26px; font-size: .9em; }
.tk-new-hint { display: none; } @media (hover: hover) { .tk-new-hint { display: inline; } }
.tk-set { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.tk-set h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.02em; }
.tk-set h4 .tk-i { color: var(--accent); }
.tk-set > p { margin: 0; }
.tk-set-label { margin: 4px 0 0; color: var(--ink-2); font-size: .9em; font-weight: 600; }
.tk-people { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-person-pick { display: inline-flex; align-items: center; gap: 7px; max-width: 220px; padding: 4px 10px 4px 5px; border: 1px solid var(--line-2); border-radius: 99px; cursor: pointer; transition: all .15s; }
.tk-person-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tk-person-pick:has(input:checked) { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.tk-person-pick:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--ring); }
.tk-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.tk-switch input { position: absolute; opacity: 0; pointer-events: none; }
.tk-switch-ui { position: relative; width: 36px; height: 21px; flex: none; border-radius: 99px; background: var(--line-2); transition: background .15s; }
.tk-switch-ui::after { content: ''; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.tk-switch input:checked + .tk-switch-ui { background: var(--accent); }
.tk-switch input:checked + .tk-switch-ui::after { transform: translateX(15px); }
.tk-switch input:focus-visible + .tk-switch-ui { box-shadow: 0 0 0 3px var(--ring); }
.tk-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.tk-swatches legend { margin-bottom: 6px; color: var(--ink-2); font-size: .9em; }
.tk-swatch { position: relative; cursor: pointer; }
.tk-swatch input { position: absolute; opacity: 0; }
.tk-swatch i { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--tk-c); transition: box-shadow .15s, transform .15s; }
.tk-swatch input:checked + i { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--tk-c); }
.tk-swatch input:focus-visible + i { transform: scale(1.12); }
.tk-keylist { display: grid; gap: 4px; margin: 0; }
.tk-keylist div { display: flex; align-items: center; gap: 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tk-keylist dt { min-width: 76px; } .tk-keylist dd { margin: 0; color: var(--ink-2); }

/* Contact block, Agenda strip, conversation button */
.tk-embed { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tk-embed-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tk-embed-head h3 { margin: 0; font-size: 1em; }
.tk-embed-head > .tk-i { color: var(--accent); }
.tk-embed-body { padding: 6px 8px 8px; }
.tk-embed-sub { margin: 8px 6px 2px; color: var(--ink-3); font-size: .78em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tk-embed-empty { margin: 8px 6px; }
.tk-minis { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.tk-mini { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 9px; }
.tk-mini:hover { background: var(--surface-2); }
.tk-mini.is-done .tk-mini-main > span { color: var(--ink-3); text-decoration: line-through; }
.tk-mini-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.tk-mini-main small { font-size: .84em; }
.tk-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.tk-strip.is-empty, .tk-strip:empty { display: none; }
.tk-strip-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--ink-2); font-size: .88em; font-weight: 600; }
.tk-strip-label .tk-i { color: var(--accent); }
.tk-strip-item { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font-size: .9em; text-decoration: none; transition: border-color .15s; }
.tk-strip-item:hover { border-color: var(--accent); }
.tk-strip-item b { color: var(--accent); }
.tk-strip-item.is-late { border-color: var(--bad-line); background: var(--bad-soft); } .tk-strip-item.is-late b { color: var(--bad); }
.tk-strip-more { color: var(--accent); font-size: .9em; }

@keyframes tk-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes tk-fresh { 0% { background: color-mix(in oklab, var(--accent) 18%, var(--surface)); } 100% { background: transparent; } }
@keyframes tk-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tk-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tk-app *, .tk-embed *, .kit-dialog * { animation: none !important; transition: none !important; } }

/* Narrower: the drawer covers the list */
@media (max-width: 1180px) {
  .tk-shell.has-drawer { grid-template-columns: 232px minmax(0, 1fr); }
  .tk-shell.has-drawer .tk-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 92%); max-height: none; box-shadow: var(--shadow-3); z-index: 5; }
}
/* Phone: views become a scrolling row, the drawer is full screen */
@media (max-width: 760px) {
  .tk-shell, .tk-shell.has-drawer { grid-template-columns: minmax(0, 1fr); border-radius: 0; border-left: 0; border-right: 0; }
  .tk-rail { flex-direction: row; align-items: center; gap: 4px; padding: 8px 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .tk-navs { flex-direction: row; gap: 4px; }
  .tk-nav { width: auto; white-space: nowrap; border-radius: 99px; padding: 0 12px; }
  .tk-nav.is-on { box-shadow: var(--shadow-1); }
  .tk-rail-head { margin: 0 0 0 6px; padding: 0; } .tk-rail-head > span, .tk-keys, .tk-rail-empty { display: none; }
  .tk-head { padding: 14px 14px 10px; } .tk-title h2 { font-size: 1.3em; } .tk-title-icon { display: none; }
  .tk-head-acts { width: 100%; } .tk-search { flex: 1; width: auto; }
  .tk-quick, .tk-bulk { margin-left: 14px; margin-right: 14px; } .tk-quick-hint { display: none; }
  .tk-body { padding: 0 14px 20px; }
  .tk-row { flex-wrap: wrap; padding-left: 10px; } .tk-pick { display: none; }
  .tk-row-main { flex-basis: calc(100% - 40px); }
  .tk-row-end { width: 100%; padding-left: 32px; justify-content: flex-start; }
  .tk-row-end .tk-avatar { margin-left: auto; }
  .tk-tiles, .tk-new-grid { grid-template-columns: 1fr; }
  .tk-board { grid-template-columns: repeat(4, 82%); scroll-snap-type: x mandatory; } .tk-col { scroll-snap-align: start; }
  .tk-shell.has-drawer .tk-drawer { position: fixed; inset: 0; width: auto; max-height: none; z-index: 60; border-left: 0; }
  .tk-field { grid-template-columns: 100px minmax(0, 1fr); }
  .tk-seg.is-status button span { display: none; } .tk-seg.is-status button.is-on span { display: inline; }
}

/* The Task button in the conversation header */
.tk-conv-btn { display: inline-flex; align-items: center; gap: 6px; }
.tk-conv-btn svg { width: 15px; height: 15px; flex: none; }

:root{--brand-blue-ink:#111111;--brand-blue-button:#787a00;--brand-blue-button-hover:#666800;}
