/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 25%, #2c3e50 50%, #1e3a5f 75%, #0f1419 100%);
    min-height: 100vh;
    color: #e8f4fd;
    position: relative;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Scroll customizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 20, 35, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3b82f6, #65baf5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #65baf5, #4a9eff);
}

/* Efeito de partículas animadas */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(101, 186, 245, 0.6);
    border-radius: 50%;
    animation: float 8s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Container principal */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    min-height: 100vh;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Container geral */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header */
.header {
    background: rgba(15, 20, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(101, 186, 245, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(101, 186, 245, 0.5));
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 15px rgba(101, 186, 245, 0.5));
    }
    to {
        filter: drop-shadow(0 0 25px rgba(101, 186, 245, 0.8));
    }
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #65baf5, #4a9eff, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: #a8c8ec;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #65baf5;
    background: rgba(101, 186, 245, 0.1);
}

/* Formulários */
.form-container {
    background: rgba(15, 20, 35, 0.95);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(101, 186, 245, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(101, 186, 245, 0.2);
    text-align: center;
    max-width: 500px;
    width: 100%;
    position: relative;
    z-index: 2;
    animation: slideIn 1s ease-out;
}

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

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #65baf5, #4a9eff, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.form-header p {
    color: #a8c8ec;
    font-size: 1rem;
    opacity: 0.9;
}

.form-header img {
    height: 60px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(101, 186, 245, 0.5));
    animation: glow 2s ease-in-out infinite alternate;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #65baf5;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(44, 62, 80, 0.3);
    border: 1px solid rgba(101, 186, 245, 0.3);
    border-radius: 12px;
    color: #e8f4fd;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #65baf5;
    box-shadow: 0 0 0 3px rgba(101, 186, 245, 0.1);
    background: rgba(44, 62, 80, 0.4);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #a8c8ec;
    opacity: 0.7;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    text-align: center;
    min-width: 150px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(45deg, #4a9eff, #3b82f6);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(101, 186, 245, 0.1);
    border: 1px solid rgba(101, 186, 245, 0.3);
    color: #65baf5;
}

.btn-secondary:hover {
    background: rgba(101, 186, 245, 0.2);
    border-color: #65baf5;
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
    position: relative;
    z-index: 2;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    background: rgba(15, 20, 35, 0.95);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(101, 186, 245, 0.2);
    backdrop-filter: blur(10px);
}

.dashboard-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #65baf5, #4a9eff, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.dashboard-subtitle {
    color: #a8c8ec;
    font-size: 1.1rem;
    opacity: 0.9;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: rgba(15, 20, 35, 0.95);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(101, 186, 245, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-align: center;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(101, 186, 245, 0.4);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #65baf5;
    font-weight: 600;
}

.card-description {
    color: #a8c8ec;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Status indicator */
.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #a8c8ec;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.alert-error {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.alert-info {
    background: rgba(101, 186, 245, 0.1);
    border: 1px solid rgba(101, 186, 245, 0.3);
    color: #65baf5;
}

/* Classes utilitárias */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Estados de erro */
.form-input.error, .form-textarea.error {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.field-error {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Loading spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Upload de arquivos */
.upload-area {
    border: 2px dashed rgba(101, 186, 245, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(44, 62, 80, 0.1);
}

.upload-area:hover {
    border-color: #65baf5;
    background: rgba(44, 62, 80, 0.2);
}

.upload-area.dragover {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.file-input {
    display: none;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(44, 62, 80, 0.3);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(101, 186, 245, 0.1);
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(44, 62, 80, 0.5);
    border-color: rgba(101, 186, 245, 0.3);
}

.file-item.loading {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.file-name {
    color: #e8f4fd;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    text-align: left;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-actions .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: auto;
}

.file-remove {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Cards extensos para formulário de due diligence */
.due-diligence-section {
    background: rgba(15, 20, 35, 0.95);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(101, 186, 245, 0.2);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 1.3rem;
    color: #65baf5;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-grid {
    display: grid;
    gap: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .form-container, .dashboard-header {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-title {
        font-size: 2rem;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .dashboard-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }

    .dashboard-card {
        padding: 1rem;
    }

    .main-container {
        padding: 1rem 0.5rem;
    }
}

/* Upload Section Styles */
.upload-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 32, 64, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(101, 186, 245, 0.2);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    border: 1px solid rgba(101, 186, 245, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(101, 186, 245, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #65baf5;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #a8c8ec;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #65baf5;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Arquivos anexados */
.attached-files {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 32, 64, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(101, 186, 245, 0.2);
}

.attached-files h4 {
    margin: 0 0 1rem 0;
    color: #65baf5;
    font-size: 0.95rem;
}

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

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

.section-files h5 {
    margin: 0 0 0.5rem 0;
    color: #a8c8ec;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responses Section */
.responses-section {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(16, 32, 64, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(101, 186, 245, 0.2);
}

.responses-section h3 {
    color: #65baf5;
    margin-bottom: 1.5rem;
    text-align: center;
}

.response-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(44, 62, 80, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(101, 186, 245, 0.2);
}

.response-label {
    font-weight: 600;
    color: #65baf5;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.response-content {
    color: #a8c8ec;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Estilos para arquivos selecionados (método tradicional) */
.file-item-new {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideInUp 0.3s ease;
}

.file-item-new .file-name {
    color: #10b981;
    font-weight: 500;
    flex: 1;
}

.file-item-new .file-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}