/* ============================================================
   FLOW UI (unificado)
   Origem: board.css + flow-view.css + flow-tags.css + detailview-style.css
   ============================================================ */

/* ============================================================
   1) BASE (board.css)
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

.container {
    min-width: 100%;
}

/* =====================================================
 * Botão Nova Demanda – ícone sempre visível
 * ===================================================== */

.navbar .new-demand-button .btn i {
    color: #ffffff; /* ícone branco */
}

/* Garante que no hover continue branco */
.navbar .new-demand-button .btn:hover i {
    color: #ffffff;
}

/* ============================================================
   2) BOARD / CARDS / GRID (board.css)
   ============================================================ */
.flow-card {
    margin: 0 0 8px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    background-color: #ffffff;
    cursor: pointer;
    border-radius: 10px;
}

.flow-card:hover {
    border-color: #4299e1;
    box-shadow: 0 8px 16px rgba(66, 153, 225, 0.2);
    background-color: #e0e0e0;
}

/* Estilo para o placeholder durante o arrasto */
.sortable-placeholder {
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    height: 50px;
    margin-bottom: 15px;
    visibility: visible;
}

/* Estilo para o card arrastado */
.dragging {
    transform: rotate(3deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* (duplicado no original) Mantido */
.flow-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Sombra pulsante mais intensa para cards movimentados recentemente */
@keyframes pulse-shadow {
    0% { box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); }
    50% { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7); }
    100% { box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4); }
}

.flow-card.moved-recently {
    animation: pulse-shadow 3s infinite ease-in-out;
}

/* Sombra colorida pulsante para cada status com mais intensidade */
.flow-card.moved-recently.aberto {
    animation: pulse-shadow-aberto 3s infinite ease-in-out;
}
@keyframes pulse-shadow-aberto {
    0% { box-shadow: 0 8px 16px rgba(154, 104, 195, 0.5); }
    50% { box-shadow: 0 16px 32px rgba(154, 104, 195, 0.8); }
    100% { box-shadow: 0 8px 16px rgba(154, 104, 195, 0.5); }
}

.flow-card.moved-recently.em-processo {
    animation: pulse-shadow-em-processo 3s infinite ease-in-out;
}
@keyframes pulse-shadow-em-processo {
    0% { box-shadow: 0 8px 16px rgba(109, 168, 110, 0.5); }
    50% { box-shadow: 0 16px 32px rgba(109, 168, 110, 0.8); }
    100% { box-shadow: 0 8px 16px rgba(109, 168, 110, 0.5); }
}

.flow-card.moved-recently.em-validacao {
    animation: pulse-shadow-em-validacao 3s infinite ease-in-out;
}
@keyframes pulse-shadow-em-validacao {
    0% { box-shadow: 0 8px 16px rgba(91, 124, 166, 0.5); }
    50% { box-shadow: 0 16px 32px rgba(91, 124, 166, 0.8); }
    100% { box-shadow: 0 8px 16px rgba(91, 124, 166, 0.5); }
}

.flow-card.moved-recently.concluido {
    animation: pulse-shadow-concluido 3s infinite ease-in-out;
}
@keyframes pulse-shadow-concluido {
    0% { box-shadow: 0 8px 16px rgba(212, 136, 54, 0.5); }
    50% { box-shadow: 0 16px 32px rgba(212, 136, 54, 0.8); }
    100% { box-shadow: 0 8px 16px rgba(212, 136, 54, 0.5); }
}

.flow-card .card-body { position: relative; }

.flow-card .tag {
    display: inline-block;
    padding: 5px;
    margin: 2px;
    font-size: 14px;
    color: white;
}

.card-text {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    display: inline-block;
    padding: 5px 10px;
    margin: 2px 0;
    border-radius: 5px;
    white-space: nowrap;
    text-align: center;
}

.card-text .tag {
    display: inline-block;
    padding: 1px 4px !important;
    margin: 2px 0;
    border-radius: 5px;
    white-space: nowrap;
    text-align: center;
    height: 20px;
    font-size: 12px !important;
}

.flow-card .link-view {
    position: absolute;
    top: 10px;
    right: 10px;
}

.inline-delete-form { display: inline; }

.btn.btn-link.link-delete {
    padding: 0;
    border: none;
    background: transparent;
}

.fas { color: #007bff; }
.fas.fa-trash-alt { color: #dc3545; }

.custom-subtitle { margin-top: 10px; display: block; width: 100%; }
.custom-divider { border-top: 1px solid #ccc; width: 100%; margin: 3px 0; }
.card-subtitle { font-size: 14px; }

.form-search { padding: 0 30px 0 40px; }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
.blink-icon {
    animation: blink 1s linear infinite;
    color: red;
}

.collapse:not(.show) { display: none; }

.card-body { width: 100%; display: flex; flex-direction: column; }

.card { position: relative; overflow: visible; }
.collapse { position: absolute; width: 100%; z-index: 100; }

.input-group-prepend .input-group-text {
    height: auto;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
}

.custom-modal-width { max-width: 50%; }

/* filtros */
.filter-buttons { display: inline-block; margin-left: 10px; vertical-align: middle; }
.filter-button {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #333;
    padding: 3px 6px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin-right: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.filter-button:hover { background-color: #e6e6e6; }
.filter-button-ativas { background-color: #007bff; color: white; }
.filter-button-arquivadas { background-color: #28a745; color: white; }

div.card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 1.1rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-style: normal;
    font-weight: 500;
    line-height: 1.1;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    color: #60617e;
}
div.card-title strong { color: #333; }

.card-body h5 {
    margin: 0;
    flex-grow: 1;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.star-icon {
    cursor: pointer;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    z-index: 3;
    margin-top: 0 !important;
    margin-left: auto;
    -webkit-text-stroke: 1px gray;
    text-stroke: 1px gray;
}

.invisible-card {
    background-color: transparent;
    border: none;
    box-shadow: none;
    color: transparent;
    opacity: 0;
    pointer-events: none;
}

.star-icon.red { color: red; }
.star-icon.yellow { color: yellow; }
.star-icon.green { color: green; }
.star-icon.none {
    color: white;
    -webkit-text-stroke: 1px gray;
    text-stroke: 1px gray;
}

/* GRID horizontal do board (isso é o que costuma “desconfigurar” quando some) */
.demandas-ativas-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 350px;
    gap: 0px;
    overflow-x: auto;
    padding-bottom: 15px;
    width: 100%;
    max-width: 100%;
}

/* cores das colunas */
.col:nth-child(1) { background-color: #d1b3e6; }
.col:nth-child(2) { background-color: #b4dab9; }
.col:nth-child(3) { background-color: #b3c8e6; }
.col:nth-child(4) { background-color: #ffe0b3; }
.col:nth-child(5) { background-color: #d1b3e6; }
.col:nth-child(6) { background-color: #b4dab9; }
.col:nth-child(7) { background-color: #b3c8e6; }
.col:nth-child(8) { background-color: #ffe0b3; }
.col:nth-child(9) { background-color: #d1b3e6; }
.col:nth-child(10) { background-color: #b4dab9; }
.col:nth-child(11) { background-color: #b3c8e6; }
.col:nth-child(12) { background-color: #ffe0b3; }
.col:nth-child(13) { background-color: #d1b3e6; }
.col:nth-child(14) { background-color: #b4dab9; }
.col:nth-child(15) { background-color: #b3c8e6; }
.col:nth-child(16) { background-color: #ffe0b3; }
.col:nth-child(17) { background-color: #d1b3e6; }
.col:nth-child(18) { background-color: #b4dab9; }
.col:nth-child(19) { background-color: #b3c8e6; }
.col:nth-child(20) { background-color: #ffe0b3; }

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

div.col {
    background-color: #ffffff;
    padding: 8px 10px;
    width: 350px;
    border: 0px solid #d1d1d1;
    border-radius: 10px;
    box-sizing: border-box;
}

.pipe-filters { display: flex; align-items: center; }

.pipe-filters .star-filter.red,
.pipe-filters .star-filter.yellow,
.pipe-filters .star-filter.green {
    -webkit-text-stroke: none;
    text-stroke: none;
}
.pipe-filters .star-filter.red { color: red; }
.pipe-filters .star-filter.yellow { color: yellow; }
.pipe-filters .star-filter.green { color: green; }
.pipe-filters .star-filter.none {
    color: transparent;
    -webkit-text-stroke: 1px gray;
    text-stroke: 1px gray;
}

.pipe-filters .icon {
    font-size: 1.0em;
    color: transparent;
    border-radius: 50%;
    padding: 5px;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-text-stroke: 1px black;
    text-stroke: 1px black;
}
.pipe-filters .icon:hover {
    color: #000;
    background-color: rgba(0, 0, 0, 0.1);
}
.pipe-filters .icon.active {
    color: #000 !important;
    background-color: rgba(0, 0, 0, 0.2);
}

.filters {
    padding: 10px;
    color: #BEC7D0;
}
.filters .sidebar-heading {
    font-weight: bold;
    margin-bottom: 10px;
    display: block !important;
}
.filters .filter-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    display: block !important;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.filters .filter-item label {
    line-height: 1.9;
    font-size: 1.0rem;
    font-weight: normal !important;
    margin: 0;
    padding: 0;
    display: block;
    max-width: 100%;
    cursor: pointer;
}
.filter-text {
    display: inline-block;
    max-width: calc(100% - 25px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: bottom;
    font-family: 'Source Sans Pro', sans-serif;
}

.filter-buttons { gap: 8px; }
.filter-buttons .btn {
    padding: 6px 12px;
    font-size: 0.875rem;
    line-height: 1.2;
    border-radius: 4px;
}
.filter-buttons .btn-save-filters {
    margin-top: 10px;
    width: auto;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent;
    border: 2px solid #656565;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}
input[type="checkbox"]:checked {
    background-color: transparent;
    border-color: #007bff;
    position: relative;
}
input[type="checkbox"]:checked::after {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    background-color: #007bff;
    border-radius: 2px;
    margin: auto;
    position: relative;
    top: 2px;
}

.sla-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px;
}
.sla-progress {
    flex: 1;
    display: flex;
    align-items: center;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}
.status-bar {
    height: 100%;
    background-color: yellow;
    transition: width 0.3s ease;
}
.icons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid;
    border-color: var(--tag-color, #ccc);
    border-radius: 50%;
    font-size: 16px;
    color: transparent;
    -webkit-text-stroke: 1px #000;
    text-stroke: 1px #000;
    background-color: transparent;
    cursor: default;
}
.icon i {
    color: transparent;
    -webkit-text-stroke: 1px #333;
    text-stroke: 1px #333;
}
.icon.urgency.green { background-color: #4caf50; }
.icon.urgency.yellow { background-color: #ffeb3b; color: #000; }
.icon.urgency.red { background-color: #f44336; }
.icon.priority.green { background-color: #4caf50; }
.icon.priority.yellow { background-color: #ffeb3b; color: #000; }
.icon.priority.red { background-color: #f44336; }

@media (min-width: 992px) {
    .filter-buttons { flex-wrap: nowrap; }
}

/* navbar-content (board.css) */
.navbar-content {
    display: flex;
    align-items: center;
    width: 100%;
}
.new-demand-button { flex-shrink: 0; }
.search-bar { flex-grow: 1; margin-right: 15px; }
.icons-container {
    flex-shrink: 0;
    display: flex;
    gap: 0;
    align-items: center;
}
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .new-demand-button { margin-bottom: 10px; }
    .search-bar { width: 100%; }
    .icons-container { justify-content: flex-start; }
}

.active-pipe {
    background-color: #004085;
    color: #fff;
    border-radius: 5px 5px 0 0;
}
.active-pipe::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #007bff;
}

/* modal fullscreen (board.css) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}
.modal-fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 85%;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    overflow: hidden;
    display: none;
}

/* autocomplete do board (board.css) */
.ui-autocomplete {
    position: absolute;
    z-index: 3000 !important;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
}
.ui-autocomplete li { padding: 8px 12px; cursor: pointer; }
.ui-autocomplete li.ui-state-focus { background-color: #f0f0f0; color: #333; }

/* ============================================================
   3) FLOW VIEW (flow-view.css)
   ============================================================ */
.table th:first-child { width: 150px !important; }
.table { margin-bottom: 5px; }
.btn-secondary { margin: 0 5px 5px; }

.custom-subtitle { margin-top: 15px; margin-bottom: 10px; } /* do flow-view */

@media (max-width: 768px) {
    .table th:first-child { display: block; width: 100%; }
    .detail-view tr > td { display: block; width: 100%; }
}

.shared-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border: 1px solid #ccc;
    margin: 5px 0;
    border-radius: 4px;
}
.shared-user button {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
}
.shared-user button:hover { background-color: #d32f2f; }

.control-buttons { margin-top: 10px; }
.control-buttons button {
    margin-right: 10px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.control-buttons button:hover { background-color: #0056b3; }

.btn-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin: 0 5px 5px;
}

.btn-primary {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.btn-primary:hover { background-color: #0056b3; }

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.input-group input { flex: 1; }
.input-group button { margin-left: 10px; }

.ui-autocomplete { z-index: 1050; } /* do flow-view (menos prioridade que board, mas mantém) */

.detail-view .card-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start !important;
    width: 100%;
}
.detail-view .card-title h5 {
    flex-grow: 1;
    margin-right: 10px;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* star-icon já existe no board; aqui mantemos a versão do flow-view (mesma intenção) */
.star-icon {
    cursor: pointer;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    z-index: 3;
    margin-top: 0 !important;
    -webkit-text-stroke: 1px gray;
    text-stroke: 1px gray;
}
.star-icon.red { color: red; }
.star-icon.yellow { color: yellow; }
.star-icon.green { color: green; }
.star-icon.none {
    color: white;
    -webkit-text-stroke: 1px gray;
    text-stroke: 1px gray;
}

.document-list { display: flex; flex-direction: column; gap: 10px; }
.document-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}
.document-card a { text-decoration: none; color: inherit; }
.document-actions { display: flex; gap: 10px; }
.document-actions a { color: #007bff; font-size: 1.2em; }
.document-actions a:hover { color: #0056b3; }

#loading-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1051;
    padding: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#loading-animation img { max-width: 150px; max-height: 150px; }

.internal-interaction {
    background-color: #fdfbfb;
    border-left: 4px solid #e28ca4;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.interacao-interna-header {
    font-weight: bold;
    color: #c63b61;
    font-size: 14px;
}
.agendamento-badge {
    font-weight: normal;
    color: #5c5c5c;
    font-size: 13px;
    margin-left: 8px;
}

/* ============================================================
   4) DETAILVIEW-STYLE (detailview-style.css)
   ============================================================ */
.detail-view th {
    background-color: #f2f2f2;
    color: #333;
}
.detail-view td { background-color: #ffffff; }
.detail-view table { border: 1px solid #ddd; }

.grid-view .table {
    border-collapse: collapse;
    width: 100%;
    border: 5px solid #ddd;
}
.grid-view .table th, .grid-view .table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.grid-view .table thead th {
    background-color: #f8f8f8;
    color: #333;
}
.grid-view .table tbody tr:nth-child(odd) { background-color: #ffffff; }
.grid-view .table tbody tr:nth-child(even) { background-color: #ffffff; }
.grid-view .table tfoot td {
    background-color: #f8f8f8;
    color: #333;
}
.tag-value { cursor: pointer; }
.tag-value:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}
tr { height: 58px; }

/* ============================================================
   5) TAGS + CHAT (flow-tags.css)
   ============================================================ */
.tag-icon-white-bg {
    background-color: white;
    color: #007bff;
    border: 1px solid #007bff;
}
.tag-icon-white-bg:hover {
    background-color: #007bff;
    color: white;
}

/* Histórico de mensagens (mantém) */
.message-history {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 8px;
    list-style: none;
    font-family: 'Roboto', sans-serif;
    color: #333;
    opacity: 1;
    text-shadow: none;
    filter: none;
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: -0.1px;
}

/* mensagens */
.from-operator {
    align-self: flex-end;
    max-width: 75%;
    background: #007bff;
    color: white;
    padding: 6px 10px;
    border-radius: 12px 12px 0 12px;
    margin: 3px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-align: left;
    font-size: 0.9em;
    line-height: 1.2;
}
.from-user {
    align-self: flex-start;
    max-width: 75%;
    background: #e9ecef;
    color: #333;
    padding: 6px 10px;
    border-radius: 12px 12px 12px 0;
    margin: 3px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    text-align: left;
    font-size: 0.9em;
    line-height: 1.2;
}
.from-user,
.from-operator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: visible;
}
.from-user audio,
.from-operator audio {
    display: block;
    width: 100%;
    max-width: 280px;
    margin-top: 6px;
}
.from-user > audio,
.from-operator > audio {
    flex-shrink: 0;
}
.message-bubble {
    position: relative;
}

/* Reação */
.message-reaction {
    position: absolute;
    bottom: -10px;
    right: 10px;

    background: #fff;
    border-radius: 12px;
    padding: 2px 6px;

    font-size: 16px;
    line-height: 1;

    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Se for mensagem recebida, joga para esquerda */
.message-in .message-reaction {
    right: auto;
    left: 10px;
}

.message-reply {
    padding: 6px 8px;
    margin-bottom: 6px;

    border-left: 3px solid #4caf50;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;

    font-size: 12px;
}

.message-reply .reply-author {
    font-weight: 600;
    font-size: 11px;
    color: #2e7d32;
    margin-bottom: 2px;
}

.message-reply .reply-content {
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Para mensagens recebidas */
.message-in .message-reply {
    border-left-color: #1976d2;
}

.message-in .message-reply .reply-author {
    color: #1976d2;
}

.external-message {
    border: 1px solid #ff9900;
    background-color: #fff3e0;
    color: #663300;
}

.small-inline {
    font-size: 0.7em;
    margin-top: 2px;
    display: block;
    text-align: right;
    color: #663300;
}
.message-meta {
    font-size: 0.7em; /* Tamanho menor */
    margin-top: 2px; /* Espaço menor acima */
    display: block;
    text-align: right;
    color: #663300; /* Texto mais escuro */
}
.from-operator .small-inline { color: rgba(255, 255, 255, 0.8); }
.external-message .small-inline { color: #888; }
.from-user .small-inline { color: #888; }

.message-highlight {
    animation: highlightFade 2s ease-out;
    background: rgba(255, 235, 59, 0.25);
    border-radius: 6px;
}

@keyframes highlightFade {
    0% {
        background: rgba(255, 235, 59, 0.6);
    }
    100% {
        background: rgba(255, 235, 59, 0.25);
    }
}

.message-reply{
    display:block;
    cursor:pointer;
    pointer-events:auto;
    padding:6px 8px;
    margin-bottom:6px;
    border-left:3px solid #4caf50;
    background: rgba(0,0,0,0.05);
    border-radius:4px;
}

.message-reply .reply-author{
    font-weight:600;
    font-size:11px;
    margin-bottom:2px;
}

.message-reply .reply-content{
    font-size:12px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* área de input */
.message-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* seletor de usuário */
.user-select {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
    font-size: 1em;
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.user-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.5);
    outline: none;
}

/* links dentro das mensagens */
.from-operator a { color: #ffecb3; text-decoration: none; }
.from-user a { color: #ffecb3; text-decoration: none; } /* mantém como estava */
.external-message a { color: #000000; }
.from-operator a:hover, .from-user a:hover { color: #000000; }
.external-message a:hover { color: #007bff; }

/* ============================================================
   FIX CRÍTICO: evitar poluir o sistema inteiro
   O flow-tags.css tinha textarea{} e button{} globais.
   Agora escopamos ao chat (.message-input), preservando intenção sem quebrar board/adminlte.
   ============================================================ */
.message-input textarea {
    resize: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.message-input textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 3px rgba(0, 123, 255, 0.5);
    outline: none;
}
.message-input button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.message-input button:hover {
    background: #0056b3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.message-input button:active {
    background: #004085;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.reaction {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.8em;
    color: #666;
    background: #f1f1f1;
    border-radius: 10px;
    padding: 2px 5px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

audio {
    width: 100%;
    max-width: 300px;
    margin-top: 10px;
    border-radius: 5px;
}

.message-check {
    font-size: 12px;
    margin-left: 5px;
    color: #bcbcbc;
    display: inline-block;
    vertical-align: middle;
}
.message-check.read { color: #007bff; }

.copy-link-btn {
    background: none;
    border: none;
    padding: 0;
    margin-left: 6px;
    cursor: pointer;
    vertical-align: baseline;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    color: #007bff;
}
.copy-link-btn:hover {
    color: #0056b3;
    transform: scale(1.1);
}
.copy-link-btn i { font-size: 0.85em; }

/* ============================================================
   FLOW MESSAGES (WhatsApp Layout) (flow-tags.css)
   ============================================================ */
#flow-messages-wrapper {
    display: flex;
    height: calc(100vh - 120px);
    overflow: hidden;
}
#flow-messages-sidebar {
    width: 340px;
    background: #fff;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}
.sidebar-list {
    flex: 1;
    overflow-y: auto;
}
#stage-tabs {
    margin-top: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.stage-tab {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f3f3f3;
    cursor: pointer;
}
.stage-tab.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Lista de conversas */
.flow-chat-list { list-style: none; margin: 0; padding: 0; }
.chat-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.chat-item:hover { background: #f6f6f6; }
.chat-item.active { background: #e6f0ff; }
.chat-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    margin-right: 10px;
}

/* Área principal do chat */
#flow-messages-chat {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
}
.chat-main-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
#chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto;
    background-image: url('https://easyflows.com.br/app/imagens/whatsapp-bg-light.png');
    background-repeat: repeat;
}

/* Override específico dentro do WhatsApp layout */
#chat-area .message-history {
    background: transparent;
    border: none;
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    margin: 0;
}
.chat-header-bar {
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
    background: #ffffff;
}
.chat-footer {
    width: 100%;
}

/* Mensagens (layout bubble) */
.message-item { margin-bottom: 8px; display: flex; }
.message-out { justify-content: flex-end; }
.message-in { justify-content: flex-start; }
.message-bubble {
    max-width: 70%;
    padding: 8px 10px;
    border-radius: 8px;
    background: #e1ffc7;
}
.message-in .message-bubble { background: #ffffff; }

/* Input (whatsapp) */
#flow-messages-chat .message-input {
    border-top: 1px solid #ddd;
    padding: 8px 12px;
    background: #f9f9f9;
}
/* ============================================================
   FLOW MESSAGES — SIDEBAR ITEM STRUCTURE
   ============================================================ */
.sidebar-search {
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

#flow-search-input {
    border-radius: 20px;
    padding-left: 15px;
}

.flow-search-wrapper {
    position: relative;
}

.flow-search-wrapper input {
    padding-right: 35px;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #999;
    display: none;
}

.search-clear-btn:hover {
    color: #333;
}

.chat-item-body {
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.chat-item-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.chat-item-time {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.chat-item-subtitle,
.chat-item-lastmsg {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-lastmsg {
    color: #999;
}

.chat-item-unread {
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #007bff;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}
/* ============================================================
   FLOW MESSAGES — INPUT ROW
   ============================================================ */

.chat-input-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.chat-input-row select,
.chat-input-row textarea {
    font-size: 13px;
}

.chat-input-row select {
    max-width: 260px;
}

.chat-input-row textarea {
    flex: 1;
    resize: vertical;
    min-height: 40px;
    max-height: 120px;
}
/* ============================================================
   FLOW MESSAGES — NEW MESSAGES BADGE
   ============================================================ */

.new-messages-badge {
    position: absolute;
    right: 20px;
    bottom: 80px;
    z-index: 20;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ============================================================
   FLOW MESSAGES — ABRIR MODAL COM A DEMANDA
   ============================================================ */
/* Fullscreen-like para Bootstrap 4 */
.modal-dialog-fullscreen {
    width: 90vw;
    max-width: 90vw;
    height: 85vh;
    margin: 0 auto;
}

.modal-dialog-fullscreen .modal-content {
    height: 85vh;
    border-radius: 10px;
    overflow: hidden;
}


.modal-dialog-fullscreen .modal-body {
    height: 100%;
    overflow-y: auto;
}

/* Esconde prev/next quando estiverem desabilitados (Yii2 LinkPager real) */
.flow-pagination li.prev.disabled,
.flow-pagination li.next.disabled {
    display: none !important;
}

/* ============================================================
   FLOW MESSAGES — INDICAÇÃO DE LEITURA
   ============================================================ */
.message-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #999;
}

.message-status {
    font-size: 12px;
}

.message-delivered {
    color: #999; /* cinza */
}

.message-read {
    color: #34b7f1; /* azul WhatsApp */
}

/* ============================================================
   FLOW MESSAGES — EMOJIS
   ============================================================ */
.chat-message,
#message-content,
.message-history {
    font-family:
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            "Segoe UI Emoji",
            "Apple Color Emoji",
            "Noto Color Emoji",
            sans-serif;
}


/* ✅ Garante que as colunas do grid possam encolher sem “invadir” a outra */
.flow-view-row {
    display: flex;
    flex-wrap: wrap;
}
.flow-view-row > [class*="col-"] {
    min-width: 0; /* MUITO importante pra overflow em flex/grid */
}

/* ✅ Impede estouro por texto/links longos dentro do DetailView */
.flow-detailview,
.flow-detailview table,
.flow-detailview td,
.flow-detailview th {
    max-width: 100%;
}

.flow-detailview td,
.flow-detailview th {
    overflow-wrap: anywhere;  /* quebra onde precisar */
    word-break: break-word;  /* fallback */
}

/* Links gigantes (Mercado Livre etc.) */
.flow-detailview a {
    overflow-wrap: anywhere;
    word-break: break-all;
}

/* ✅ Se ainda assim tiver algum table/layout estourando, força scroll horizontal só dentro do bloco */
.flow-detailview {
    overflow-x: auto;
}

.checklist-item-row {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.checklist-item-row.checklist-overdue {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
}

.checklist-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
}

.checklist-meta-user,
.checklist-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.checklist-title {
    font-weight: 500;
}

.checklist-drag-handle {
    color: #6c757d;
    user-select: none;
}

.checklist-drag-handle:hover {
    color: #343a40;
}

.sortable-placeholder {
    height: 44px;
    margin-bottom: 6px;
    border: 1px dashed #adb5bd;
    border-radius: 6px;
    background: #f8f9fa;
}

.checklist-edit,
.checklist-del {
    padding: 4px 6px;
    font-size: 14px;
}

.checklist-edit:hover {
    color: #0d6efd;
}

.checklist-del:hover {
    color: #dc3545;
}

.checklist-meta:empty {
    display: none;
}

/* Filtros de direção */
.board-header {
    background: transparent;
}

.board-demand-filters {
    margin-left: 0;
    background: #f4f6f9;
    padding: 4px;
    border-radius: 20px;
}

/* botão padrão */
.filter-button-direction {
    background: transparent;
    color: #495057;
    border: none;
    padding: 6px 14px;
    border-radius: 18px;
    font-weight: 500;
    transition: all 0.15s ease;
}

/* hover */
.filter-button-direction:hover {
    background: #e9ecef;
    color: #212529;
}

/* botão ativo */
.filter-button-direction.active-pipe {
    background: #17a2b8;
    color: #fff;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}


/* =========================
   FlowTagsWidget v1
   ========================= */

.flow-side-panel-card {
    border-radius: 12px;
    overflow: hidden;
}

.flow-tabs-clean .nav-link {
    min-width: 46px;
    text-align: center;
    border-radius: 8px !important;
    margin-right: 6px;
}

.flow-overview-panel {
    display: block;
}

.flow-section-card {
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 0;
}

.flow-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.flow-section-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #2c3e50;
}

.flow-section-subtitle {
    font-size: 12px;
    color: #6c757d;
}

.flow-inline-tag-box {
    margin-top: 15px;
    padding: 14px;
    background: #f8fafc;
    border: 1px dashed #cfd8e3;
    border-radius: 10px;
}

.flow-inline-tag-box__title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.flow-tag-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
}

.flow-tag-card {
    position: relative;
    min-height: 88px;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform .15s ease, box-shadow .15s ease;
}

.flow-tag-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.flow-tag-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.flow-tag-card__category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: 0.9;
    line-height: 1.2;
}

.flow-tag-card__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flow-tag-card__action-link {
    color: inherit;
    opacity: .9;
    text-decoration: none;
    font-size: 13px;
}

.flow-tag-card__action-link:hover {
    color: inherit;
    opacity: 1;
    text-decoration: none;
}

.flow-tag-card__value-wrap {
    margin-top: 10px;
}

.flow-tag-card__value {
    display: inline-block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.flow-tag-card__value--editable {
    cursor: pointer;
    border-bottom: 1px dashed rgba(255,255,255,.45);
    padding-bottom: 1px;
}

.flow-tag-card__value--editable:hover {
    opacity: .9;
}

.flow-empty-state {
    padding: 24px 16px;
    border: 1px dashed #d8dee6;
    border-radius: 12px;
    text-align: center;
    color: #6c757d;
    background: #fafbfc;
}

.flow-empty-state i {
    font-size: 22px;
    opacity: .8;
}

.flow-checklist-section .card-body,
.flow-tags-section .card-body {
    padding: 16px;
}

.checklist-list .list-group-item {
    border-left: 0;
    border-right: 0;
}

.checklist-list .list-group-item:first-child {
    border-top: 1px solid #e9ecef;
}

.checklist-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.checklist-meta-user,
.checklist-meta-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@media (max-width: 767.98px) {
    .flow-tag-card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .flow-tag-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Remove a linha inferior das tabs do painel lateral */
.flow-tabs-clean .nav {
    border-bottom: 0 !important;
    gap: 8px;
}

.flow-tabs-clean > .nav,
.flow-tabs-clean .nav-tabs {
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.flow-tabs-clean .nav-item {
    margin-bottom: 0 !important;
}

.flow-tabs-clean .nav-link {
    min-width: 46px;
    text-align: center;
    border-radius: 8px !important;
    padding: 10px 14px;
    border: 0 !important;
    background: transparent;
    transition: background-color .15s ease, transform .15s ease;
}

.flow-tabs-clean .nav-link:hover {
    background-color: #eef3f8 !important;
    transform: translateY(-1px);
}

.flow-tabs-clean .nav-link.active,
.flow-tabs-clean .nav-item.show .nav-link {
    background-color: #eef3f8 !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none;
}

.flow-inline-tag-box .btn-group .btn.active {
    box-shadow: none;
}

#inline-tag-feedback {
    font-size: 12px;
    font-weight: 600;
}

.inline-tag-form-box {
    margin-top: 15px;
}

.inline-tag-mode-group .btn.active {
    box-shadow: none;
}

.inline-tag-feedback {
    font-size: 12px;
    font-weight: 600;
}

.inline-tag-predefined-fields,
.inline-tag-custom-fields {
    transition: all .15s ease;
}

/* ==========================================
   Flow tree / node layout — estilo clean
   ========================================== */

.flow-node-card {
    border: none !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    background-clip: padding-box;
}

.flow-node-card::before {
    display: none;
    content: none;
}

.flow-node-card > .card-body {
    padding: 16px;
}

.flow-node-card .row.align-items-start {
    margin-left: -10px;
    margin-right: -10px;
}

.flow-node-card .row.align-items-start > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

/* Coluna esquerda */
.flow-node-card .flow-detailview {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.flow-node-card .flow-detailview .table,
.flow-node-card .flow-detailview .detail-view {
    margin-bottom: 0;
}

/* Botões do nó */
.flow-node-card .btn {
    margin-bottom: 4px;
}

/* Interações dentro da coluna esquerda */
.flow-node-inline-interaction {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.flow-node-inline-interaction .table,
.flow-node-inline-interaction .detail-view {
    margin-bottom: 0;
}

.flow-node-inline-interaction + .flow-node-inline-interaction {
    margin-top: 10px !important;
}

/* Interação interna */
.flow-node-inline-interaction.internal-interaction {
    background: rgba(255, 248, 225, 0.78);
    border-color: rgba(240, 173, 78, 0.25);
}

.interacao-interna-header {
    font-size: 12px;
    font-weight: 600;
    color: #7a5a00;
}

/* Agendamento */
.agendamento-badge {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Coluna direita com widget */
.flow-node-card .col-md-5 > .card:first-child,
.flow-node-card .col-md-5 .flow-side-panel-card {
    margin-bottom: 0;
}

/* Espaço entre cards de subdemanda */
.flow-node-card + .flow-node-card {
    margin-top: 12px;
}

/* Responsivo */
@media (max-width: 991.98px) {
    .flow-node-card .col-md-7,
    .flow-node-card .col-md-5,
    .flow-node-card .col-md-12 {
        margin-bottom: 12px;
    }
}

.flow-tree-root-card {
    border: none !important;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.flow-tree-root-card > .card-body {
    background: #fbfcfe;
    border-radius: 12px;
}

/* Espaçamento e base */
/* Espaçamento e texto */
.icons .icon.checklist {
    margin-left: 8px;
}

.icons .checklist-time {
    margin-left: 4px;
    font-weight: 600;
}

/* Base visual do ícone de checklist: círculo igual aos demais */
.icons .icon.checklist {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b8b8b8;
    background: #f3f3f3;
    vertical-align: middle;
}

.icons .icon.checklist i.checklist-icon {
    font-size: 12px;
    color: #555 !important;
    -webkit-text-stroke: 0 !important;
    line-height: 1;
}

/* Estado: nenhum concluído */
.icons .icon.checklist.checklist-none {
    background: #f1f3f5;
    border-color: #c8ced3;
}

.icons .icon.checklist.checklist-none i.checklist-icon {
    color: #6c757d !important;
}

.icons .checklist-time.checklist-none {
    color: #6c757d !important;
}

/* Estado: parcial */
.icons .icon.checklist.checklist-partial {
    background: #fd7e14;
    border-color: #e46f10;
}

.icons .icon.checklist.checklist-partial i.checklist-icon {
    color: #ffffff !important;
}

.icons .checklist-time.checklist-partial {
    color: #fd7e14 !important;
}

/* Estado: completo */
.icons .icon.checklist.checklist-full {
    background: #28a745;
    border-color: #218838;
}

.icons .icon.checklist.checklist-full i.checklist-icon {
    color: #ffffff !important;
}

.icons .checklist-time.checklist-full {
    color: #28a745 !important;
}

.flow-checklist-section .checklist-group-card {
    border: 1px solid #d9e2ec;
    border-left: 4px solid #3b82f6;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    background: #fff;
}

.flow-checklist-section .checklist-group-card .card-header {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-bottom: 1px solid #dbe7f3;
    padding: 10px 14px;
}

.flow-checklist-section .checklist-group-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-checklist-section .checklist-group-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #dbeafe;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.flow-checklist-section .checklist-group-title {
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.flow-checklist-section .checklist-group-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.flow-checklist-section .checklist-group-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.flow-checklist-section .checklist-group-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.flow-checklist-section .checklist-group-actions .btn-link {
    padding: 4px 6px;
}

.flow-checklist-section .checklist-group-body {
    background: #fcfdff;
    padding: 10px 12px 12px;
}

.flow-checklist-section .checklist-group-inline-add {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.flow-checklist-section .checklist-group-inline-add input {
    border-radius: 10px;
}

.flow-checklist-section .checklist-group-inline-add .btn {
    white-space: nowrap;
    border-radius: 10px;
}

.flow-checklist-section .checklist-list {
    border-radius: 10px;
    overflow: hidden;
}

.flow-checklist-section .checklist-item-row {
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.flow-checklist-section .checklist-item-row:hover {
    background: #f8fafc;
    border-left-color: #93c5fd;
}

.flow-checklist-section .checklist-overdue {
    background: #fff7f7;
    border-left-color: #ef4444;
}

.flow-checklist-section .checklist-empty-group {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
    background: #f8fafc;
}

.flow-checklist-section .checklist-ungrouped-title {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.flow-checklist-section .checklist-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.flow-checklist-section .checklist-group-toggle {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #475569;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
}

.flow-checklist-section .checklist-group-toggle:hover {
    background: rgba(148, 163, 184, 0.12);
}

.flow-checklist-section .checklist-group-toggle .toggle-icon {
    transition: transform 0.18s ease;
}

.flow-checklist-section .checklist-group-card.is-collapsed .checklist-group-toggle .toggle-icon {
    transform: rotate(-90deg);
}

.flow-checklist-section .checklist-group-progress-wrap {
    margin-top: 10px;
    margin-bottom: 10px;
}

.flow-checklist-section .checklist-group-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 10px;
}

.flow-checklist-section .checklist-group-progress-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.flow-checklist-section .checklist-group-progress-numbers {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.flow-checklist-section .checklist-group-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.flow-checklist-section .checklist-group-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    transition: width 0.2s ease;
}

.flow-checklist-section .checklist-group-progress-fill.is-complete {
    background: linear-gradient(90deg, #34d399 0%, #059669 100%);
}

.flow-checklist-section .checklist-group-body {
    transition: all 0.18s ease;
}

.flow-checklist-section .checklist-group-card.is-collapsed .checklist-group-body {
    display: none;
}

.flow-checklist-section .checklist-group-summary {
    display: none;
    padding: 10px 14px 12px;
    background: #f8fbff;
    border-top: 1px solid #e5edf6;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.flow-checklist-section .checklist-group-card.is-collapsed .checklist-group-summary {
    display: block;
}

.flow-checklist-section .checklist-group-summary strong {
    color: #334155;
}

.flow-checklist-section .checklist-general-card {
    border-left-color: #64748b;
}

.flow-checklist-section .checklist-group-actions .checklist-create-group-btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 4px 10px;
}

.flow-checklist-section .checklist-group-inline-add {
    display: grid;
    grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 1fr) minmax(120px, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
}

.flow-checklist-section .checklist-group-inline-add .form-control,
.flow-checklist-section .checklist-group-inline-add .btn {
    border-radius: 10px;
}

@media (max-width: 991px) {
    .flow-checklist-section .checklist-group-inline-add {
        grid-template-columns: 1fr;
    }
}