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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha no topo */
    min-height: 100vh;
    margin: 20px 0;
}

.container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 700px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: center;
}

p {
    color: #7f8c8d;
    margin-bottom: 25px;
    text-align: center;
}

.info-box {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    word-break: break-all;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
}

.form-group input, .form-group select {
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    position: relative;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-label span {
    font-size: 16px;
    color: #7f8c8d;
}

#fileList {
    margin-top: 15px;
}
#fileList ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#fileList li {
    background-color: #ecf0f1;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 5px;
    font-size: 14px;
}

.submit-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.submit-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

#status-container {
    margin-top: 30px;
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
}

.status-box {
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    margin-top: 10px;
    display: none; /* Escondido por padrão */
}

.status-box.info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
    display: block;
}

.status-box.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-box.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Responsividade */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 20px;
    }
}

/* --- Custom overrides requested --- */
img.brand-logo,
.brand-logo {
    width: 450px !important;
    height: auto;
    max-height: 100px;
}
@media (max-width: 640px) {
    img.brand-logo,
    .brand-logo {
        width: 80vw !important;
        max-width: 450px;
        max-height: 80px;
    }
}

/* --- Accessibility/contrast tweaks for file list and upload hotspot --- */
/* File list chips: higher contrast in both themes */
#fileList li {
    background-color: rgba(255, 255, 255, 0.92);
    color: #1f2937; /* slate-800 */
    border: 1px solid rgba(15, 23, 42, 0.15);
}
#fileList li:hover {
    background-color: rgba(255, 255, 255, 0.98);
    border-color: rgba(15, 23, 42, 0.25);
}
.dark #fileList li {
    background-color: rgba(255, 255, 255, 0.08);
    color: #e5e7eb; /* slate-200 */
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.dark #fileList li:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Upload hotspot: clearer hover/drag states using brand orange */
.upload-area {
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.upload-area:hover {
    border-color: #D76D00; /* bv-orange */
    background-color: rgba(215, 109, 0, 0.06);
    box-shadow: 0 0 0 2px rgba(215, 109, 0, 0.12) inset;
}
.upload-area.dragover {
    border-color: #D76D00 !important;
    background-color: rgba(215, 109, 0, 0.10) !important;
    box-shadow: 0 0 0 3px rgba(215, 109, 0, 0.18) inset;
}
.dark .upload-area:hover {
    border-color: #D76D00;
    background-color: rgba(215, 109, 0, 0.12);
    box-shadow: 0 0 0 2px rgba(215, 109, 0, 0.25) inset;
}
.dark .upload-area.dragover {
    border-color: #D76D00 !important;
    background-color: rgba(215, 109, 0, 0.18) !important;
    box-shadow: 0 0 0 3px rgba(215, 109, 0, 0.35) inset;
}

/* --- File list as full-width flexbox with removable chips --- */
#fileList ul.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 20px; /* requested padding */
}
#fileList .file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.92);
    color: #1f2937; /* slate-800 */
    border: 1px solid rgba(15, 23, 42, 0.15);
}
#fileList .file-chip:hover {
    background-color: rgba(255, 255, 255, 0.98);
    border-color: rgba(15, 23, 42, 0.25);
}
.dark #fileList .file-chip {
    background-color: rgba(255, 255, 255, 0.10);
    color: #e5e7eb; /* slate-200 */
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.dark #fileList .file-chip:hover {
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}
#fileList .file-name {
    max-width: 38ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#fileList .file-size {
    opacity: 0.75;
}
#fileList .file-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.25);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
#fileList .file-remove:hover {
    background-color: #D76D00;
    border-color: #D76D00;
    color: white;
}
.dark #fileList .file-remove {
    border-color: rgba(255, 255, 255, 0.35);
}
.dark #fileList .file-remove:hover {
    background-color: #D76D00;
    border-color: #D76D00;
    color: #0b1220; /* dark bg contrast */
}

/* Constrain file list container to avoid stretching the main card */
#fileList {
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* momentum scrolling on iOS */
    scroll-behavior: smooth; /* smooth scroll on anchors/wheel */
}
