/* Nexo CRM — components.css consolidado
   Base limpa após v0.2.0a.
   Sem histórico de fixes por versão; manter este ficheiro como fonte principal dos componentes. */

.grid {
    display: grid;
    gap: 20px;
}

.metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.two-columns > .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.two-columns > .card .list-stack,
.two-columns > .card .empty-state {
    flex: 1;
}

.clients-layout {
    grid-template-columns: minmax(340px, 0.75fr) minmax(0, 1.25fr);
}

.card,
.metric-card {
    border: 1px solid rgba(221, 235, 221, 0.95);
    background: rgba(255, 255, 255, 0.88);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.card-header .eyebrow {
    margin-bottom: 10px;
}

.metric-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -52px;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: rgba(133, 187, 57, 0.12);
}

.metric-card span,
.metric-card strong,
.metric-card small {
    position: relative;
    z-index: 1;
    display: block;
}

.metric-warning::after {
    background: rgba(253, 228, 54, 0.28);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: var(--green-800);
    box-shadow: 0 12px 26px rgba(28, 88, 27, 0.18);
}

.btn-primary:hover {
    background: var(--green-700);
}

.btn-secondary {
    color: var(--green-800);
    background: #fff;
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--green-400);
    box-shadow: 0 10px 24px rgba(16, 32, 24, 0.08);
}

.btn-danger {
    color: var(--danger);
    background: #fff;
    border-color: rgba(180, 35, 24, 0.22);
}

.btn-danger:hover {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 10px 24px rgba(180, 35, 24, 0.14);
}

.inline-delete-form {
    display: inline-flex;
    margin: 0;
}

.btn-full {
    width: 100%;
}

.badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--yellow);
}

.alert {
    margin-bottom: 16px;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-weight: 650;
}

.alert-success {
    border-color: rgba(28, 124, 62, 0.22);
    background: var(--success-soft);
    color: var(--success);
}

.alert-error {
    border-color: rgba(180, 35, 24, 0.18);
    background: var(--danger-soft);
    color: var(--danger);
}

.form-stack,
.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 4px rgba(133, 187, 57, 0.14);
    background: #fff;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.search-form input {
    flex: 1;
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

tr:last-child td {
    border-bottom: 0;
}

td strong {
    color: var(--green-900);
}

.empty-state.compact {
    padding: 20px;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--green-900);
    font-size: 1.02rem;
}

.empty-state p {
    margin-bottom: 16px;
}

.list-row:hover {
    border-color: var(--green-400);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(16, 32, 24, 0.06);
}

.list-row strong,
.list-row small {
    display: block;
}

.list-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.86rem;
}

.details-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.details-list div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.details-list dt {
    color: var(--green-800);
    font-size: 0.82rem;
    font-weight: 850;
}

.details-list dd {
    margin: 3px 0 0;
    color: var(--text);
    word-break: break-word;
}

.status-dot.fail {
    background: var(--danger);
}

.status-row strong,
.status-row small {
    display: block;
}

.client-summary-grid {
    margin-bottom: 2px;
}

.client-filters {
    align-items: center;
}

.client-filters select {
    max-width: 190px;
}

.table-action {
    width: 1%;
    white-space: nowrap;
}

.client-name-cell,
.client-contact {
    display: grid;
    gap: 3px;
}

.client-name-cell small,
.client-contact small {
    color: var(--muted);
}

.client-contact span {
    color: var(--green-900);
    font-weight: 750;
}

.badge-lead {
    background: #fff;
}

.badge-prospect {
    background: var(--warning-soft);
    border-color: rgba(253, 228, 54, 0.7);
}

.badge-client {
    background: var(--success-soft);
    border-color: rgba(28, 124, 62, 0.18);
    color: var(--success);
}

.badge-ex_client {
    background: #F4F6F4;
    color: var(--muted);
}

.client-hero-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 26px;
    border: 1px solid rgba(221, 235, 221, 0.95);
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at top right, rgba(253, 228, 54, 0.23), transparent 38%),
        rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.client-hero-card h2 {
    font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.client-hero-card p {
    margin: 10px 0 0;
}

.client-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.client-side-stack {
    display: grid;
    gap: 20px;
}

.mini-timeline {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.mini-timeline div {
    position: relative;
    padding: 12px 12px 12px 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.mini-timeline div::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 17px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green-400);
    box-shadow: 0 0 0 4px rgba(133, 187, 57, 0.14);
}

.mini-timeline strong,
.mini-timeline small {
    display: block;
}

.today-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: radial-gradient(circle at top right, rgba(253, 228, 54, 0.28), transparent 42%),
        rgba(255, 255, 255, 0.9);
}

.today-hero p {
    max-width: 720px;
    margin-bottom: 0;
}

.roadmap-mini {
    display: grid;
    gap: 10px;
}

.roadmap-mini div {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.roadmap-mini strong,
.roadmap-mini small {
    display: block;
}

.roadmap-mini .is-done {
    border-color: rgba(28, 124, 62, 0.18);
    background: var(--success-soft);
}

.roadmap-mini .is-active {
    border-color: rgba(253, 228, 54, 0.72);
    background: var(--warning-soft);
}

.flow-card {
    overflow: hidden;
}

.flow-composer {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.flow-composer textarea {
    min-height: 128px;
    resize: vertical;
}

.flow-timeline {
    position: relative;
    display: grid;
    gap: 12px;
}

.flow-entry {
    position: relative;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: radial-gradient(circle at top right, rgba(253, 228, 54, 0.10), transparent 42%),
        #fff;
}

.flow-entry.is-system {
    background: #F9FCF8;
}

.flow-entry-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.flow-entry-head strong {
    color: var(--green-900);
}

.flow-entry-head small {
    flex: 0 0 auto;
    font-size: 0.78rem;
}

.flow-entry-content {
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.65;
    white-space: normal;
}

.flow-entry-foot {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.empty-state code {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(16, 32, 24, 0.06);
    color: var(--green-900);
    font-size: 0.86em;
}

.list-page-card,
.record-card,
.flow-panel {
    width: 100%;
}

.list-header {
    align-items: center;
}

.section-intro {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.55;
}

.list-toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.status-summary strong {
    color: var(--green-900);
}

.crm-list-table table {
    min-width: 760px;
}

.crm-list-table tr {
    transition: background 140ms ease;
}

.crm-list-table tbody tr:hover {
    background: rgba(249, 252, 248, 0.82);
}

.crm-list-table .client-name-cell {
    color: inherit;
}

.breadcrumb-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 750;
}

.breadcrumb-line a {
    color: var(--green-800);
}

.breadcrumb-line strong {
    color: var(--green-900);
}

.record-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 2px;
}

.record-meta span {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    color: var(--muted);
    font-size: 0.86rem;
}

.record-meta strong {
    color: var(--green-900);
}

.flow-composer-actions {
    display: flex;
    justify-content: flex-start;
}

.full-flow .flow-entry-head {
    align-items: flex-start;
}

.full-flow .flow-entry-head div strong,
.full-flow .flow-entry-head div small {
    display: block;
}

.full-flow .flow-entry-head div small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.technical-log-card {
    opacity: 0.8;
}

.client-record-topbar {
    margin-top: -6px;
}

.read-field span,
.read-field strong {
    display: block;
}

.read-field-main {
    grid-column: 1 / -1;
}

.read-field-main strong {
    color: var(--green-900);
    font-size: 1.18rem;
}

.full-flow .flow-entry {
    padding: 16px 18px;
    border-radius: 22px;
}

.full-flow .flow-entry.is-manual {
    background: radial-gradient(circle at top right, rgba(253, 228, 54, 0.08), transparent 42%),
        #fff;
}

.full-flow .flow-entry.is-system {
    border-style: dashed;
    background: linear-gradient(135deg, rgba(255, 250, 218, 0.76), rgba(249, 252, 248, 0.96));
}

.flow-event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.flow-event-meta small {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.flow-system-content {
    color: var(--green-950);
    font-size: 0.96rem;
    font-weight: 750;
    line-height: 1.55;
}

.full-flow .flow-entry.is-manual .flow-entry-head {
    margin-bottom: 9px;
}

.full-flow .flow-entry.is-manual .flow-entry-head strong {
    color: var(--green-950);
    font-size: 0.98rem;
}

.full-flow .flow-entry.is-manual .flow-entry-head div small {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.full-flow .flow-entry-content {
    font-size: 0.98rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.badge-partner::before {
    background: var(--green-800);
}

.badge-partner {
    color: var(--green-900);
    background: rgba(133, 187, 57, 0.10);
    border-color: rgba(133, 187, 57, 0.32);
}

.badge-opportunity-open {
    background: var(--warning-soft);
    border-color: rgba(253, 228, 54, 0.7);
}

.badge-opportunity-won {
    background: var(--success-soft);
    border-color: rgba(28, 124, 62, 0.18);
    color: var(--success);
}

.badge-opportunity-won::before {
    background: var(--success);
}

.badge-opportunity-lost {
    background: var(--danger-soft);
    border-color: rgba(180, 35, 24, 0.16);
    color: var(--danger);
}

.badge-opportunity-lost::before {
    background: var(--danger);
}

.opportunities-table table {
    min-width: 980px;
}

.opportunity-record-card .read-field-main strong {
    font-size: 1.16rem;
}

.opportunity-form input[type="number"] {
    font-variant-numeric: tabular-nums;
}

.opportunity-record-topbar {
    margin-top: -6px;
}

.badge-customer {
    color: var(--green-800);
    background: rgba(133, 187, 57, 0.12);
}

.badge-customer::before {
    background: var(--green-600);
}

.flow-delete-form {
    display: inline-flex;
    margin: 0;
}

.btn-link-danger:hover {
    text-decoration: underline;
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.record-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 0 2px;
}

.record-topbar h2 {
    margin: 8px 0 0;
    margin-top: 6px;
    font-size: clamp(1.35rem, 2.1vw, 1.9rem);
    line-height: 1.08;
}

.record-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.record-section {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
    padding: 14px;
    border-radius: 18px;
}

.record-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.record-section-title h3 {
    margin: 0;
    color: var(--green-900);
    font-size: 1rem;
}

.record-form {
    display: grid;
    gap: 14px;
}

.client-read-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}

label {
    display: grid;
    gap: 5px;
}

label span {
    color: var(--green-900);
    font-weight: 800;
    font-size: 0.8rem;
}

.status-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-summary span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font-weight: 750;
    text-transform: none;
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 18px;
}

th,
td {
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    padding: 10px 12px;
}

.empty-state {
    border: 1px dashed var(--border-strong);
    background: radial-gradient(circle at top right, rgba(253, 228, 54, 0.18), transparent 45%),
        rgba(255, 255, 255, 0.64);
    padding: 18px;
    border-radius: 18px;
}

.flow-panel .card-header {
    margin-bottom: 10px;
}

.full-flow {
    gap: 9px;
}

.flow-entry-head,
.flow-event-meta {
    margin-bottom: 7px;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 18px;
}

.metric-card strong {
    color: var(--green-900);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin-top: 8px;
    font-size: 2.1rem;
}

.opportunities-client-card,
.flow-panel {
    padding: 18px;
}

.opportunities-client-card .card-header,
.flow-panel .card-header {
    gap: 10px;
    margin-bottom: 12px;
}

.opportunities-client-card .card-header h2,
.flow-panel .card-header h2 {
    font-size: clamp(1.18rem, 1.8vw, 1.55rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.opportunities-client-card .section-intro,
.flow-panel .section-intro {
    max-width: 680px;
    margin-top: 5px;
    font-size: 0.88rem;
    line-height: 1.42;
}

.opportunities-client-card .list-stack {
    gap: 8px;
}

.opportunities-client-card .list-row {
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 15px;
}

.opportunities-client-card .list-row strong {
    font-size: 0.94rem;
    line-height: 1.22;
}

.opportunities-client-card .list-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.25;
}

.opportunities-client-card .empty-state.compact,
.flow-panel .empty-state.compact {
    padding: 14px;
    border-radius: 15px;
}

.opportunities-client-card .empty-state strong,
.flow-panel .empty-state strong {
    margin-bottom: 4px;
    font-size: 0.94rem;
}

.opportunities-client-card .empty-state p,
.flow-panel .empty-state p {
    margin-bottom: 0;
    font-size: 0.86rem;
    line-height: 1.4;
}

.flow-composer-actions .btn {
    min-height: 37px;
    padding: 8px 14px;
}

.full-flow .flow-entry,
.flow-entry {
    padding: 10px 12px;
    border-radius: 14px;
}

.full-flow .flow-entry-head,
.flow-entry-head,
.flow-event-meta {
    gap: 8px;
    margin-bottom: 6px;
}

.flow-event-meta span {
    display: inline-flex;
    align-items: center;
    color: var(--green-800);
    font-weight: 850;
    letter-spacing: 0.01em;
    gap: 6px;
    font-size: 0.72rem;
}

.flow-event-meta span::before {
    content: "";
    border-radius: 999px;
    background: var(--yellow);
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 4px rgba(253, 228, 54, 0.16);
}

.full-flow .flow-entry.is-manual .flow-entry-head strong,
.flow-entry-head strong {
    font-size: 0.9rem;
}

.flow-entry-content,
.full-flow .flow-entry-content,
.flow-system-content {
    font-size: 0.88rem;
    line-height: 1.42;
}

.flow-entry-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 8px;
}

.read-field {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    min-height: 66px;
    padding: 11px 13px;
}

.read-field span {
    color: var(--green-800);
    font-weight: 850;
    margin-bottom: 4px;
    font-size: 0.74rem;
    line-height: 1.2;
}

.read-field strong {
    color: var(--text);
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.32;
    font-weight: 800;
}

.opportunities-client-card .list-row strong,
.full-flow .flow-entry.is-manual .flow-entry-head strong,
.flow-entry-head strong,
.flow-entry-content,
.full-flow .flow-entry-content,
.flow-system-content {
    font-size: 0.9rem;
}

.opportunities-client-card .list-row small,
.flow-event-meta small,
.flow-entry-head small,
.full-flow .flow-entry-head div small {
    font-size: 0.72rem;
}

.opportunities-client-card .section-intro,
.flow-panel .section-intro,
.record-card .section-intro,
.card .section-intro {
    font-size: 0.82rem;
    line-height: 1.38;
    font-weight: 500;
}

.flow-inline-composer textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(91, 107, 96, 0.82);
    font-weight: 500;
}

.record-card .record-section-title h3,
.opportunities-client-card .card-header h2,
.flow-panel .card-header h2 {
    margin: 0;
    color: var(--green-900);
    font-size: clamp(1.18rem, 1.8vw, 1.55rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.record-card .record-section-title,
.opportunities-client-card .card-header,
.flow-panel .card-header {
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.record-card .section-intro,
.opportunities-client-card .section-intro,
.flow-panel .section-intro,
.card .section-intro {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
    font-weight: 500;
}

.read-field strong,
.opportunities-client-card .list-row strong,
.full-flow .flow-entry.is-manual .flow-entry-head strong,
.flow-entry-head strong,
.flow-entry-content,
.full-flow .flow-entry-content,
.flow-system-content {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.32;
    font-weight: 800;
}

.read-field-main strong,
.opportunity-record-card .read-field-main strong {
    font-size: 0.94rem;
    line-height: 1.28;
    font-weight: 850;
}

.read-field span,
.opportunities-client-card .list-row small,
.flow-event-meta span,
.flow-event-meta small,
.flow-entry-head small,
.full-flow .flow-entry-head div small {
    font-size: 0.72rem;
    line-height: 1.25;
}

.flow-inline-composer textarea,
.flow-inline-composer textarea::placeholder {
    font-size: 0.9rem;
    line-height: 1.35;
}

.read-field,
.opportunities-client-card .list-row,
.full-flow .flow-entry,
.flow-entry {
    box-sizing: border-box;
}

.badge-followup-pending {
    color: var(--green-800);
    background: rgba(133, 187, 57, 0.12);
}

.badge-followup-pending::before {
    background: var(--green-600);
}

.badge-followup-completed {
    color: var(--green-800);
    background: rgba(27, 111, 43, 0.10);
}

.badge-followup-completed::before {
    background: var(--green-700);
}

.badge-followup-cancelled {
    color: var(--muted);
    background: rgba(15, 35, 25, 0.06);
}

.badge-followup-cancelled::before {
    background: var(--muted);
}

.followup-summary {
    margin: -4px 0 14px;
}

.followups-table table {
    min-width: 980px;
}

.row-warning td,
.list-row.is-warning {
    background: rgba(255, 226, 45, 0.10);
}

.actions-cell {
    white-space: nowrap;
    text-align: right;
}

.followups-client-card .card-header,
.opportunities-client-card .card-header,
.flow-panel .card-header {
    align-items: flex-start;
}

.followups-client-card .section-intro,
.opportunities-client-card .section-intro,
.flow-panel .section-intro {
    max-width: 760px;
}

.followups-client-card .card-header {
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.followups-client-card .card-header h2 {
    margin: 0;
    color: var(--green-900);
    font-size: clamp(1.18rem, 1.8vw, 1.55rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.followups-client-card .section-intro {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
    font-weight: 500;
    max-width: 760px;
}

.followups-client-card .list-stack {
    gap: 8px;
}

.followups-client-card .list-row {
    min-height: 0;
    padding: 10px 12px;
    border-radius: 14px;
}

.followups-client-card .list-row strong {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.32;
    font-weight: 800;
}

.followups-client-card .list-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.25;
}

.followups-client-card .empty-state.compact {
    padding: 10px 12px;
    border-style: solid;
    border-radius: 14px;
    background: #fff;
}

.followups-client-card .empty-state strong {
    margin-bottom: 3px;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.32;
    font-weight: 800;
}

.followups-client-card .empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 500;
}

.followups-client-card .badge {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 0.74rem;
}

.opportunities-client-card .list-row strong,
.followups-client-card .list-row strong,
.followups-client-card .empty-state strong {
    font-weight: 500;
}

.flow-entry-content,
.full-flow .flow-entry-content,
.full-flow .flow-entry.is-manual .flow-entry-content {
    font-weight: 400;
}

.flow-system-content,
.full-flow .flow-entry.is-system .flow-system-content {
    font-weight: 400;
}

.flow-event-meta span,
.flow-event-meta small {
    font-weight: 500;
}

.flow-entry-head small,
.full-flow .flow-entry-head div small,
.opportunities-client-card .list-row small,
.followups-client-card .list-row small,
.followups-client-card .empty-state p {
    font-weight: 400;
}

.read-field strong,
.read-field-main strong,
.opportunity-record-card .read-field strong,
.opportunity-record-card .read-field-main strong,
.record-card .read-field strong,
.client-read-grid .read-field strong {
    font-size: 0.94rem;
    line-height: 1.35;
    font-weight: 400;
    letter-spacing: 0;
}

.read-field span,
.client-read-grid .read-field span,
.opportunity-record-card .read-field span,
.record-card .read-field span {
    font-size: 0.78rem;
    line-height: 1.25;
}

.flow-event-meta span,
.full-flow .flow-event-meta span {
    font-weight: 850;
}

.flow-event-meta small,
.flow-entry-head small,
.full-flow .flow-entry-head div small {
    font-size: 0.72rem;
    font-weight: 400;
}

.flow-entry-head strong,
.full-flow .flow-entry.is-manual .flow-entry-head strong {
    font-size: 0.9rem;
    line-height: 1.25;
    font-weight: 600;
}

.full-flow .flow-event-meta span,
.flow-event-meta span,
.full-flow .flow-entry.is-manual .flow-entry-head strong,
.flow-entry-head strong {
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: 0.01em;
    color: var(--green-800);
}

.full-flow .flow-entry.is-manual .flow-entry-content,
.full-flow .flow-entry.is-system .flow-system-content,
.flow-entry-content,
.flow-system-content {
    font-size: 0.88rem;
    line-height: 1.42;
    font-weight: 400;
    color: var(--text);
}

.full-flow .flow-entry-head small,
.full-flow .flow-event-meta small,
.flow-entry-head small,
.flow-event-meta small {
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 400;
    color: var(--muted);
}

.read-field strong,
.read-field-main strong,
.opportunity-record-card .read-field strong,
.opportunity-record-card .read-field-main strong,
.record-card .read-field strong,
.client-read-grid .read-field strong,
.opportunities-client-card .list-row strong,
.followups-client-card .list-row strong,
.followups-client-card .empty-state strong,
.flow-entry-content,
.full-flow .flow-entry-content,
.flow-system-content,
.full-flow .flow-entry.is-system .flow-system-content,
.full-flow .flow-entry.is-manual .flow-entry-content {
    font-size: 0.88rem;
    line-height: 1.42;
    font-weight: 400;
    letter-spacing: 0;
}

.read-field span,
.client-read-grid .read-field span,
.opportunity-record-card .read-field span,
.record-card .read-field span,
.flow-event-meta span,
.full-flow .flow-event-meta span,
.full-flow .flow-entry.is-manual .flow-entry-head strong,
.flow-entry-head strong {
    font-size: 0.78rem;
    line-height: 1.25;
}

.opportunities-client-card .list-row small,
.followups-client-card .list-row small,
.followups-client-card .empty-state p,
.flow-entry-head small,
.full-flow .flow-entry-head div small,
.full-flow .flow-event-meta small,
.flow-event-meta small {
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 400;
}

.read-field-main strong,
.client-read-grid .read-field-main strong {
    font-size: 0.88rem;
    line-height: 1.42;
    font-weight: 400;
}

:root {
    --ui-title-size: clamp(1.16rem, 1.65vw, 1.45rem);
    --ui-section-size: clamp(1.12rem, 1.5vw, 1.34rem);
    --ui-body-size: 0.88rem;
    --ui-label-size: 0.76rem;
    --ui-meta-size: 0.72rem;
    --ui-help-size: 0.82rem;
    --ui-line: 1.42;
    --ui-card-padding: 18px;
    --ui-inner-padding-y: 10px;
    --ui-inner-padding-x: 12px;
}

.card {
    padding: var(--ui-card-padding);
}

.card-header,
.record-section-title,
.followups-client-card .card-header,
.opportunities-client-card .card-header,
.flow-panel .card-header {
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.card-header h2,
.record-section-title h3,
.followups-client-card .card-header h2,
.opportunities-client-card .card-header h2,
.flow-panel .card-header h2 {
    margin: 0;
    color: var(--green-900);
    font-size: var(--ui-section-size);
    line-height: 1.12;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.section-intro,
.card .section-intro,
.record-card .section-intro,
.opportunities-client-card .section-intro,
.followups-client-card .section-intro,
.flow-panel .section-intro,
.empty-state p {
    color: var(--muted);
    font-size: var(--ui-help-size);
    line-height: 1.38;
    font-weight: 400;
}

.read-field span,
.details-list dt,
.record-card .read-field span,
.client-read-grid .read-field span,
.opportunity-record-card .read-field span,
label span {
    margin-bottom: 4px;
    color: var(--green-800);
    font-size: var(--ui-label-size);
    line-height: 1.25;
    font-weight: 850;
}

.read-field strong,
.read-field-main strong,
.details-list dd,
.record-card .read-field strong,
.client-read-grid .read-field strong,
.client-read-grid .read-field-main strong,
.opportunity-record-card .read-field strong,
.opportunity-record-card .read-field-main strong {
    color: var(--text);
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
    font-weight: 400;
    letter-spacing: 0;
}

.list-stack {
    display: grid;
    gap: 8px;
}

.list-row,
.opportunities-client-card .list-row,
.followups-client-card .list-row {
    min-height: 0;
    padding: var(--ui-inner-padding-y) var(--ui-inner-padding-x);
    border-radius: 14px;
}

.list-row strong,
.opportunities-client-card .list-row strong,
.followups-client-card .list-row strong,
.followups-client-card .empty-state strong {
    color: var(--text);
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
    font-weight: 600;
}

.list-row small,
.list-row em,
.opportunities-client-card .list-row small,
.followups-client-card .list-row small,
.followups-client-card .empty-state p {
    margin-top: 2px;
    color: var(--muted);
    font-size: var(--ui-meta-size);
    line-height: 1.28;
    font-weight: 400;
}

.empty-state strong,
.opportunities-client-card .empty-state strong,
.flow-panel .empty-state strong {
    margin-bottom: 3px;
    color: var(--text);
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
    font-weight: 600;
}

.flow-inline-composer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    border-bottom: 1px solid var(--border);
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
}

.flow-inline-composer textarea {
    max-height: 180px;
    resize: vertical;
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 66px;
    padding: 10px 12px;
}

.flow-inline-composer textarea,
.flow-inline-composer textarea::placeholder,
input,
select,
textarea {
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
}

.full-flow,
.flow-timeline.full-flow {
    gap: 8px;
}

.flow-entry,
.full-flow .flow-entry {
    padding: var(--ui-inner-padding-y) var(--ui-inner-padding-x);
    border-radius: 14px;
}

.flow-entry-head,
.flow-event-meta,
.full-flow .flow-entry-head,
.full-flow .flow-event-meta {
    gap: 8px;
    margin-bottom: 6px;
}

.flow-event-meta span,
.full-flow .flow-event-meta span,
.flow-entry-head strong,
.full-flow .flow-entry.is-manual .flow-entry-head strong {
    color: var(--green-800);
    font-size: var(--ui-label-size);
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: 0;
}

.flow-entry-content,
.full-flow .flow-entry-content,
.flow-system-content,
.full-flow .flow-entry.is-system .flow-system-content,
.full-flow .flow-entry.is-manual .flow-entry-content {
    color: var(--text);
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
    font-weight: 400;
}

.flow-entry-head small,
.flow-event-meta small,
.full-flow .flow-entry-head div small,
.full-flow .flow-event-meta small {
    color: var(--muted);
    font-size: var(--ui-meta-size);
    line-height: 1.25;
    font-weight: 400;
}

th {
    background: #F9FCF8;
    color: var(--green-800);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: var(--ui-label-size);
    line-height: 1.25;
    font-weight: 850;
}

td {
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    outline: none;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 13px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 850;
    line-height: 1;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
    min-height: 39px;
    padding: 9px 15px;
    font-size: 0.86rem;
}

.btn-small {
    min-height: 32px;
    padding: 7px 12px;
    font-size: 0.78rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    color: var(--green-800);
    background: #fff;
    border: 1px solid var(--border);
    font-weight: 850;
    min-height: 26px;
    padding: 5px 9px;
    font-size: 0.74rem;
    line-height: 1;
}

.btn-link-danger {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-weight: 850;
    padding: 0;
    font-size: var(--ui-meta-size);
    line-height: 1;
}

.metric-card span {
    color: var(--green-800);
    font-weight: 850;
    font-size: var(--ui-label-size);
}

.metric-card small {
    margin-top: 8px;
    font-size: var(--ui-help-size);
}

.dashboard-page > * + * {
    margin-top: 24px;
}

.dashboard-page .today-hero {
    align-items: center;
    gap: 28px;
}

.dashboard-page .today-hero > div:first-child {
    min-width: 0;
    max-width: 760px;
}

.dashboard-page .today-hero h2 {
    margin: 8px 0 8px;
    color: var(--text);
    font-size: var(--ui-section-size);
    line-height: 1.12;
    letter-spacing: -0.035em;
    font-weight: 900;
}

.dashboard-page .today-hero .hero-copy {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: var(--ui-help-size);
    line-height: 1.42;
    font-weight: 400;
}

.dashboard-page .today-hero .hero-copy span {
    display: block;
}

.dashboard-page .today-hero .hero-copy span + span {
    margin-top: 6px;
}

.dashboard-page .today-hero .hero-actions {
    flex-shrink: 0;
}

.app-main > .topbar .topbar-title h1,
.app-main .topbar .topbar-title h1,
.topbar .topbar-title h1,
.topbar h1,
.page-header h1,
.page-title h1,
.app-page-title,
.app-content > h1 {
    font-size: clamp(1.62rem, 2.15vw, 2.18rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.app-main > .topbar,
.app-main .topbar,
.topbar {
    margin-bottom: 20px;
}

.app-main > .topbar.topbar-compact,
.app-main .topbar.topbar-compact,
.topbar.topbar-compact {
    margin-bottom: 14px;
}

.status-list {
    display: grid;
    gap: 8px;
}

.status-row {
    display: flex;
    gap: 12px;
    border: 1px solid var(--border);
    background: #fff;
    min-height: 0;
    padding: var(--ui-inner-padding-y) var(--ui-inner-padding-x);
    border-radius: 14px;
    align-items: center;
}

.status-row div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.status-row strong {
    color: var(--text);
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
    font-weight: 600;
}

.status-row small {
    color: var(--muted);
    font-size: var(--ui-meta-size);
    line-height: 1.25;
    font-weight: 400;
}

.status-dot {
    border-radius: 999px;
    background: var(--danger);
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
}

.status-dot.ok {
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(28, 124, 62, 0.10);
}

.table-wrap th,
.table-wrap td,
th,
td {
    vertical-align: middle;
}

.opportunities-table td,
.followups-table td,
.crm-list-table td {
    vertical-align: middle;
}

.list-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    transition: 160ms ease;
    align-items: center;
}

.read-field,
.details-list div {
    min-height: 62px;
    padding: var(--ui-inner-padding-y) var(--ui-inner-padding-x);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.empty-state,
.empty-state.compact,
.opportunities-client-card .empty-state.compact,
.followups-client-card .empty-state.compact,
.flow-panel .empty-state.compact {
    padding: var(--ui-inner-padding-y) var(--ui-inner-padding-x);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.empty-state p:last-child,
.empty-state strong:last-child,
.status-row small:last-child,
.list-row small:last-child,
.list-row em:last-child {
    margin-bottom: 0;
}

.roadmap-mini div,
.mini-timeline div {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flow-whatsapp-composer {
    gap: 10px;
}

.flow-whatsapp-box {
    display: grid;
    gap: 8px;
}

.flow-whatsapp-input {
    min-height: 74px;
    max-height: 190px;
    resize: vertical;
    border-radius: 18px;
}

.flow-whatsapp-input.is-dragging {
    border-color: var(--green-400);
    box-shadow: 0 0 0 4px rgba(133, 187, 57, 0.14);
    background: #fff;
}

.flow-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.flow-composer-footer p {
    margin: 0;
    color: var(--muted);
    font-size: var(--ui-meta-size);
    line-height: 1.35;
}

.flow-image-preview,
.flow-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.flow-preview-item,
.flow-attachment {
    position: relative;
    display: block;
    width: 112px;
    height: 84px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.flow-preview-item img,
.flow-attachment img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flow-preview-item button {
    position: absolute;
    right: 6px;
    bottom: 6px;
    border: 0;
    border-radius: 999px;
    padding: 5px 8px;
    color: #fff;
    background: rgba(15, 35, 25, 0.78);
    cursor: pointer;
    font-size: 0.66rem;
    font-weight: 800;
}

.flow-entry-content strong {
    font-weight: 850;
}

.flow-entry-content em {
    font-style: italic;
}

.flow-entry-content code {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 7px;
    background: rgba(16, 32, 24, 0.07);
    color: var(--green-900);
    font-size: 0.92em;
}

.flow-entry-content .flow-markdown-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 8px 0 2px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
}

.flow-entry-content table.flow-markdown-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    table-layout: auto;
    margin: 0;
    background: transparent;
}

.flow-entry-content .flow-markdown-table th,
.flow-entry-content .flow-markdown-table td {
    padding: 8px 10px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
}

.flow-entry-content .flow-markdown-table th:last-child,
.flow-entry-content .flow-markdown-table td:last-child {
    border-right: 0;
}

.flow-entry-content .flow-markdown-table tr:last-child td {
    border-bottom: 0;
}

.flow-entry-content .flow-markdown-table th {
    color: var(--green-800);
    background: rgba(249, 252, 248, 0.96);
    font-size: var(--ui-label-size);
    font-weight: 850;
    letter-spacing: 0;
    text-transform: none;
}

.flow-entry-content .flow-markdown-table td:first-child {
    width: 28%;
    color: var(--green-900);
    font-weight: 600;
}

.flow-entry-content .flow-markdown-table td code,
.flow-entry-content .flow-markdown-table th code {
    white-space: nowrap;
}

.flow-attachments {
    align-items: flex-start;
    margin-top: 10px;
}

.flow-attachment {
    display: inline-block;
    width: auto;
    height: auto;
    max-width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.flow-attachment img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 640px);
    max-height: 520px;
    object-fit: contain;
}

.flow-preview-item {
    width: 160px;
    height: 120px;
    border-radius: 14px;
}

.flow-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    min-height: 18px;
    max-height: 18px;
    padding: 0;
    margin: 0;
    border-radius: 5px;
    flex: 0 0 18px;
    accent-color: var(--green-800);
}

.team-access-grid {
    align-items: start;
}

.team-access-grid > .card,
.team-access-card {
    height: auto;
    min-height: 0;
}

.team-access-grid > .card .list-stack,
.team-access-card .list-stack,
.team-list-stack {
    flex: 0 0 auto;
    align-content: start;
}

.team-list-row,
.team-access-card .list-row {
    min-height: 0;
    padding: 10px 12px;
    border-radius: 14px;
}

.team-list-row span:first-child {
    min-width: 0;
}

.team-list-row strong {
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
}

.team-list-row small {
    font-size: var(--ui-meta-size);
    line-height: 1.28;
}

.access-role-list {
    gap: 8px;
}

.access-role-row {
    min-height: 0;
    padding: 10px 12px;
    border-radius: 14px;
    align-items: center;
    justify-content: flex-start;
}

.access-role-row > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.access-role-row strong {
    color: var(--text);
    font-size: var(--ui-body-size);
    line-height: var(--ui-line);
    font-weight: 600;
}

.access-role-row small {
    color: var(--muted);
    font-size: var(--ui-meta-size);
    line-height: 1.25;
    font-weight: 400;
}

.record-card .access-role-list .status-row {
    min-height: 0;
}

@media (max-width: 1040px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-columns,
    .clients-layout {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 620px) {
    .metrics-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    .card,
    .metric-card {
        border-radius: 22px;
    }

    .card {
        padding: 18px;
    }

}

@media (max-width: 720px) {
    .client-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .client-filters select {
        max-width: none;
    }

    .client-hero-card,
    .today-hero {
        flex-direction: column;
    }

    .client-hero-actions {
        justify-content: flex-start;
    }

    .client-read-grid {
        grid-template-columns: 1fr;
    }

    .opportunities-table table {
        min-width: 860px;
    }

    .card {
        padding: 18px;
    }

    .client-read-grid,
    .form-grid {
        gap: 10px;
    }

    .opportunities-client-card,
    .flow-panel {
        padding: 16px;
    }

    .opportunities-client-card .card-header,
    .flow-panel .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .opportunities-client-card .list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .followups-client-card .card-header {
        align-items: flex-start;
    }

    :root {
        --ui-card-padding: 16px;
    }

    .card-header,
    .record-section-title,
    .followups-client-card .card-header,
    .opportunities-client-card .card-header,
    .flow-panel .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-main > .topbar .topbar-title h1,
    .app-main .topbar .topbar-title h1,
    .topbar .topbar-title h1,
    .topbar h1,
    .page-header h1,
    .page-title h1,
    .app-page-title,
    .app-content > h1 {
        font-size: clamp(1.45rem, 7vw, 1.9rem);
    }

    .list-row {
        align-items: flex-start;
    }

    .flow-composer-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .flow-preview-item,
    .flow-attachment {
        width: 96px;
        height: 72px;
    }

    .flow-entry-content table.flow-markdown-table {
        min-width: 460px;
    }

    .flow-attachment img {
        max-width: 100%;
        max-height: 380px;
    }

    .flow-preview-item {
        width: 128px;
        height: 96px;
    }

    .team-access-grid {
        grid-template-columns: 1fr;
    }

    .team-list-row,
    .access-role-row {
        align-items: flex-start;
    }

}

@media (max-width: 780px) {
    .record-topbar {
        flex-direction: column;
    }

    .record-actions {
        justify-content: flex-start;
    }

    .flow-inline-composer {
        grid-template-columns: 1fr;
    }

    .list-header {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 640px) {
    .flow-entry-head,
    .flow-event-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .flow-entry-actions {
        justify-content: flex-start;
    }

}

@media (max-width: 900px) {
    .dashboard-page .today-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-page .today-hero .hero-actions {
        justify-content: flex-start;
    }

}

/* v0.2.6 — equipas e acessos */
.access-role-row.is-disabled {
    opacity: 0.68;
    cursor: default;
}

.access-role-row.is-disabled:hover {
    transform: none;
    border-color: var(--border);
    background: inherit;
}

.account-identity-card {
    margin-top: 2px;
}

.team-member-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
    .team-member-picker {
        grid-template-columns: 1fr;
    }
}

.alert-info {
    border-color: rgba(50, 112, 67, 0.18);
    background: rgba(237, 247, 239, 0.82);
    color: var(--green-900);
}


/* NEXO Lite — Fluxo: editor compacto e histórico pesquisável (2026-11-25) */
.lite-flow-panel .flow-pro-composer, .lite-flow-panel .flow-editor,
.lite-flow-panel .flow-composer-heading, .lite-flow-panel .flow-history-tools { min-width:0; max-width:100%; }
.lite-flow-panel .flow-composer-heading { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.lite-flow-panel .flow-composer-heading label { color:var(--muted); font-size:.83rem; font-weight:700; }
.lite-flow-panel .flow-entry-type { width:min(260px,100%); min-width:0; padding:9px 12px; border-radius:11px; }
.lite-flow-panel .flow-editor { border:1px solid var(--border); border-radius:15px; overflow:hidden; background:#fff; }
.lite-flow-panel .flow-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:4px; padding:8px; background:#f7faf6; border-bottom:1px solid var(--border); }
.lite-flow-panel .flow-toolbar button { border:1px solid transparent; border-radius:8px; min-height:32px; padding:5px 9px; background:transparent; color:var(--green-900); font:inherit; font-size:.82rem; font-weight:700; cursor:pointer; }
.lite-flow-panel .flow-toolbar button:hover, .lite-flow-panel .flow-toolbar button:focus-visible { border-color:var(--border); background:#fff; }
.lite-flow-panel .flow-toolbar-divider { width:1px; height:22px; background:var(--border); margin:0 3px; }
.lite-flow-panel .flow-toolbar-spacer { flex:1; }
.lite-flow-panel .flow-toolbar .flow-preview-button { color:var(--green-800); background:#eaf5e9; }
.lite-flow-panel .flow-editor .flow-whatsapp-box { padding:10px; }
.lite-flow-panel .flow-editor .flow-whatsapp-input { width:100%; max-width:100%; min-height:118px; resize:vertical; border:0; border-radius:8px; box-shadow:none; background:#fff; }
.lite-flow-panel .flow-editor .flow-whatsapp-input:focus { outline:2px solid rgba(32,92,28,.22); outline-offset:1px; }
.lite-flow-panel .flow-rich-preview { min-height:118px; padding:10px 8px; overflow-wrap:anywhere; }
.lite-flow-panel .flow-rich-preview[hidden], .lite-flow-panel .flow-emoji-panel[hidden], .lite-flow-panel .flow-table-panel[hidden], .lite-flow-panel .flow-no-matches[hidden], .lite-flow-panel .flow-entry[hidden] { display:none !important; }
.lite-flow-panel .flow-editor-hint { margin:0; padding:0 12px 10px; font-size:.76rem; color:var(--muted); }
.lite-flow-panel .flow-emoji-panel { display:flex; flex-wrap:wrap; gap:4px; padding:10px; border-bottom:1px solid var(--border); background:#fff; }
.lite-flow-panel .flow-emoji-panel button { min-width:36px; min-height:36px; padding:4px; border:1px solid transparent; background:transparent; border-radius:9px; font-size:1.2rem; cursor:pointer; }
.lite-flow-panel .flow-emoji-panel button:hover, .lite-flow-panel .flow-emoji-panel button:focus-visible { border-color:var(--border); background:#eff7ed; }
.lite-flow-panel .flow-table-panel { display:flex; align-items:center; flex-wrap:wrap; gap:9px; padding:12px; border-bottom:1px solid var(--border); background:#fff; }
.lite-flow-panel .flow-table-panel strong { font-size:.85rem; margin-right:4px; }
.lite-flow-panel .flow-table-panel label { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:.8rem; font-weight:650; }
.lite-flow-panel .flow-table-panel input { width:64px; padding:7px 6px; border-radius:8px; }
.lite-flow-panel .flow-table-panel .btn { padding:7px 11px; min-height:32px; font-size:.8rem; }
.lite-flow-panel .flow-history-tools { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin:20px 0 12px; padding:12px; border:1px solid var(--border); border-radius:13px; background:#f9fbf8; }
.lite-flow-panel .flow-history-tools label { display:grid; gap:5px; min-width:0; color:var(--muted); font-size:.76rem; font-weight:700; }
.lite-flow-panel .flow-history-tools .flow-search-label { flex:1 1 200px; }
.lite-flow-panel .flow-history-tools input, .lite-flow-panel .flow-history-tools select { width:100%; min-width:0; max-width:100%; padding:8px 10px; border-radius:9px; font-size:.85rem; }
.lite-flow-panel .flow-history-tools small { margin-left:auto; white-space:nowrap; color:var(--muted); }
.lite-flow-panel .flow-no-matches { margin:0 0 12px; color:var(--muted); font-size:.88rem; }
.lite-flow-panel .flow-author-line { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-width:0; }
.lite-flow-panel .flow-type-badge { display:inline-flex; padding:3px 8px; border:1px solid #d6e7d5; background:#f2f8ef; border-radius:999px; color:var(--green-800); font-size:.7rem; font-weight:750; }
.lite-flow-panel .flow-entry-content a { color:var(--green-800); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:2px; overflow-wrap:anywhere; }
.lite-flow-panel .flow-entry-content .flow-paragraph { margin:0 0 8px; line-height:1.55; }
.lite-flow-panel .flow-entry-content .flow-paragraph:last-child { margin-bottom:0; }
.lite-flow-panel .flow-entry-content .flow-heading { margin:8px 0 6px; font-size:1.03rem; line-height:1.35; color:var(--green-900); font-weight:800; }
.lite-flow-panel .flow-entry-content .flow-markdown-list { padding-left:23px; margin:8px 0; }
.lite-flow-panel .flow-entry-content .flow-markdown-list li { margin:3px 0; }
.lite-flow-panel .flow-entry-content .flow-quote { margin:8px 0; padding:8px 12px; border-left:3px solid #93bb6e; background:#f5faf2; border-radius:0 8px 8px 0; }
.lite-flow-panel .flow-entry-content .flow-markdown-table-wrap { max-width:100%; }
@media(max-width:640px){
  .lite-flow-panel .flow-composer-heading { align-items:stretch; flex-direction:column; gap:6px; }
  .lite-flow-panel .flow-entry-type { width:100%; }
  .lite-flow-panel .flow-toolbar { gap:2px; padding:6px; }
  .lite-flow-panel .flow-toolbar button { min-height:36px; padding:6px 8px; }
  .lite-flow-panel .flow-history-tools { align-items:stretch; }
  .lite-flow-panel .flow-history-tools label { flex:1 1 100%; }
  .lite-flow-panel .flow-history-tools small { margin:0; }
  .lite-flow-panel .flow-composer-footer { flex-wrap:wrap; }
  .lite-flow-panel .flow-composer-footer button[type=submit] { width:100%; }
}

.lite-flow-panel .flow-editor .flow-whatsapp-input[hidden] { display:none !important; }

/* Impedir que tabelas largas alarguem cartões no telemóvel. */
.lite-flow-panel .flow-timeline.full-flow,
.lite-flow-panel .flow-timeline.full-flow .flow-entry,
.lite-flow-panel .flow-timeline.full-flow .flow-entry-content,
.lite-flow-panel .flow-timeline.full-flow .flow-entry-head,
.lite-flow-panel .flow-timeline.full-flow .flow-event-meta { min-width:0; max-width:100%; }
.lite-flow-panel .flow-timeline.full-flow .flow-entry { width:100%; }
.lite-flow-panel .flow-timeline.full-flow .flow-markdown-table-wrap { display:block; width:100%; max-width:100%; min-width:0; overflow-x:auto; }
