body {
    background-color: #f7f7f7;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
}

.login-container {
    background-color: #fff;
    border: 2px solid #FD9308;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(90, 101, 113, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h1 {
    color: #5A6571;
    margin-bottom: 10px;
    font-size: 20px;
}

.login-container .slogan {
    color: #FD9308;
    font-style: italic;
    margin-bottom: 25px;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

.login-container button {
    background-color: #FD9308;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #e07e06;
}

.error {
    background-color: #ffd6d6;
    color: #a94442;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.dashboard {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.sidebar {
    width: 35%;
    min-width: 35%;
    max-width: 35%;
    flex-shrink: 0;
    background-color: #606060;
    color: white;
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    font-size: 14px;
}

.sidebar h3 {
    color: #FD9308;
    margin-bottom: 5px;
    font-size: 18px;
}

.sidebar .slogan {
    font-size: 13px;
    font-style: italic;
    color: #ffffffcc;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
    padding-left: 0;
}

.sidebar ul li {
    margin-bottom: 8px;
}

.sidebar a {
    color: white;
    text-decoration: none;
}

.sidebar a:hover {
    text-decoration: underline;
}

.sidebar form {
    margin: 10px 0;
}

.sidebar form input[type="text"] {
    width: 90%; 
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    margin-bottom: 5px;
}

.sidebar form input[type="file"] {
    width: 100%; /* Ajustar input file também */
}

.sidebar form button {
    background-color: #008000;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    width: 94%;
    margin-top: 5px;
}

.sidebar form button:hover {
    background-color: #006400;
}

.main {
    flex-grow: 1;
    padding: 30px;
    background-color: #f4f4f4;
    overflow-y: auto;
    height: 100%;
}

.main textarea {
    width: 100%;
    font-family: monospace;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 10px;
    resize: vertical;
    background-color: white;
    color: #333;
}

.main button {
    background-color: #FD9308;
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
}

.main button:hover {
    background-color: #e07e06;
}


.breadcrumb {
    margin: 10px 0 15px;
    font-size: 20px;
    color: #fff;
}

.breadcrumb a {
    color: #FD9308;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.main .breadcrumb {
    font-size: 14px;
    color: #5A6571;
}

.main .breadcrumb a {
    color: #FD9308;
    text-decoration: none;
}

.main .breadcrumb a:hover {
    text-decoration: underline;
}

#editor-wrapper {
    background-color: #1e1e1e;
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    margin-bottom: 15px;
}

.CodeMirror {
    height: 500px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.logo-login {
    width: 140px;
    height: 140px;
    object-fit: contain;
    margin-bottom: 20px;
}

.logo-sidebar {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

/*  */
/* Esconder mensagem padrão do input file */
/* Input file personalizado */

input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
}

input[type="file"]::before {
    content: 'Escolher ficheiro';
    display: inline-block;
    width: 100%;
    background: white;
    color: #606060;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 6px 12px;
    outline: none;
    white-space: nowrap;
    cursor: pointer;
    font-size: 13px;
    margin-right: 10px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

input[type="file"]:hover::before {
    background: white;
}

/* Estado quando ficheiro está selecionado */
input[type="file"].file-selected::before {
    background: #28a745;
    content: attr(data-filename);
}

input[type="file"].file-selected:hover::before {
    background: #1e7e34;
}

/* Estilos adicionais para a sincronização Dropbox */

/* Botão de sincronização na sidebar */
.sync-btn {
    display: inline-block;
    background: #28a745; /* Cor oficial da Dropbox */
    color: white !important;
    width: 90%;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s ease;
    margin: 0;
}

.sync-btn:hover {
    background: #1e7e34;
    color: white !important;
}

/* Botão de teste na sidebar */
.sair-btn {
    display: inline-block;
    background: #ff2c25;
    color: white !important;
    width: 90%;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s ease;
    margin: 0;
}

.sair-btn:hover {
    background: #ff0000;
    color: white !important;
}

/* Container principal da página de sincronização */
.sync-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Boxes de status */
.status-box {
    padding: 15px;
    margin: 15px 0;
    border-radius: 6px;
    border: 1px solid;
}

.status-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.status-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.status-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Grid de ficheiros */
.files-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
}

/* Lista de ficheiros */
.file-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
    transition: background 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #e9ecef;
}

.file-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.file-icon {
    margin-right: 10px;
    font-size: 16px;
    min-width: 20px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: #212529;
    word-break: break-word;
}

.file-details {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

/* Estatísticas */
.stats {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    min-width: 100px;
}

.stat-item strong {
    display: block;
    font-size: 24px;
    color: #495057;
    font-weight: 700;
}

.stat-item small {
    color: #6c757d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 10px 16px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

/* Ações de sincronização */
.sync-actions {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Link de voltar */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #0056b3;
}

/* Loading/Progress indicators */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Responsive adjustments para páginas de sincronização */
@media (max-width: 768px) {
    .sync-container {
        margin: 10px;
        padding: 15px;
    }
    
    .stats {
        gap: 10px;
    }
    
    .stat-item {
        padding: 10px 15px;
        min-width: 80px;
    }
    
    .stat-item strong {
        font-size: 20px;
    }
    
    .btn {
        display: block;
        margin: 8px auto;
        width: 200px;
    }
    
    .sync-actions .btn {
        width: auto;
        margin: 5px;
    }
}