/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: white !important;
}

.navbar-brand i {
    font-size: 1.8rem;
    margin-right: 0.5rem;
}

/* Kanban Container */
.kanban-container {
    height: calc(100vh - 92px);
    overflow: hidden;
    padding: 0px 10px;
    overflow-x: hidden;
}

/* Kanban Columns Container - Horizontal Scroll */
.kanban-columns {
    display: flex;
    gap: 1rem;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 1rem;
    min-width: 100%;
}

/* Custom Scrollbar for Horizontal Scroll */
.kanban-columns::-webkit-scrollbar {
    height: 12px;
}

.kanban-columns::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.kanban-columns::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
}

.kanban-columns::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Kanban Columns */
.kanban-column {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
    flex: 0 0 20%;
    min-width: 300px;
    max-width: 350px;
}

.kanban-column:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Column Headers */
.column-header {
    padding: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
}

.column-header:active {
    cursor: grabbing;
}

.column-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    pointer-events: none;
}

/* Column border colors - aplicado dinamicamente */
.kanban-column:nth-child(4n+1) .column-header {
    border-bottom-color: #e3e8ef;
}

.kanban-column:nth-child(4n+2) .column-header {
    border-bottom-color: #ffd6a5;
}

.kanban-column:nth-child(4n+3) .column-header {
    border-bottom-color: #a8dadc;
}

.kanban-column:nth-child(4n+4) .column-header {
    border-bottom-color: #a8e6cf;
}

/* Add Card Button */
.add-card-button {
    background: transparent;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin: 0 1rem 1rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.875rem;
}

.add-card-button:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.add-card-button i {
    font-size: 1.2rem;
    margin-left: -15px;
}

/* Add Button (old style - mantido para compatibilidade) */
.btn-add {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #666;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
}

.btn-add:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Column Actions */
.column-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Column Menu */
.column-menu {
    position: relative;
}

.column-menu-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 0.5;
    padding: 7px 10px 12px 10px;
}

.column-menu-btn:hover {    background: #677ce7;
    color: #fff;
}

.column-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.column-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.column-menu-action {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.column-menu-action:last-child {
    border-bottom: none;
}

.column-menu-action:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.column-menu-action.text-danger {
    color: #dc3545;
}

.column-menu-action.text-danger:hover {
    background-color: #fee;
    color: #dc3545;
}

/* Column Drag and Drop Styles */
.column-ghost {
    opacity: 0.4;
}

.column-chosen {
    opacity: 0.8;
}


.kanban-column.sortable-drag {
    cursor: grabbing;
}

/* Cards Container */
.cards-container {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 50px;
    margin-bottom: 15px;
    border-bottom: solid 1px #e8e8e8;
    padding-bottom: 15px;
}

.cards-container::-webkit-scrollbar {
    width: 6px;
}

.cards-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.cards-container::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
}

.cards-container::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Cards */
.kanban-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.kanban-card:last-child {
    margin-bottom: 0;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.kanban-card.sortable-ghost {
    opacity: 0.4;
    background: #f0f0f0;
}

.kanban-card.sortable-chosen {
    opacity: 0.8;
    cursor: grabbing;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.card-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: -8px;
}

.card-date {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

.card-actions {
    opacity: 1;
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.btn-edit, .btn-delete {
    background: white;
    border: 1px solid #e0e0e0;
    color: #666;
    width: 25px;
    height: 25px;
    border-radius: 6px;
    display: inline-flex
;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-edit:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-delete:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* Modal de Edição */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    color: white;
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

/* Estilos para critérios de aceite */
.acceptance-criteria-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
}

.acceptance-criteria-list {
    max-height: 300px;
    overflow-y: auto;
}

.acceptance-criteria-item {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.acceptance-criteria-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-color: #d0d0d0;
}

.acceptance-criteria-item .form-check {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    position: relative;
}

.acceptance-criteria-item .form-check-input {
    cursor: pointer;
    margin-top: 0;
    flex-shrink: 0;
}

.acceptance-criteria-item .form-check-label {
    flex-grow: 1;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding-right: 70px; /* Espaço para os botões */
}

.acceptance-criteria-item .form-check-label.text-decoration-line-through {
    color: #6c757d;
    opacity: 0.7;
}

.criteria-actions {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.acceptance-criteria-item:hover .criteria-actions {
    opacity: 1;
}

.criteria-actions .btn-link {
    padding: 2px 6px !important;
}

/* Botão de adicionar critério */
.btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

/* Responsividade para móveis */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
    
    .kanban-column {
        width: 100%;
        margin-bottom: 1rem;
        height: auto;
        min-height: 400px;
    }
    
    .cards-container {
        max-height: 350px;
    }
}

/* Toast de salvamento */
.save-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1050;
}

.save-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Contador de cards */
.card-count {
    background: #f0f0f0;
    color: #666;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

/* Modal de Card Customizado */
.modal-card-custom {
    max-width: 1200px;
    width: 95%;
}

.modal-card-custom .modal-content {
    height: 85vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
}

.modal-card-custom .modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.modal-card-custom #cardForm {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Sistema de Tabs no Modal */
.modal-card-custom .tab-content {
    overflow: visible;
}

.modal-card-custom .tab-pane {
    display: none;
}

.modal-card-custom .tab-pane.active {
    display: block;
}

/* Painel de Descrição com TinyMCE */
.modal-card-custom #description-panel .mb-3 {
    margin-bottom: 1rem;
}

/* TinyMCE Custom - altura dinâmica controlada por JS */
.tox-tinymce {
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
}

.tox .tox-toolbar__primary {
    background: #f9fafb !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.modal-card-custom .tox-tinymce {
    width: 100% !important;
}

/* Botão de fechar do modal de card */
#cardModal .btn-close {
    background-color: transparent;
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Transição suave para botões */
.btn-primary, .btn-success {
    transition: all 0.3s ease;
}

/* Animação do spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Botão flutuante de Notas */
.btn-notes-float {
    position: fixed;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1040;
    cursor: pointer;
}

.btn-notes-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-notes-float:active {
    transform: scale(0.95);
}

.btn-notes-float i {
    font-size: 32px;
}

/* Modal de Notas Estilizado */
#notesModal .modal-dialog {
    max-width: 80%;
    min-width: 900px;
    height: calc(100vh - 50px);
}

#notesModal .modal-content {
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
}

#notesModal .modal-body {
    padding: 0;
}

.notes-textarea {
    width: 100%;
    height: 100%;
    border: none;
    padding: 30px 40px;
    font-size: 16px;
    line-height: 1.8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    resize: none;
    background: #fafbfc;
}

.notes-textarea:focus {
    outline: none;
    background: white;
}

/* Botão de fechar customizado */
.custom-close-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.custom-close-btn:hover {
    background: #0000004f !important;
}

/* Responsividade para o modal */
@media (max-width: 768px) {
    #notesModal .modal-dialog {
        width: 95%;
        margin: 10px auto;
    }
    
    .notes-textarea {
        padding: 20px;
        font-size: 15px;
    }
}

/* Animação suave para modais */
.modal.fade .modal-dialog {
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* Ajuste do z-index do Sweet Alert */
.swal2-container {
    z-index: 2000 !important;
}

/* Estilização do botão de salvar */
.btn-save-notes {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-save-notes:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Status de salvamento */
.save-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.save-status.saving {
    color: #3b82f6;
}

.save-status.saved {
    color: #10b981;
}

.save-status.error {
    color: #ef4444;
}

/* Ícone animado de salvamento */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.save-status.saving i {
    animation: spin 1s linear infinite;
}

/* Texto com placeholders */
.notes-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Correção para evitar scroll horizontal desnecessário */
body {
    overflow-x: hidden;
}

/* TinyMCE configurado na seção .modal-card-custom acima */

/* Container das abas de documentos */
.documents-tabs-container {
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.tabs-scroll-container {
    flex: 1;
    overflow: hidden;
    scrollbar-width: thin;
       margin-right: 25px;
}

.tabs-scroll-container::-webkit-scrollbar {
    height: 4px;
}

.tabs-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.tabs-scroll-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.tabs-wrapper {
    display: flex;
    align-items: flex-end;
    padding: 8px 8px 0 8px;
    gap: 2px;
    width: 100%;
}

/* Container da tab (aba) */
.tab {
    display: flex;
    align-items: center;
    padding: 6px;
    background: rgb(0 0 0 / 15%);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-width: 60px;
    max-width: 170px; /* Limitar largura máxima */
    height: 30px;
    color: #ffffffa8;
}

.tab:hover {
    background: rgba(0, 0, 0, 0.08);
}

.tab.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    min-width: 0;
    line-height: 1.2;
    
}

.tab-title.editing {
    background: white;
    border: 1px solid #667eea;
    border-radius: 4px;
    padding: 2px 6px;
    outline: none;
}

.tab-indicators {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0; /* Não deixa os indicadores encolherem */
}

.tab-unsaved {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.tab-close {
    width: 12px;
    height: 12px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
    color: #6b7280;
    font-size: 12px;
    right: -2px;
    top: -6px;
    position: relative;
}

.tab:hover .tab-close {
    opacity: 1;
}

.tab-close:hover {
    background: #ffffff69;
    color: #ef4444;
}

.tab-new {
    min-width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 2px;
    font-size: 16px;
    padding: 0;
    border-radius: 8px 8px 0 0;
}

.tab-new:hover {
    background: #00000029;
}

/* Container dos documentos */
.documents-container {
    height: 100%;
    position: relative;
}

.document-editor {
    display: none;
    height: 100%;
    width: 100%;
}

.document-editor.active {
    display: block;
}

.document-textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    padding: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #1f2937;
    resize: none;
}

#notesModal .modal-header {
    padding: 0;
    border: none;
    position: relative;
}

#notesModal .custom-close-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 10;
    width: 23px;
    height: 22px;
    background: none;
    font-size: 10px;
    color: #ffff;
    border: none;
}

#notesModal .modal-footer small {
    color: #6b7280;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Toast customizado com cores mais vibrantes */
.toast-container {
    z-index: 9999;
}

.toast.bg-success {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.bg-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.bg-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.bg-info {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%) !important;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast {
    font-weight: 500;
    border-radius: 12px;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-body {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* SweetAlert2 customizado */
.swal2-popup {
    border-radius: 15px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.swal2-title {
    font-size: 24px !important;
    font-weight: 600 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
}

.swal2-confirm:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
    transform: translateY(-1px);
}

.swal2-cancel {
    background-color: #6c757d !important;
    border: none !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
}

.swal2-cancel:hover {
    background-color: #5a6268 !important;
}

/* Correção de overflow quando modal está aberto */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

/* Previne scroll no modal */
#notesModal {
    overflow-y: hidden;
}

#notesModal .modal-dialog {
    margin: 1.75rem auto;
}

/* Ajuste para garantir que o modal não exceda o viewport */
#notesModal .modal-dialog-centered {
    min-height: calc(100% - (1.75rem * 2));
    align-items: center;
}

/* Responsividade para Bloco de Notas */
@media (max-width: 768px) {
    /* Ajustes para o botão flutuante no mobile */
    .btn-notes-float {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    /* Modal responsivo */
    #notesModal .modal-dialog {
        width: 95%;
        height: 90vh;
        margin: 5vh auto;
    }
    
    .notes-textarea {
        padding: 20px;
        font-size: 15px;
    }
    
    /* Ajustes para o Kanban no mobile */
    .kanban-container {
        padding: 0.5rem;
    }
    
    .kanban-column {
        height: calc(100vh - 120px);
        min-width: 280px;
        max-width: 320px;
    }
    
    .column-header {
        padding: 1rem;
    }
    
    .cards-container {
        padding: 0.75rem;
    }
    
    .kanban-card {
        padding: 0.75rem;
    }
}

/* ===================================
   PLANOS/PROMPTS DE IA
   =================================== */

/* Container de Prompts */
.prompts-container {
    padding: 0;
}

.plan-prompts-list {
    overflow-y: auto;
    padding: 0.5rem;
}

.plan-prompts-list::-webkit-scrollbar {
    width: 6px;
}

.plan-prompts-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.plan-prompts-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
}

/* Card de Prompt */
.plan-prompt-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.plan-prompt-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

/* Header do Prompt */
.prompt-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.prompt-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
}

.collapse-icon {
    color: #6b7280;
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.collapse-icon.rotated {
    transform: rotate(180deg);
}

/* Corpo do Prompt */
.prompt-body {
    padding: 1.25rem;
}

.prompt-section {
    margin-bottom: 1.5rem;
}

.prompt-section:last-child {
    margin-bottom: 0;
}

.prompt-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt-section-title i {
    color: #667eea;
}

/* Conteúdo do Prompt */
.prompt-content {
    background: #f9fafb;
    border-left: 3px solid #667eea;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.prompt-content code {
    background: #e5e7eb;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.prompt-content code.git-command {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.prompt-content code.file-path {
    background: #fef3c7;
    color: #92400e;
}

/* Lista de Funcionalidades */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: #4b5563;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1rem;
}

/* Critérios de Aceitação do Prompt */
.prompt-criteria-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prompt-criterion {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.prompt-criterion:hover {
    background: #ffffff;
    border-color: #667eea;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.1);
}

.prompt-criterion .form-check-input {
    cursor: pointer;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #d1d5db;
    transition: all 0.2s ease;
}

.prompt-criterion .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.prompt-criterion .form-check-label {
    cursor: pointer;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.3s ease;
}

.prompt-criterion .form-check-label.text-decoration-line-through {
    color: #9ca3af;
    opacity: 0.7;
}

/* Botão de Gerar Plano */
#generatePlanBtn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#generatePlanBtn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

#generatePlanBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Mensagem de "Sem Prompts" */
#noPromptsMessage {
    color: #9ca3af;
}

#noPromptsMessage i {
    color: #fbbf24;
}

/* Tabs do Modal de Card */
#cardTabs .nav-link {
    color: #6b7280;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

#cardTabs .nav-link:hover {
    color: #667eea;
    border-bottom-color: #667eea;
}

#cardTabs .nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: transparent;
}

#cardTabs .nav-link i {
    margin-right: 0.5rem;
}

/* Loading State para geração */
#generatePlanBtn .spinner-border-sm {
    animation: spin 1s linear infinite;
}

/* Animação de Entrada dos Prompts */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-prompt-card {
    animation: fadeInUp 0.4s ease-out;
}

.plan-prompt-card:nth-child(2) {
    animation-delay: 0.1s;
}

.plan-prompt-card:nth-child(3) {
    animation-delay: 0.2s;
}

.plan-prompt-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Responsividade para Prompts */
@media (max-width: 768px) {
    .plan-prompts-list {
        max-height: 400px;
    }

    .prompt-header {
        padding: 0.75rem 1rem;
    }

    .prompt-body {
        padding: 1rem;
    }

    .prompt-content {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .prompt-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    #generatePlanBtn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ===================================
   PLAN PHASES CONTAINER (Fases Expansíveis)
   =================================== */

/* Container principal das fases */
.plan-phases-container {
    padding: 1rem;
}

.plan-phases-list {
    /* Removido scroll - deixar o modal-body controlar */
}

/* Card de cada fase */
.phase-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease;
}

.phase-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header da fase (clicável para expandir/colapsar) */
.phase-header {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.phase-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
}

/* Número da fase */
.phase-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
}

.phase-header h6 {
    color: #ffffff;
    font-weight: 600;
}

/* Botão de copiar fase */
.btn-copy-phase {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    z-index: 10;
    position: relative;
}

.btn-copy-phase:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

/* Chevron indicator */
.phase-chevron {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.phase-chevron.rotated {
    transform: rotate(180deg);
}

/* Body da fase */
.phase-body {
    padding: 0;
    background: #ffffff;
}

.phase-content {
    padding: 1.5rem;
}

/* Container do plano markdown (herdado do anterior) */
.markdown-plan-container {
    padding: 1rem;
}

/* Botões de ação do plano */
.btn-copy-plan, .btn-delete-plan {
    transition: all 0.3s ease;
}

.btn-copy-plan {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Conteúdo markdown renderizado */
.markdown-content {
    background: #ffffff;
    padding: 1.5rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    border: unset;
    /* Removido max-height e overflow-y - deixar o modal-body controlar */
}

/* Títulos no markdown */
.markdown-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.markdown-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.markdown-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #4b5563;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.markdown-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Parágrafos */
.markdown-content p {
    margin-bottom: 1rem;
    color: #4b5563;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

/* Strong/Bold */
.markdown-content strong {
    font-weight: 600;
    color: #1f2937;
}

/* Listas */
.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

/* Listas de checkbox */
.markdown-content ul li input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.markdown-content ul li {
    list-style-type: none;
    position: relative;
}

/* Code inline */
.markdown-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: 'Courier New', Monaco, monospace;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

/* Code blocks */
.markdown-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content pre code {
    background: transparent;
    color: #f9fafb;
    padding: 0;
    border: none;
    font-size: 0.875rem;
}

/* Separadores horizontais */
.markdown-content hr {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 2rem 0;
}

/* Blockquotes */
.markdown-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0 6px 6px 0;
}

/* Tabelas */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.markdown-content table th,
.markdown-content table td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.markdown-content table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.markdown-content table tr:hover {
    background: #f9fafb;
}

/* Links */
.markdown-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.markdown-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsividade para Markdown */
@media (max-width: 768px) {
    .markdown-content {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .markdown-content h1 {
        font-size: 1.5rem;
    }

    .markdown-content h2 {
        font-size: 1.25rem;
    }

    .markdown-content h3 {
        font-size: 1.1rem;
    }

    .markdown-plan-container {
        padding: 0.5rem;
    }
}