/* Workspace components: neutral surfaces, clear hierarchy, restrained brand accents. */
:root {
  --ink: #263044;
  --muted: #647084;
  --navy: #253960;
  --navy-deep: #14213a;
  --gold: #e0bd72;
  --gold-dark: #806025;
  --line: #e2e5ea;
  --canvas: #f7f8fa;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px #18283e06;
  --surface-subtle: #f0f2f5;
  --text-2xs: .75rem;
}

.topbar { position: sticky; top: 0; z-index: 20; height: 60px; background: #fff; box-shadow: none; }
main#main { padding-top: 20px; }
.preview-note { border: 0; background: transparent; padding: 0; margin-bottom: 18px; font-size: 11px; color: #737e8f; }
.preview-note span { color: #818996; }
.page-heading { margin-bottom: 22px; gap: 20px; }
.page-heading .eyebrow { display: none; }
.page-heading h1 { font-size: 27px; letter-spacing: -.035em; font-weight: 650; }
.page-heading p { color: var(--muted); font-size: 13px; margin-top: 7px; }
.eyebrow { color: var(--muted); letter-spacing: .07em; }
.button { box-shadow: none; font-weight: 600; }
.button.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.button.primary:hover { background: #172a4d; border-color: #172a4d; }
.button.secondary { background: #fff; color: #43516a; border-color: #dbe0e7; }
.button.secondary:hover { background: #f4f6f9; border-color: #adb8c8; }
.button.navy { background: var(--navy); border-color: var(--navy); }
.panel { border-color: var(--line); box-shadow: none; }
.panel-heading { background: #fff; }
.profile .avatar,.topbar .avatar { background: #ece4d0; color: #725823; }
.sidebar-note { display: none; }
.sidebar .brand { margin-bottom: 20px; }
.sidebar .workspace-label { font-size: 10px; margin-bottom: 10px; }
.nav-link.active { background: #ffffff0e; color: #fff; box-shadow: inset 2px 0 var(--gold); }
.nav-link.active svg { color: var(--gold); }
.nav-section { color: #90a0bb; font-size: 10px; }
.sidebar .profile { border-color: #ffffff14; }
.text-link { font-weight: 550; }
.product,.product-food,.product-agro,.product-pet,.product-agenda,.product-clinica { background: #f0f2f5; color: #536077; font-weight: 550; font-size: 11px; padding: 3px 7px; }
.stage-dot,.bar-fill,.stage-lead,.stage-sold,.stage-license { background: #8795ab; }
.stage-first_contact,.stage-implementing { background: #5c7396; }
.stage-completed { background: #a38953; }
.number-pill { color: #566174; background: #edf0f4; font-size: 12px; border-radius: 5px; }
.badge { font-size: 11px; }
.badge.danger { background: #fbeeee; color: #a53b40; }
.badge.amber { background: #f8f2e7; color: #8a6523; }
.badge.blue { background: #eef2f7; color: #4f6587; }
.outcome { font-size: 12px; color: #7f612d; }
.outcome-unhappy { color: #a53b40; }
.tabs { gap: 24px; margin-bottom: 18px; }
.tabs a { padding: 14px 2px; font-size: 13px; }
.tabs a.active { border-bottom-width: 2px; border-bottom-color: var(--navy); }

/* Action queue. Each group is an independent, keyboard-operable disclosure. */
.attention { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: none; margin-bottom: 20px; overflow: hidden; }
.attention-group { padding: 0; margin: 0; border: 0; }
.attention-group + .attention-group,.queue-clear + .attention-group { border-top: 1px solid var(--line); }
.attention-group > .queue-summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; list-style: none; cursor: pointer; background: #fff; border: 0; color: var(--ink); }
.queue-summary::-webkit-details-marker { display: none; }
.attention-group[open] > .queue-summary { margin-bottom: 0; }
.attention-group > .queue-summary:hover { background: #fafbfc; color: var(--ink); }
.queue-summary:focus-visible { outline: 2px solid var(--navy); outline-offset: -3px; border-radius: 8px; }
.queue-symbol { width: 34px; height: 34px; border-radius: 8px; background: #f4f0e7; color: #92743d; display: grid; place-items: center; flex-shrink: 0; }
.queue-symbol svg { width: 17px; height: 17px; }
.commercial-group .queue-symbol { background: #f0f3f7; color: #61738e; }
.queue-heading { flex: 1; min-width: 0; }
.queue-heading > strong { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; line-height: 1.6; }
.queue-heading > span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.5; }
.attention .number-pill { background: #edf0f4; color: #4b5b73; }
.queue-toggle { display: flex; align-items: center; gap: 9px; color: #52627c; font-size: 12px; font-weight: 500; flex-shrink: 0; }
.queue-toggle svg { width: 14px; height: 14px; transition: transform .15s; }
.attention-group[open] > summary .queue-toggle svg { transform: rotate(90deg); }
.attention-group .when-open { display: none; }
.attention-group[open] > summary .when-open { display: inline; }
.attention-group[open] > summary .when-closed { display: none; }
.queue-list { padding: 0 18px; border-top: 1px solid var(--line); }
.queue-row { display: grid; grid-template-columns: minmax(160px,1.35fr) minmax(135px,1fr) minmax(140px,1fr) auto; gap: 18px; align-items: center; padding: 14px 0; }
.queue-row + .queue-row { border-top: 1px solid #edf0f3; }
.queue-client { min-width: 0; }
.queue-client strong { font-size: 13px; font-weight: 600; display: block; overflow-wrap: anywhere; }
.queue-client small { font-size: 12px; color: var(--muted); line-height: 1.5; display: block; margin-top: 4px; }
.queue-status { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.queue-owner { display: flex; align-items: center; gap: 9px; color: #49576e; font-size: 12px; min-width: 0; }
.queue-owner > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.queue-owner small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.queue-action { justify-self: end; }
.queue-action .button { white-space: nowrap; font-size: 12px; }
.queue-footer { display: flex; justify-content: space-between; align-items: center; padding: 11px 18px; border-top: 1px solid var(--line); gap: 12px; color: var(--muted); font-size: 12px; background: #fcfcfd; }
.queue-footer .text-link { font-size: 12px; }
.commercial-row { grid-template-columns: minmax(160px,.9fr) minmax(200px,1.8fr) auto; }
.queue-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.queue-clear { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; font-size: 13px; }
.queue-clear > span { display: flex; align-items: center; gap: 9px; }
.queue-clear svg { width: 16px; height: 16px; color: #537567; }
.queue-clear .text-link { font-size: 12px; }

/* Sales workspace: dense CRM board inspired by the supplied RD Station references. */
[data-page="kanban"] { background: #fff; }
[data-page="kanban"] main#main { max-width: none; padding-inline: 22px; }
[data-page="kanban"] .page-heading { margin-bottom: 16px; }
[data-page="kanban"] .page-heading h1 { font-size: 22px; font-weight: 600; }
[data-page="kanban"] .page-heading p { font-size: 12px; margin-top: 5px; }
[data-page="kanban"] .heading-actions .button { min-height: 34px; padding: 7px 12px; font-size: 12px; border-radius: 4px; }
[data-page="kanban"] .attention { border-radius: 4px; margin-bottom: 16px; }
[data-page="kanban"] .queue-summary { padding: 10px 12px; }
[data-page="kanban"] .queue-symbol { width: 28px; height: 28px; border-radius: 4px; }
[data-page="kanban"] .queue-heading > strong { font-size: 12px; }
[data-page="kanban"] .queue-heading > span { font-size: 11px; }
[data-page="kanban"] .queue-toggle { font-size: 11px; }
[data-page="kanban"] .filters { padding: 0; margin-bottom: 12px; background: transparent; border: 0; box-shadow: none; gap: 8px; }
[data-page="kanban"] .filters select { min-width: 150px; }
[data-page="kanban"] .filters input,[data-page="kanban"] .filters select,[data-page="kanban"] .filters .button { min-height: 35px; border-radius: 4px; font-size: 12px; padding-block: 7px; }
[data-page="kanban"] .search-field svg { top: 9px; }
.board-meta { margin-bottom: 10px; color: #667288; font-size: 12px; gap: 12px; }
.board-meta strong { font-weight: 650; color: var(--ink); }
.board-navigation { display: flex; gap: 5px; align-items: center; }
.board-navigation > span { font-size: 11px; margin-right: 10px; }
.board-navigation .icon-button { border: 1px solid #dfe4eb; background: #fff; width: 30px; height: 30px; }
.board-navigation [data-board-scroll="-1"] svg { transform: rotate(180deg); }
.board-navigation .icon-button:hover { background: #eaf0f7; border-color: #b6c3d6; }
.board { gap: 10px; grid-auto-columns: 250px; height: max(440px,calc(100dvh - 316px)); min-height: 440px; padding: 1px 1px 13px; scroll-padding-inline: 1px; scrollbar-color: #b9c2ce #edf0f4; scroll-margin-top: 76px; }
.kanban-column { padding: 0 5px 5px; background: #f0f1f3; border-radius: 4px; border: 1px solid #e4e7eb; }
.column-sector { color: #738093; margin: 11px 5px 4px; font-size: 9px; font-weight: 550; letter-spacing: .05em; }
.kanban-column > header { padding: 0 5px 10px; min-height: 33px; align-items: flex-start; }
.kanban-column > header .stage-dot { margin-top: 5px; width: 5px; height: 5px; border-radius: 1px; }
.kanban-column > header h2 { color: #4a5567; font-size: 12px; line-height: 1.5; font-weight: 600; }
.column-count { background: #e3e6eb; color: #69758a; font-size: 10px; min-width: 20px; height: 19px; border-radius: 3px; }
.column-cards { padding: 1px 0 7px; gap: 6px; }
.client-card { border-color: #e1e5ea; padding: 10px 9px 0; border-radius: 3px; box-shadow: none; }
.client-card:hover { border-color: #a8b8cc; box-shadow: 0 3px 10px #182c490b; }
.card-top { margin-bottom: 5px; gap: 5px; }
.card-top .product { margin-left: auto; padding: 2px 4px; font-size: 10px; border-radius: 3px; }
.card-top > a { display: flex; color: #7b899d; }
.card-top > a svg { width: 13px; height: 13px; }
.card-id { font-size: 10px; color: #818b9a; }
.drag-handle { color: #78869a; width: 19px; height: 21px; }
.card-company { color: #2f3b4f; font-size: 13px; font-weight: 650; line-height: 1.4; }
.client-card .card-contact { display: block; margin: 3px 0 7px; font-size: 11px; color: #747e8d; }
.card-top .temperature-badge { margin: 0; font-size: 10px; font-weight: 500; border-radius: 2px; padding: 2px 4px; }
.card-phone { margin: 7px 0; font-size: 11px; color: #647185; }
.card-phone svg { color: #8895a8; width: 13px; height: 13px; }
.card-observation { background: #f6f7f9; border-left: 2px solid #c3ccda; color: #68758a!important; font-size: 11px!important; }
.card-note-preview { border-top: 0; background: #f8f9fa; border-radius: 3px; padding: 6px 7px; margin: 7px 0 6px; }
.card-note-preview strong { display: flex; align-items: center; gap: 5px; font-size: 10px; letter-spacing: 0; color: #758196; }
.card-note-preview strong svg { width: 11px; height: 11px; }
.card-note-preview span { color: #5c6a80; font-size: 11px; line-height: 1.5; }
.card-tools { display: flex; align-items: center; gap: 3px; padding: 3px; margin: 8px -6px 3px; background: #f1f3f5; border-radius: 2px; }
.card-tools .text-link,.card-note-button,.card-move { font-size: 11px; color: #4f6078; }
.card-tools .text-link { padding: 5px 3px; white-space: nowrap; }
.card-note-button,.card-move { min-height: 27px; padding: 4px; }
.card-note-button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.card-owner { display: flex; gap: 6px; align-items: center; padding: 3px 0; font-size: 11px; color: #68758b; }
.card-owner .tiny-avatar { width: 19px; height: 19px; font-size: 8px; }
.card-owner .card-id { margin-left: auto; }
.card-owner-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiny-avatar { background: #eaf0f7; color: #5a7093; width: 24px; height: 24px; font-size: 9px; flex-shrink: 0; }
.card-completed { color: #596f64; font-size: 10px; margin-top: 6px; padding-top: 6px; }
.card-appointment { background: transparent; color: #526b92; font-size: 11px; padding: 4px 0; border: 0; }
.column-empty { display: flex; flex-direction: column; gap: 10px; border: 1px dashed #ccd4df; background: #ffffff50; min-height: 130px; color: #66758c; font-size: 12px; }
.column-empty > svg { width: 21px; height: 21px; color: #91a0b4; }
.column-empty small { display: block; margin-top: 5px; font-size: 11px; color: #8591a2; }
.kanban-column.drop-target { background: #e8eef7; border-color: #8ca4c7; box-shadow: inset 0 0 0 1px #8ca4c7; }
.drop-target .column-count { background: #d1def0; color: #3d5e8d; }
.drop-target .column-empty { background: #f6f9fd; border-color: #6c8ebd; color: #3c5d8c; }
.client-card.drag-preview { border-color: #6f8db5; transform: rotate(.8deg); box-shadow: 0 14px 36px #172a4b26; }
.insert-before:before,.insert-after:after { background: #587daf; box-shadow: 0 0 0 2px #e8eef7; }

/* Customer success is a work queue with a clear primary action. */
.classification-menu { position: fixed; z-index: 100; width: 178px; max-width: calc(100vw - 16px); padding: 5px; border: 1px solid #dce2e9; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px #18283e26; animation: classification-reveal .12s ease-out; }
.classification-menu [role="menuitemradio"] { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 36px; padding: 6px 8px; border: 0; border-radius: 4px; background: #fff; color: var(--navy); text-align: left; }
.classification-menu [role="menuitemradio"]:hover,.classification-menu [role="menuitemradio"]:focus-visible { background: #f0f3f8; outline: none; }
.classification-menu .temperature-badge { margin: 0; font-size: 12px; }
.classification-check { display: flex; visibility: hidden; }
.classification-check svg { width: 15px; height: 15px; }
.classification-menu [aria-checked="true"] .classification-check { visibility: visible; }
[data-classify][aria-expanded="true"] { outline: 2px solid #8b9fbc; outline-offset: 2px; }
@keyframes classification-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion:reduce) { .classification-menu { animation: none; } }
[data-page="followups"] .filters { margin-bottom: 20px; }
.followup-panel .panel-heading { padding: 20px; }
.followup-panel .panel-heading h2 { font-size: 15px; }
.followup-panel table th { background: #f8f9fb; color: #6a7588; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; padding-top: 12px; padding-bottom: 12px; }
.followup-panel table td { padding-top: 19px; padding-bottom: 19px; font-size: 13px; }
.followup-panel td strong { font-weight: 600; }
.followup-panel td small { font-size: 12px; margin-top: 6px; }
.followup-panel tbody tr:hover { background: #fafbfc; }
.followup-panel .button { white-space: nowrap; }
.contact-workspace { grid-template-columns: minmax(250px,.8fr) minmax(380px,1.4fr); gap: 24px; }
.contact-workspace .panel { padding: 24px; }
.contact-workspace h2 { font-size: 19px; font-weight: 650; margin-top: 8px; }
.contact-identity .client-facts { gap: 0; }
.contact-identity .client-facts > div { border-bottom: 1px solid #eef0f4; padding: 12px 0; }
.contact-identity .client-facts > div:last-child { border: 0; }
.contact-editor .form-stack { gap: 20px; }
.contact-editor textarea { min-height: 150px; }
.contact-editor .form-help { line-height: 1.7; background: #f7f8fa; border-radius: 6px; padding: 12px; }
.detail-summary { background: transparent; border: 0; padding: 0 0 18px; gap: 16px; }
.metric { box-shadow: none; border-radius: 9px; }
.metric-value { font-size: 30px; }
.page-footer { margin-top: 24px; }

@media (min-width:1600px) {
  .board { grid-auto-columns: minmax(250px,1fr); }
}
@media (min-width:1001px) {
  [data-page="kanban"] .attention:not(:has([open])):has(> .attention-group + .attention-group) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  [data-page="kanban"] .attention:not(:has([open])) > .attention-group + .attention-group { border-top: 0; border-left: 1px solid var(--line); }
}
@media (max-width:1100px) {
  .queue-row { grid-template-columns: minmax(155px,1.3fr) minmax(125px,1fr) auto; gap: 14px; }
  .queue-owner { grid-column: 1; grid-row: 2; }
  .queue-action { grid-column: 3; grid-row: 1 / 3; }
  .queue-status { grid-column: 2; grid-row: 1 / 3; }
  .commercial-row { grid-template-columns: minmax(160px,1fr) auto; }
  .commercial-row .queue-note { grid-column: 1; grid-row: 2; }
  .commercial-row .queue-action { grid-column: 2; }
  .contact-workspace { grid-template-columns: 1fr; }
  .board-navigation > span { display: none; }
}
@media (max-width:760px) {
  main#main { padding-top: 16px; }
  [data-page="kanban"] main#main { padding-inline: 16px; }
  .topbar { height: 56px; }
  .page-heading { align-items: flex-start; margin-bottom: 18px; }
  .page-heading h1 { font-size: 24px; }
  .preview-note { margin-bottom: 16px; }
  .preview-note span { display: none; }
  .attention { border-radius: 8px; margin-bottom: 18px; }
  .attention-group > .queue-summary { padding: 13px 12px; gap: 9px; }
  .queue-symbol { width: 30px; height: 30px; }
  .queue-heading > strong { font-size: 12px; gap: 6px; }
  .queue-heading > span { font-size: 11px; }
  .queue-toggle > span { display: none!important; }
  .queue-list { padding: 0 12px; }
  .queue-row { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 14px 0; }
  .queue-client { grid-column: 1 / -1; }
  .queue-status { grid-column: 1; grid-row: 2; }
  .queue-owner { grid-column: 1; grid-row: 3; }
  .queue-action { grid-column: 2; grid-row: 2 / 4; }
  .queue-action .button { padding: 8px 10px; }
  .queue-footer { padding: 12px; align-items: flex-start; flex-wrap: wrap; font-size: 11px; }
  .commercial-row .queue-note { grid-column: 1 / -1; grid-row: 2; }
  .commercial-row .queue-action { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .queue-clear { flex-wrap: wrap; padding: 12px; font-size: 12px; }
  [data-page="kanban"] .heading-actions { width: 100%; }
  [data-page="kanban"] .heading-actions .button { flex: 1; }
  [data-page="kanban"] .filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
  [data-page="kanban"] .filters .search-field { grid-column: 1 / -1; width: 100%; min-width: 0; }
  [data-page="kanban"] .filters select { min-width: 0; width: 100%; }
  .board-meta { flex-direction: row; align-items: center; }
  .board { grid-auto-columns: min(270px,calc(100vw - 54px)); height: 620px; min-height: 460px; gap: 8px; }
  .contact-workspace { gap: 16px; }
  .contact-workspace .panel { padding: 18px; }
  .detail-summary { gap: 12px; }
  .followup-panel .table-scroll { overflow: visible; }
  .followup-panel table,.followup-panel tbody { display: block; min-width: 0; }
  .followup-panel thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .followup-panel tbody tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px 12px; padding: 18px; border-top: 1px solid var(--line); }
  .followup-panel tbody td { display: block; border: 0; padding: 0; min-width: 0; font-size: 12px; }
  .followup-panel td:first-child { grid-column: 1 / -1; }
  .followup-panel td:first-child strong { font-size: 15px; }
  .followup-panel td:nth-child(2)::before { content: 'Contato previsto'; }
  .followup-panel td:nth-child(3)::before { content: 'Situação'; }
  .followup-panel td:nth-child(4)::before { content: 'Responsável'; }
  .followup-panel td:nth-child(n+2):nth-child(-n+4)::before { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
  .followup-panel td:last-child { align-self: end; justify-self: end; }
  .followup-panel td .button { font-size: 11px; padding: 8px 10px; }
}
@media (prefers-reduced-motion:reduce) {
  .queue-toggle svg { transition: none; }
}
