/* === ESTILOS GLOBAIS === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --primary-hover: #e85a28;
    --secondary-color: #ff8f5a;
    --success-color: #ff6b35;
    --danger-color: #d9534f;
    --warning-color: #ffa726;
    --bg-color: #f3f3f3;
    --card-bg: #ffffff;
    --text-color: #2d2d2d;
    --text-secondary: #6b6b6b;
    --border-color: #ffe8dc;
    --shadow: 0 2px 4px rgba(255, 107, 53, 0.1);
    --shadow-lg: 0 8px 20px rgba(255, 107, 53, 0.15);
    --accent-light: #fff3ed;
    --accent-orange: #ff9470;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    letter-spacing: 0.2px;
}

/* === NAVBAR === */
.navbar {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f5a 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand h1 {
    font-size: 1.3rem;
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 56px;
    width: auto;
    max-width: 240px;
    display: block;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s;
    opacity: 0.9;
}

.navbar-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.navbar-menu a.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    opacity: 1;
    font-weight: 600;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-user span {
    font-weight: 500;
    color: white;
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* === BOTÕES === */
.btn {
    padding: 0.7rem 1.75rem;
    border: none;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    width: 100%;
}

/* === FORMULÁRIOS === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 4px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.modal-content form {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.close:hover {
    color: var(--danger-color);
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-baixa {
    background: #fff3ed;
    color: #ff6b35;
    border: 1px solid #ffe8dc;
}

.badge-media {
    background: #ffe8dc;
    color: #e85a28;
    border: 1px solid #ffd4bf;
}

.badge-alta {
    background: #ff6b35;
    color: white;
    font-weight: 600;
}

.badge-success {
    background: #fff3ed;
    color: #ff6b35;
    border: 1px solid #ff8f5a;
}

.badge-warning {
    background: #ffa726;
    color: white;
    font-weight: 600;
}

/* === ANIMAÇÕES === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === FILTROS === */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filters select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
}

/* === ANEXOS === */
.attachments-section {
    grid-column: 1 / -1;
    border-right: none;
}

.attachments-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.attachment-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.attachment-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.attachment-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-word;
    text-align: center;
}

.attachment-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.attachment-actions button {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
}

/* === RESPONSIVO === */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .container {
        padding: 1rem;
    }
    
    .project-details-grid {
        grid-template-columns: 1fr !important;
    }
    
    .project-details-sections {
        grid-template-columns: 1fr !important;
    }
    
    .project-details-section {
        border-right: none !important;
    }
}

@media (max-width: 1200px) {
    .project-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* === MODAL DE DETALHES === */
#projectDetailsModal .modal-content {
    padding: 0;
}

#projectDetailsModal .modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #ff8c61);
    color: white;
    border-bottom: none;
}

#projectDetailsModal .modal-header h3 {
    color: white;
    margin: 0;
}

#projectDetailsModal .close {
    color: white;
    opacity: 0.9;
}

#projectDetailsModal .close:hover {
    opacity: 1;
    color: white;
}

.project-details-main {
    padding: 2rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.project-details-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-details-status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.project-details-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.project-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-detail-field {
    display: flex;
    flex-direction: column;
}

.project-detail-field label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-detail-field .value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.project-details-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #f9fafb;
}

.project-details-section {
    padding: 2rem;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.project-details-section:nth-child(even) {
    border-right: none;
}

.project-details-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.comments-section {
    grid-column: 1 / -1;
    border-right: none;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 0.5rem;
}

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

.comments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.comment-item {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.comment-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.comment-author {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.comment-form button {
    align-self: flex-end;
    min-width: 200px;
}

.history-section {
    grid-column: 1 / -1;
    border-right: none;
    border-bottom: none;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

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

.history-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.history-item {
    padding: 1.25rem;
    border-left: 4px solid var(--border-color);
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.history-item:hover {
    border-left-color: var(--primary-color);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-action {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.history-user {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.history-changes {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
    line-height: 1.5;
}

/* === NOTIFICAÇÕES === */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification {
    animation: slideIn 0.3s ease-out;
}