/* Aralco Commit - Estilos Personalizados */

/* Cores da Identidade Aralco */
:root {
    --aralco-green: #006400;
    --aralco-green-light: #198754;
    --aralco-green-hover: #005600;
    --aralco-bg-light: #f8f9fa;
    --aralco-success: #198754;
    --aralco-warning: #ffc107;
    --aralco-danger: #dc3545;
    --aralco-info: #0d6efd;
}

/* Layout Geral */
body {
    background-color: var(--aralco-bg-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 100px; /* Aumentado para acomodar logo ainda maior */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

/* Navbar */
.navbar {
    background-color: var(--aralco-green) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 90px; /* Aumentado para acomodar logo ainda maior */
    padding: 1rem 0; /* Padding vertical aumentado */
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.9rem; /* Aumentado para ficar proporcional à logo ainda maior */
    color: white !important;
}

.navbar-brand:hover {
    color: #e9f5ec !important;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #e9f5ec !important;
}

.navbar-toggler {
    border-color: white;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Botões */
.btn-primary {
    background-color: var(--aralco-green-light);
    border-color: var(--aralco-green-light);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--aralco-green-hover);
    border-color: var(--aralco-green-hover);
}

.btn-success {
    background-color: var(--aralco-success);
    border-color: var(--aralco-success);
}

.btn-outline-primary {
    color: var(--aralco-green-light);
    border-color: var(--aralco-green-light);
}

.btn-outline-primary:hover {
    background-color: var(--aralco-green-light);
    border-color: var(--aralco-green-light);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #e9f5ec;
    border-bottom: 1px solid #d1e7dd;
    font-weight: 600;
}

/* Tabelas */
.table {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table-hover tbody tr:hover {
    background-color: #e9f5ec;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: var(--aralco-green);
}

/* Status Badges */
.status-novo {
    color: var(--aralco-info);
    font-weight: 600;
}

.status-em_andamento {
    color: var(--aralco-warning);
    font-weight: 600;
}

.status-concluido {
    color: var(--aralco-success);
    font-weight: 600;
}

.status-atrasado {
    color: var(--aralco-danger);
    font-weight: 600;
}

.badge-novo {
    background-color: var(--aralco-info);
}

.badge-em_andamento {
    background-color: var(--aralco-warning);
    color: #000;
}

.badge-concluido {
    background-color: var(--aralco-success);
}

.badge-atrasado {
    background-color: var(--aralco-danger);
}

/* Formulários */
.form-control:focus {
    border-color: var(--aralco-green-light);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.form-select:focus {
    border-color: var(--aralco-green-light);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Alertas */
.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #055160;
}

/* Footer */
.footer {
    background-color: var(--aralco-green);
    color: white;
    margin-top: auto;
    padding: 1rem 0;
    position: relative;
    z-index: 1;
}

/* Dashboard Cards */
.dashboard-card {
    transition: transform 0.3s ease;
    max-height: 400px;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

/* Cards de assuntos - Design Moderno */
.subject-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 400px;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

/* Cabeçalho */
.subject-card .card-header {
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.subject-card .header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.subject-card .title-section {
    flex: 1;
    min-width: 0;
}

.subject-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: block;
    text-decoration: none;
    transition: color 0.2s ease;
}

.subject-card .card-title:hover {
    color: #3b82f6;
}

.subject-card .card-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.subject-card .pinned-icon {
    color: #f59e0b;
    font-size: 14px;
    margin-right: 6px;
}

.subject-card .header-actions {
    flex-shrink: 0;
}

.subject-card .header-actions .btn {
    border: none;
    background: rgba(255, 255, 255, 0.8);
    color: #64748b;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.subject-card .header-actions .btn:hover {
    background: rgba(255, 255, 255, 1);
    color: #374151;
    transform: scale(1.05);
}

/* Corpo */
.subject-card .card-body {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subject-card .tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.subject-card .tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.2s ease;
}

/* Tags de Status */
.subject-card .tag-status.tag-novo {
    background: #dbeafe;
    color: #1e40af;
}

.subject-card .tag-status.tag-em_andamento {
    background: #fef3c7;
    color: #92400e;
}

.subject-card .tag-status.tag-bloqueado {
    background: #f3f4f6;
    color: #374151;
}

.subject-card .tag-status.tag-concluido {
    background: #d1fae5;
    color: #065f46;
}

.subject-card .tag-status.tag-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

/* Tags de Prioridade */
.subject-card .tag-priority.tag-alta {
    background: #fee2e2;
    color: #991b1b;
}

.subject-card .tag-priority.tag-media {
    background: #fef3c7;
    color: #92400e;
}

.subject-card .tag-priority.tag-baixa {
    background: #dbeafe;
    color: #1e40af;
}

/* Tag de Área */
.subject-card .tag-area {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Tags de Prazo */
.subject-card .tag-deadline.tag-overdue {
    background: #fef2f2;
    color: #dc2626;
    animation: pulse-red 2s infinite;
}

.subject-card .tag-deadline.tag-today {
    background: #fffbeb;
    color: #d97706;
    animation: pulse-orange 2s infinite;
}

.subject-card .tag-deadline.tag-urgent {
    background: #fef3c7;
    color: #92400e;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-orange {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.subject-card .card-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    padding: 8px 0;
}

/* Rodapé */
.subject-card .card-footer {
    padding: 16px 20px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-card .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subject-card .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subject-card .user-avatar {
    font-size: 18px;
    color: #6b7280;
}

.subject-card .user-name {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.subject-card .date-info {
    display: flex;
    align-items: center;
}

.subject-card .deadline-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.subject-card .deadline-label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subject-card .deadline-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.subject-card .date-icon {
    font-size: 14px;
    color: #6b7280;
}

.subject-card .date-text {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

.subject-card .date-text.text-danger {
    color: #dc2626 !important;
    font-weight: 600;
}

.subject-card .date-text.text-warning {
    color: #d97706 !important;
    font-weight: 600;
}

.subject-card .date-text.text-info {
    color: #2563eb !important;
}

.subject-card .days-remaining,
.subject-card .days-overdue {
    font-size: 11px;
    font-weight: 400;
    margin-top: 2px;
}

.subject-card .days-overdue {
    color: #dc2626;
}

.subject-card .days-remaining {
    color: inherit;
    opacity: 0.8;
}

.subject-card .footer-meta {
    display: flex;
    justify-content: flex-start;
}

.subject-card .timestamp {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 400;
}

/* Responsividade */
@media (max-width: 768px) {
    .subject-card .card-header,
    .subject-card .card-body,
    .subject-card .card-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .subject-card .tags-section {
        gap: 6px;
    }
    
    .subject-card .tag {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Ícones */
.icon-lg {
    font-size: 2rem;
}

.icon-md {
    font-size: 1.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.6rem; /* Ajustado para mobile */
    }
    
    .navbar-brand img {
        height: 40px; /* Logo maior em mobile também */
    }
    
    body {
        padding-top: 80px; /* Padding ajustado para mobile */
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilitários */
.text-aralco {
    color: var(--aralco-green) !important;
}

.bg-aralco {
    background-color: var(--aralco-green) !important;
}

.border-aralco {
    border-color: var(--aralco-green-light) !important;
}

/* Logo da empresa na navbar */
.navbar-brand img {
    filter: brightness(0) invert(1); /* Torna a logo branca */
    transition: opacity 0.3s ease;
}

.navbar-brand img:hover {
    opacity: 0.8;
}

/* Ajustes para a logo */
.navbar-brand {
    display: flex;
    align-items: center;
}

/* Correção das abas - visibilidade */
.nav-tabs .nav-link {
    color: #495057 !important;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
}

.nav-tabs .nav-link:hover {
    color: #198754 !important;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #198754 !important;
    background-color: white;
    border-color: #dee2e6 #dee2e6 white;
    font-weight: 600;
}

.nav-tabs .nav-link.active:hover {
    color: #198754 !important;
    background-color: white;
}

/* Identidade visual Aralco - tons verdes */
.text-aralco {
    color: #198754 !important;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-outline-success {
    color: #198754;
    border-color: #198754;
}

.btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
}

.progress-bar {
    background-color: #198754;
}

.badge.bg-success {
    background-color: #198754 !important;
}

/* Cards com hover suave */
.card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

/* Correção para texto em cards */
.card-body {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.card-title, .card-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

/* Correção específica para texto em cards de assuntos */
.subject-card .card-body * {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
}

.subject-card .card-body .row {
    margin: 0;
}

.subject-card .card-body .col-6 {
    padding: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

.breadcrumb-item a {
    color: #198754;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #157347;
    text-decoration: underline;
}

/* Status badges */
.badge.bg-primary {
    background-color: #0d6efd !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Timeline styling */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #198754;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 5px;
    width: 30px;
    height: 30px;
    background: #198754;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    z-index: 1;
}

.timeline-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid #198754;
}

/* Icon sizing */
.icon-lg {
    font-size: 3rem;
}

/* Form styling */
.form-control:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.form-select:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Card de membros com rolagem */
.card-body-scroll {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f8f9fa;
}

.card-body-scroll::-webkit-scrollbar {
    width: 8px;
}

.card-body-scroll::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.card-body-scroll::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

.card-body-scroll::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Cabeçalho de tabela sticky */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa !important;
}

/* Estilos para avisos de prazo */
.prazo-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.prazo-info .text-danger {
    animation: pulse-danger 2s infinite;
}

.prazo-info .text-warning {
    animation: pulse-warning 3s infinite;
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Badges de aviso para prazos */
.prazo-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
}

.prazo-badge.atrasado {
    background-color: #dc3545;
    color: white;
    animation: pulse-danger 2s infinite;
}

.prazo-badge.hoje {
    background-color: #ffc107;
    color: #000;
    animation: pulse-warning 3s infinite;
}

.prazo-badge.proximo {
    background-color: #fd7e14;
    color: white;
}

.prazo-badge.normal {
    background-color: #6c757d;
    color: white;
}

/* ===== BREADCRUMB NAVIGATION ===== */
.breadcrumb-nav {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0;
    position: sticky;
    top: 100px; /* Posicionar logo após a navbar */
    z-index: 100;
}

.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--aralco-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--aralco-green-hover);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-weight: bold;
}

/* ===== BOTÃO FLUTUANTE ===== */
.floating-committee-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.btn-floating {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-floating:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
    background-color: var(--aralco-green-hover) !important;
}

.committee-initial {
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

/* Animação de entrada */
.btn-floating {
    animation: floatIn 0.5s ease-out;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsividade para botão flutuante */
@media (max-width: 768px) {
    .floating-committee-btn {
        bottom: 20px;
        right: 20px;
    }
    
    .btn-floating {
        width: 50px;
        height: 50px;
    }
    
    .committee-initial {
        font-size: 1.1rem;
    }
    
    .breadcrumb-nav {
        padding: 0.4rem 0;
        top: 80px; /* Ajustar para mobile */
    }
    
    .breadcrumb-item {
        font-size: 0.8rem;
    }
}