:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --light-color: #ecf0f1;
    --blue-text: #3498db;
    --white: #ffffff;
    --custom-blue: #004a91;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    color: #333;
}

/* === ESTILOS DA PÁGINA DE LOGIN === */
body.login-body { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    background-color: #f4f7f9;
}

.login-container { 
    background: #fff; 
    padding: 40px; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    width: 100%; 
    max-width: 400px; 
    text-align: center; 
}

.login-container img { 
    max-width: 180px; 
    margin-bottom: 20px; 
}

.login-container h1 { 
    font-size: 24px; 
    margin-bottom: 20px; 
    color: #333; 
}

.login-container .form-group { margin-bottom: 15px; text-align: left; }
.login-container .form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: #555; }
.login-container .form-group input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; }
.login-container .btn-login { width: 100%; padding: 12px; font-size: 16px; border-radius: 5px; background-color: var(--custom-blue); color: white; border: none; cursor: pointer; transition: background-color 0.3s; }
.login-container .btn-login:hover { background-color: #2c3e50; }
.alert-error, .error-message { color: red; margin-top: 15px; background-color: #f8d7da; border: 1px solid #f5c6cb; padding: 10px; border-radius: 5px; }
.alert-info, .info-message { color: #0c5460; font-weight: bold; margin-bottom: 15px; background-color: #d1ecf1; border: 1px solid #bee5eb; padding: 10px; border-radius: 5px; }


/* === LAYOUT GERAL E CABEÇALHO === */
.main-content {
    margin-left: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 40px;
    position: relative;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.header-left { display: flex; align-items: center; }
.logo { height: 70px; width: auto; margin-right: 15px; }
.logo-text { font-size: 22px; font-weight: 600; color: var(--custom-blue); }
.header-right-group { display: flex; align-items: center; gap: 30px; }
.main-nav a { text-decoration: none; color: #555; font-size: 16px; font-weight: 500; margin: 0 15px; transition: color 0.3s; }
.main-nav a:hover, .main-nav a.active { color: var(--custom-blue); }
.user-menu { position: relative; }
.user-avatar { width: 42px; height: 42px; border-radius: 50%; background-color: var(--custom-blue); color: white; font-size: 20px; font-weight: bold; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; text-transform: uppercase; }
.dropdown-content { display: none; position: absolute; right: 0; top: 60px; background-color: #fff; min-width: 200px; box-shadow: 0 8px 16px rgba(0,0,0,0.15); border-radius: 8px; z-index: 1001; overflow: hidden; }
.dropdown-header { padding: 15px; font-weight: bold; border-bottom: 1px solid #f0f0f0; }
.dropdown-content a { color: #333; padding: 12px 15px; text-decoration: none; display: block; transition: background-color 0.2s; }
.dropdown-content a i { margin-right: 10px; color: #777; }
.dropdown-content a:hover { background-color: #f5f5f5; }
.nav-toggle { display: none; }


/* === ESTILOS DA PÁGINA INICIAL === */
.info-boxes { display: flex; gap: 30px; margin-bottom: 30px; }
.box { background-color: var(--white); padding: 25px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); flex: 1; text-align: center; border-top: 4px solid var(--custom-blue); }
.box h3 { margin-top: 0; color: #555; font-size: 16px; }
.box .box-number { font-size: 80px; font-weight: bold; color: var(--custom-blue); margin: 10px 0 0 0; }
.box .top-list { list-style: none; padding: 0; text-align: left; }
.box .top-list li { padding: 8px 0; border-bottom: 1px solid #eee; }
.box .top-list li span { float: right; font-weight: bold; color: var(--blue-text); }
.file-list-container { background-color: var(--white); padding: 25px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #ddd; }
th { background-color: #f8f9fa; font-size: 14px; text-transform: uppercase; color: #666; }
.btn-download { background-color: #27ae60; color: white; padding: 8px 12px; text-decoration: none; border-radius: 5px; transition: background-color 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn-download:hover { background-color: #229954; }
.search-container { margin-bottom: 20px; }
#searchInput { width: 25%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 5px; font-size: 16px; box-sizing: border-box; transition: border-color 0.3s, box-shadow 0.3s; }
#searchInput:focus { outline: none; border-color: var(--custom-blue); box-shadow: 0 0 0 2px rgba(0, 74, 145, 0.2); }


/* === ESTILOS DA PÁGINA DE UPLOAD === */
.upload-container, .action-buttons { margin-bottom: 20px; }
.upload-area { border: 2px dashed var(--custom-blue); border-radius: 8px; padding: 40px; text-align: center; cursor: pointer; transition: background-color 0.3s, border-color 0.3s; }
.upload-area:hover, .upload-area.drag-over { background-color: #ecf0f1; border-color: var(--custom-blue); }
.upload-area .icon { font-size: 50px; color: var(--custom-blue); }
.upload-area p { margin: 10px 0 0 0; font-size: 18px; color: #555; }
.upload-area input[type="file"] { display: none; }
.progress-container { width: 100%; background-color: #ecf0f1; border-radius: 5px; margin-top: 20px; display: none; }
.progress-bar { width: 0%; height: 20px; background-color: var(--custom-blue); border-radius: 5px; text-align: center; line-height: 20px; color: white; font-weight: bold; transition: width 0.4s ease; }
#uploadStatus { margin-top: 15px; font-weight: bold; }
.action-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-action-mode { background-color: #34495e; color: white; border: none; padding: 10px 15px; border-radius: 5px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn-action-mode:hover { background-color: #2c3e50; }
.btn-save { background-color: #27ae60; } .btn-save:hover { background-color: #229954; }
.btn-cancel { background-color: #c0392b; } .btn-cancel:hover { background-color: #a93226; }
.table-checkbox {display: none;width: 1%;text-align: center;}
.delete-mode-active .table-checkbox {display: table-cell;}
td.file-name[contenteditable="true"] { background-color: #fef9e7; outline: 2px solid #f1c40f; border-radius: 4px; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 2000; }
.modal-box { background: #fff; padding: 30px 40px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); text-align: center; max-width: 90%; width: 400px; }
.modal-box h3 { margin-top: 0; font-size: 22px; color: var(--custom-blue); }
.modal-buttons { margin-top: 25px; display: flex; justify-content: center; gap: 15px; }


/* === ESTILOS PARA TELAS PEQUENAS (RESPONSIVIDADE) === */
@media (max-width: 992px) {
    .container { padding: 20px; }
    .header-content { padding: 0 20px; }
    .header-right-group { display: none; position: absolute; top: 70px; left: 0; width: 100%; background-color: #fff; flex-direction: column; align-items: stretch; padding: 10px 0; box-shadow: 0 8px 16px rgba(0,0,0,0.1); }
    .main-header.nav-open .header-right-group { display: flex; }
    .main-nav { display: flex; flex-direction: column; width: 100%; }
    .main-nav a { margin: 0; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; }
    .user-menu { padding: 10px 20px; align-self: flex-start; }
    .nav-toggle { display: block; background: none; border: none; cursor: pointer; padding: 0; z-index: 1001; }
    .hamburger { display: block; position: relative; width: 25px; height: 3px; background: #333; transition: all 0.2s ease-in-out; }
    .hamburger::before, .hamburger::after { content: ''; position: absolute; width: 25px; height: 3px; background: #333; left: 0; transition: all 0.2s ease-in-out; }
    .hamburger::before { top: -8px; }
    .hamburger::after { bottom: -8px; }
    .main-header.nav-open .hamburger { transform: rotate(45deg); }
    .main-header.nav-open .hamburger::before { transform: rotate(90deg); top: 0; }
    .main-header.nav-open .hamburger::after { transform: rotate(90deg); bottom: 0; opacity: 0; }
    .info-boxes { flex-direction: column; gap: 20px; }
    .responsive-table thead { display: none; }
    .responsive-table tr { display: block; border-bottom: 2px solid var(--custom-blue); margin-bottom: 20px; background: #fff; }
    .responsive-table td { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; text-align: right; border-bottom: 1px solid #eee; }
    .responsive-table td::before { content: attr(data-label); font-weight: bold; text-align: left; margin-right: 15px; }
    .responsive-table td:last-child { border-bottom: 0; }
    #searchInput { width: 100%; }
}

.list-header {display: flex;justify-content: space-between;align-items: center;margin-bottom: 20px;}
.list-header h2 {margin: 0;}
.form-group {margin-bottom: 15px;text-align: left;}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-group textarea {height: 80px;width: 390px;}
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
.upload-area-small {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    display: block;
    color: #555;
}
.upload-area-small i {
    margin-right: 10px;
}
.upload-area-small:hover {
    border-color: var(--custom-blue);
    color: var(--custom-blue);
}
#fileInput {
    display: none;
}
.file-type {
    font-style: italic;
    color: #555;}
.upload-area-small small {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 8px;
}

.progress-container {
    width: 100%;
    background-color: #ecf0f1;
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid #ddd;
    display: none; 
}

.progress-bar {
    width: 0%;
    height: 24px;
    background-color: #004a91;
    border-radius: 5px;
    text-align: center;
    line-height: 24px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    transition: width 0.3s ease-in-out;
}
td.file-description[contenteditable="true"] {
    background-color: #f7f7f7;
    outline: 2px solid #f1c40f;
    border-radius: 4px;
}

.file-name-cell {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.file-basename {
    font-weight: 500;
}

.file-extension {
    color: #777;
    padding-left: 2px;
    font-size: 0.9em;
}

/* Estilo para quando o nome do arquivo estiver editável */
.edit-mode-active span.file-basename[contenteditable="true"] {
    background-color: #fef9e7;
    outline: 2px solid #f1c40f;
    border-radius: 4px;
    padding: 2px 5px;
}