@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap');

:root {
    --bg-dark: #05060F;
    --text-secondary: #8D97B4;
    --text-light: #F5F6FF;
    --accent-primary: #FF2D20;
    --card-bg: #0E0F21;
    --card-text: #ffffff;
    --font-main: 'JetBrains Mono', 'Courier New', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;    /* Copiado do Kanban */
    margin-bottom: 3rem; /* Copiado do Kanban */
    gap: 1.5rem;
}

.top-bar h1 {
    font-size: 30px; /* Tamanho igual ao do Kanban */
    font-weight: 700;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    margin-top: 35px; /* Isso alinha a altura do texto com a barra de pesquisa! */
}

.actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
}

.search-container input {
    background: #FFFFFF;
    border: none;
    border-radius: 9999px; /* Formato arredondado igual ao Kanban */
    padding: 0.75rem 1rem 0.75rem 3rem; /* Altura exata do Kanban */
    color: #000;
    width: 500px;
    font-size: 1rem;
    font-weight: 500;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%238D97B4" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: 14px center;
}

.btn-new {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem; /* Altura exata do Kanban */
    border-radius: 9999px; /* Formato arredondado igual ao Kanban */
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.btn-new:hover {
    opacity: 0.8;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;

    /* Impede que os cards estiquem para baixo */
    align-items: start; 
    padding-bottom: 40px;
}

/* Estilo dos cards */
.card {
    display: flex;
    flex-direction: column;
    height: 350px; /* Tamanho fixo perfeito */
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    color: var(--card-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* Transição suave de scale (zoom) e sombra */
    transition: transform 0.2s ease, box-shadow 0.2s ease; 
    cursor: pointer;
}

/* Efeito do card ao passar o mouse */
.card:hover {
    transform: scale(1.03); 
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6); 
}

/* Textos */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-id {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: bold;
}

.card-title {
    font-size: 1.4rem; 
    font-weight: 700;
    margin-bottom: 6px;
}

.card-subtitle {
    display: flex;
    flex-direction: column;
    gap: 6px; 
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.card-desc {
    font-size: 0.95rem; 
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Barra de progresso */
.progress-container {
    margin-top: auto;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-bar-bg {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    height: 8px;
    width: 100%;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--accent-primary);
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease-in-out;
}

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--bg-dark); border: 1px solid rgba(255,255,255,0.1); width: 100%; max-width: 500px; border-radius: 12px; padding: 32px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-group input, .form-group select, .form-group textarea { background: #151929; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 10px; color: white; }

.modal-header {
    display: flex;
    justify-content: space-between; /* Joga o título pra esquerda e o X pra direita */
    align-items: center;
    margin-bottom: 24px;
}
.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}
.btn-close:hover {
    color: var(--accent-primary);
}

/* Botões de Criar e Cancelar */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}
.btn-primary {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}
.btn-primary:hover {
    opacity: 0.9;
}

/* Base da caixinha (Badge) */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800; 
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

/* Cores específicas usando RGBA para dar o efeito de fundo transparente no status */

.badge-alta {
    background-color: rgba(255, 45, 32, 0.15);
    color: var(--accent-primary);
}

.badge-media {
    background-color: rgba(255, 134, 85, 0.15);
    color: #FF8655;
}

.badge-baixa {
    background-color: rgba(59, 130, 246, 0.15); /* Fundo 15% Azul */
    color: #3B82F6; /* Texto Azul brilhante */
}

.badge-planejamento {
    background-color: rgba(141, 151, 180, 0.15);
    color: var(--text-secondary);
}

.badge-concluido {
    background-color: rgba(0, 200, 150, 0.15);
    color: #00FF9D;
}

/* Custom Scrollbar para o Dashboard - Corrigido */
.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}